Extract blocked IPs from the database?

From Wordfence Documentation
Jump to: navigation, search

If you want to extract blocked IPs from the database so that you can process them with other software you can do a MySQL query like this

Please note that MySQL >= 5.6 is required.

SELECT INET6_NTOA(IP) FROM wp_wfBlocks

If you want to output the results to a file, you can do that with this code

SELECT INET6_NTOA(IP) FROM wp_wfBlocks
INTO OUTFILE '/writable_directory_by_mysql/blocked_IPs.csv'
LINES TERMINATED BY '\n';