Resolving Lockouts and Redirects After Installing or Updating All-In-One Security (AIOS)
Content
One of the most common and frustrating issues users encounter with the All-In-One Security (AIOS) plugin is being unexpectedly locked out of their WordPress admin dashboard. This often manifests as a redirect to 127.0.0.1, a "Not available" message, a 403 error, or an "Incorrect CAPTCHA" loop. This guide will explain why this happens and provide the most effective solutions to regain access to your site.
Why Does This Happen?
The AIOS plugin is designed to protect your site by implementing powerful security features. However, if these features are configured and then the plugin is deactivated, updated, or reinstalled without a proper reset, their protective rules can remain active. When you reactivate the plugin, it reads these old settings and immediately enforces them, often blocking your access. The most common culprits are:
- Cookie-Based Brute Force Prevention: This feature hides your login page. If enabled and then forgotten, you will be redirected to 127.0.0.1 when trying to access
wp-login.php. - Login Whitelist: If you enabled this to only allow specific IPs to access the login page, your current IP might not be on the list.
- Renamed Login Page: If you renamed your login page (e.g., to
my-secret-login) and then deactivated the plugin, you will need to use that custom URL to log back in. - CAPTCHA Settings: A misconfigured or cached CAPTCHA can prevent logins even with correct credentials.
How to Regain Access and Fix the Problem
Method 1: Disable Security Features via wp-config.php (Most Common Solution)
This is the fastest way to stop AIOS from enforcing the problematic settings. You will need access to your site's files via FTP, SFTP, or your hosting provider's file manager.
- Locate your WordPress installation's root directory and find the
wp-config.phpfile. - Edit the file and add one of the following lines of code just before the line that says
/* That's all, stop editing! Happy publishing. */.
For 127.0.0.1 redirects:
For "Not available" or IP whitelist issues:define('AIOS_DISABLE_COOKIE_BRUTE_FORCE_PREVENTION', true);
For login lockout messages:define('AIOS_DISABLE_LOGIN_WHITELIST', true);define('AIOS_DISABLE_LOGIN_LOCKOUT', true); - Save the file and upload it back to the server if necessary.
- You should now be able to access your WordPress admin dashboard using the standard
wp-login.phpURL. - Once logged in, go to the AIOS settings to reconfigure or disable the specific feature causing the issue. Remember to remove the line of code you added to
wp-config.phpafterwards, as leaving these constants defined disables important security functions.
Method 2: Perform a Complete Plugin Reset
If the above doesn't work or you want to start from a completely clean slate, you need to remove all traces of the plugin. Simply deactivating and deleting it from the WordPress plugins menu is often not enough.
- Delete the plugin folder via FTP/SFTP: Navigate to
/wp-content/plugins/and delete theall-in-one-wp-security-and-firewallfolder. - Remove the Must-Use Plugin (if it exists): Navigate to
/wp-content/mu-plugins/and delete the fileaios-firewall-loader.php. - Clean your database: Using a tool like phpMyAdmin, run a SQL query to delete all AIOS options and tables.
- Delete options:
DELETE FROM wp_options WHERE option_name LIKE '%aio%' OR option_name LIKE '%aiowps%';(Replacewp_with your database prefix if different). - Drop tables:
DROP TABLE wp_aiowps_events, wp_aiowps_failed_logins, wp_aiowps_global_meta, wp_aiowps_login_lockdown, wp_aiowps_permanent_block, wp_aiowps_login_activity;
- Delete options:
- Clean your .htaccess file: Edit the
.htaccessfile in your root directory and remove any code between the# BEGIN All In One WP Securityand# END All In One WP Securitycomments.
After completing these steps, you can safely reinstall the AIOS plugin fresh from the WordPress repository.
Conclusion
Being locked out of your site can be alarming, but it's usually a solvable configuration conflict. The key is to use the wp-config.php constants to temporarily disable the security features preventing access. For a permanent fresh start, a complete manual removal of all plugin files and database entries is the most thorough approach. Always ensure you note down any custom settings, like a renamed login slug or secret word, before making changes.
Related Support Threads Support
-
Updated and 403 errorhttps://wordpress.org/support/topic/updated-and-403-error/
-
Expire time for logged in users saved @ ohttps://wordpress.org/support/topic/expire-time-for-logged-in-users-saved-o/
-
block the access into the “/phpMyAdmin” over the plugin setingshttps://wordpress.org/support/topic/block-the-access-into-the-phpmyadmin-over-the-plugin-setings/
-
Can’t Customize my themehttps://wordpress.org/support/topic/cant-customize-my-theme/
-
deactivate notificationshttps://wordpress.org/support/topic/deactivate-notifications/
-
Admin not accessiblehttps://wordpress.org/support/topic/admin-not-accessible-2/
-
Item left in admin menu after uninstallhttps://wordpress.org/support/topic/item-left-in-admin-menu-after-uninstall/
-
Fatal page error after plugin install – site not accessiblehttps://wordpress.org/support/topic/fatal-page-error-after-plugin-install-site-not-accessible/
-
Can’t loginhttps://wordpress.org/support/topic/cant-login-293/
-
It broke my admin dashboard accesshttps://wordpress.org/support/topic/it-broke-my-admin-dashboard-access-2/
-
block once active the pluginhttps://wordpress.org/support/topic/block-once-active-the-plugin/
-
Erro 403 after updating the pluginhttps://wordpress.org/support/topic/erro-403-after-updating-the-plugin/
-
Unable to login Captcha Issuehttps://wordpress.org/support/topic/unable-to-login-captcha-issue/
-
Plugin locks me outhttps://wordpress.org/support/topic/plugin-locks-me-out/
-
Cannot Login – How do I update your plugin with the patch?https://wordpress.org/support/topic/cannot-login-how-do-i-update-your-plugin-with-the-patch/
-
Admin Account Deletedhttps://wordpress.org/support/topic/admin-account-deleted/
-
Cannot install pluginhttps://wordpress.org/support/topic/cannot-install-plugin-17/
-
plugin broke & even broke functionality of my sitehttps://wordpress.org/support/topic/plugin-broke-even-broke-functionality-of-my-site/
-
Unable to activate pluginshttps://wordpress.org/support/topic/unable-to-activate-plugins-4/
-
error after activate the pluginhttps://wordpress.org/support/topic/error-after-activate-the-plugin-2/
-
Problem accesing / Deletinghttps://wordpress.org/support/topic/deleting-plugin-10/
-
instead of the admin panel, I am directed to the WooCommerce dashboardhttps://wordpress.org/support/topic/instead-of-the-admin-panel-i-am-directed-to-the-woocommerce-dashboard/
-
can’t find pluginhttps://wordpress.org/support/topic/cant-find-plugin-7/
-
Forbidden?https://wordpress.org/support/topic/forbidden-62/
-
Database problems and entering the WordPress counterhttps://wordpress.org/support/topic/database-problems-and-entering-the-wordpress-counter/
-
http://127.0.0.1/https://wordpress.org/support/topic/http-127-0-0-1/
-
After setting up the plugin can’t access the sitehttps://wordpress.org/support/topic/after-setting-up-the-plugin-cant-access-the-site/
-
Not able to login to Admin Dashboardhttps://wordpress.org/support/topic/not-able-to-login-to-admin-dashboard-2/
-
Cannot login anymore if activate the pluginhttps://wordpress.org/support/topic/cannot-login-anymore-if-activate-the-plugin/