This documentation is only valid for older versions of Wordfence. If you are using Wordfence 7 or later, please visit our new documentation.

Extract blocked IPs from the database?

From Wordfence Documentation
Revision as of 14:28, 15 August 2016 by WFAsa (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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';