Home
»
Knowledge Base
»
MySQL
» Remove Wordfence firewall block via MySQL CLI
Knowledge base article
Remove Wordfence firewall block via MySQL CLI
Related articles
Basic WordPress security and site management
Optimising Wordfence firewall and security settings
Other MySQL articles
Check MySQL database table disk usage
Create a clone of your website
Create a WordPress administrator via MySQL CLI
Create a WordPress administrator via phpMyAdmin
Download or restore individual files, directories or database backups with JetBackup
Export or Import a MySQL database via CLI
Go live with your WordPress staging website
Manual WordPress migrations in a nutshell
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