The Wordpress plugin "All in one WP Security & firewall" is excellent when it comes to increasing the security of your Wordpress website.
However, some settings in this plugin can lead to you accidentally locking yourself out of the Wordpress backend completely. This can also happen if you move your website to a new server.
So the question is: What can you do if something goes wrong with the "All in one WP Security & firewall" plugin?
Deactivate the "All in one WP Security & firewall" plugin
Below you will find step-by-step instructions on how to deactivate the plugin "All in one WP Security & firewall" so that you can log back into the WordPress backend.
Step 1:
Connect to the server via FTP or SSH and rename the folder wp-content/plugins/all-in-one-wp-security-and-firewall to "all-in-one-wp-security-and-firewall-disabled" or similar.
Step 2:
Rename the .htaccess file in the root directory of your website to ".htaccess_disabled".
Step 3:
Open the website's database, e.g. in PhpMyAdmin or a similar DB admin tool.
Then search in the table "options" in the column "option_name" for the entry "aio_wp_security_configs". All settings of the plugin are stored in this row. Simply rename the entry in the "option_name" column, or delete the entire row if you want to start over with the plug-in settings.
Step 4:
Now log into the Wordpress backend. The "All in one WP Security & firewall" plugin is now completely deactivated, as it can no longer find its plugin folder.
Step 5:
You should now create a new .htacces file by simply clicking on the "Save" button under Settings->Permalink. A new .htaccess file will then be created with the rewrite rules selected there.
Your website should now function normally again and you should be able to log back into the backend.
Now you can start to solve the original problem. If, for example, you accidentally made the wrong settings, you can simply delete the entire line in the database as explained in step 3 and start again.
If you want to get rid of the "All in one WP Security & firewall" plugin completely, you can also delete the plugin folder (step 1) and the .htaccess file (step 2) completely instead of just renaming them.
So, I hope I could help you with these tips to solve your problems with the "All in one WP Security & firewall" plugin!