How to Fix When You Are Locked Out of WordPress Admin
If you’re locked out of your WordPress admin, and Here are the most common reasons:
- You forgot the password or username.
- A security plugin (like Wordfence, iThemes Security) blocked you due to failed logins.
- A faulty plugin/theme is causing a crash.
- A misconfigured .htaccess file may block admin access.
- Server-side issues, like database corruption or memory limits.
- Your admin user role was changed or deleted.

How to Fix It:
Here are some easy ways to fix sidebar below content error :
1. Forgot Password?
If the password reset email doesn’t arrive, reset it manually:
- Log in to your hosting cPanel and open phpMyAdmin.
- Find the wp_users table.
- Locate your username, click Edit, and update the user_pass field.
- Set the function to MD5, enter a new password, and save.
2. Locked Out by a Security Plugin?
If too many failed logins triggered a lockout:
- Access your website files via FTP or cPanel File Manager.
- Go to wp-content/plugins.
- Find your security plugin folder (like Wordfence or iThemes Security) and rename it (e.g., wordfence_disabled).
- Try logging in again.
3. A Plugin or Theme is Causing Problems
- Use FTP or File Manager to access wp-content/plugins.
- Rename the plugins folder to plugins_old (this disables all plugins).
- If you can log in now, rename it back and disable plugins one by one to find the faulty one.
- If it’s a theme issue, rename the wp-content/themes/your-theme-folder to something like theme_old.
If your site is giving you a blank page or login redirects:
- Go to cPanel > File Manager > public_html.
- Find the .htaccess file and rename it to .htaccess_backup.
- Try logging in. If it works, go to Settings > Permalinks in WordPress and click Save Changes to create a new .htaccess file.
5. Your Admin Account is Deleted or Changed
If someone removed or downgraded your admin role:
- Open phpMyAdmin and go to wp_users.
- Click Insert to add a new admin user manually.
- Username: newadmin
- Password: yourpassword (Set function to MD5)
- Email: your@email.com
- Assign admin rights in the wp_usermeta table:
- Insert a new row with meta_key: wp_capabilities and meta_value: a:1:{s:13:”administrator”;b:1;}
If your site keeps crashing:
- Increase PHP memory limit by editing wp-config.php and adding:
define(‘WP_MEMORY_LIMIT’, ‘256M’);
- If the database is corrupted, add this to wp-config.php:
define(‘WP_ALLOW_REPAIR’, true);