Home » Knowledge Base » Remove Wordfence firewall block via MySQL CLI
Knowledge base article
Remove Wordfence firewall block via MySQL CLI
This guide will teach you how to remove a Wordfence firewall block using MySQL command line tools
Has WordFence blacklisted you from your own website? Fear not! This guide will teach you how to regain access by removing the Wordfence firewall block via MySQL command line interface.
To complete this guide, please ensure you have:
- SSH Access - Serversaurus relies on key based authentication to login via SSH/SFTP, if you haven't already, generate your SSH key pair and configure it in cPanel before proceeding with the next steps
- MySQL database credentials - These can be found within the wp-config.php file.
Let's get started!
- SSH to your hosting server.
- Login to MySQL using the below command, enter your password when prompted:
Update the following command with your MySQL usermysql -u mysql_user -p;
- Change into your database:
Update the following command with your MySQL databaseuse database_name;
- Now we're going to clear all WordFence blocks by truncating the wp_wfblocks7 table:
Update the following command with your database prefix, the default WordPress DB prefix is wp_TRUNCATE TABLE wp_wfblocks7;
Nice work! The block will now be removed!
Last updated November 30, 2023