Disable WordPress Plugins When Locked Out: 4 Fast Methods to Regain Access

To disable WordPress plugins when locked out, rename the wp-content/plugins folder via FTP or File Manager, edit the active_plugins value in phpMyAdmin, or use WP-CLI commands—no dashboard login required. These methods force WordPress to treat all plugins as inactive so you can restore admin access and identify the problematic plugin.

Being locked out of WordPress is stressful: you may see a white screen, a fatal error, a login loop, or a “Sorry, you are not allowed to access this page” message. In most cases, a plugin conflict, failed update, or corrupted plugin file is the cause.

This guide shows you four reliable methods to disable WordPress plugins when you cannot access wp-admin, plus how to find the culprit plugin afterward and prevent future lockouts.

Last updated: September 2026


Quick Answer: Fastest Way to Disable Plugins

If you need to act immediately:

  1. Connect via FTP/SFTP or your host’s File Manager.

  2. Navigate to /wp-content/.

  3. Rename the plugins folder to plugins-disabled.

  4. Try logging into /wp-admin/ again.

This single step deactivates every plugin instantly without touching the database.


Why You Get Locked Out of WordPress

Plugins extend WordPress functionality but can also break your site when they:

  • Conflict with each other or your theme

  • Are outdated or incompatible with your WordPress or PHP version

  • Contain corrupted files after a failed update

  • Consume excessive memory and crash PHP

  • Are malicious or infected with malware

  • Change admin access rules (security, membership, role plugins)

Other issues can mimic plugin problems, such as a corrupted .htaccess file, theme conflicts, or low PHP memory limits.


Before You Start: Safety Checklist

  • Back up your site — files and database. Use your host’s backup tool or a plugin backup you already have.

  • Gather credentials — FTP/SFTP, hosting control panel, phpMyAdmin, or SSH/WP-CLI access.

  • Note your setup — if possible, list current plugins, theme, and WordPress version to help identify issues later.

  • Work in a staging site — if you have one, test changes there first.


FTP or SFTP gives you direct file access and works even when the dashboard is completely broken.

Step 1: Install an FTP Client

Use a trusted client such as:

  • FileZilla (free, Windows/macOS/Linux)

  • Cyberduck (free, Windows/macOS)

  • WinSCP (free, Windows)

Step 2: Get FTP/SFTP Credentials

You will need:

  • Host: your domain or server IP

  • Username and password: from your hosting dashboard

  • Port: 21 for FTP, 22 for SFTP (preferred)

Step 3: Connect to Your Server

Open your FTP client and enter your credentials. Connect to your site’s root directory (often public_html, www, or your domain name).

Step 4: Navigate to the Plugins Folder

Go to:

text

/wp-content/plugins/

This folder contains all installed plugin directories.

Step 5: Rename the Plugins Folder

Right-click the plugins folder and rename it to:

text

plugins-disabled

WordPress will no longer find the folder and will treat all plugins as inactive.

Step 6: Test wp-admin Access

Open a new browser tab and visit:

text

https://yoursite.com/wp-admin/

You should now be able to log in.

Step 7: Restore the Plugins Folder

After logging in:

  1. Return to FTP.

  2. Rename plugins-disabled back to plugins.

  3. All plugin files are restored, but they remain deactivated in the dashboard.

Explore this link for more details: how to identify the problematic plugin.


Method 2: Disable Plugins via cPanel File Manager

If your host provides cPanel or a similar file manager, you can do this without installing an FTP client.

Step 1: Log Into cPanel

Visit:

text

https://yoursite.com/cpanel/

Log in with your cPanel credentials.

Step 2: Open File Manager

In cPanel, go to Files → File Manager.

Step 3: Navigate to the Plugins Folder

Open:

text

public_html/wp-content/plugins/

(Adjust if your WordPress is in a subfolder.)

Step 4: Rename the Plugins Folder

Right-click plugins and rename it to:

text

plugins-disabled

Step 5: Test wp-admin

Visit /wp-admin/ and log in. If access returns, the issue is plugin-related.

Step 6: Restore the Folder

Rename plugins-disabled back to plugins. Plugins remain deactivated in the dashboard until you reactivate them.

Note for non-cPanel hosts: Plesk, DirectAdmin, and custom dashboards have similar file-explorer tools. The steps are the same: navigate to wp-content/plugins and rename the folder.


Method 3: Disable Plugins via phpMyAdmin (Database Method)

Use this method if file access is restricted or if you prefer database editing. This method is riskier; back up your database first.

Step 1: Open phpMyAdmin

In cPanel, go to Databases → phpMyAdmin. Select your WordPress database (check wp-config.php for DB_NAME if unsure).

Step 2: Find the wp_options Table

Open the table that ends in _options, such as:

text

wp_options

Your prefix may differ (e.g., site_options).

Step 3: Locate the active_plugins Row

Search for option_name = 'active_plugins'. This row stores the list of active plugins as a serialized array.

Step 4: Edit the option_value

Click Edit for the active_plugins row. Replace the entire option_value with:

text

a:0:{}

This means “empty array” — no active plugins.

Step 5: Save and Test

Click Go to save. Then visit /wp-admin/ and log in. All plugins are now deactivated.

Warning: Serialized data is sensitive. Even a single extra space or character can break your site. Always back up the database before editing.


Method 4: Disable Plugins via WP-CLI (Advanced)

If your host supports SSH and WP-CLI, this is the fastest and safest command-line method.

Step 1: Connect via SSH

Use Terminal (macOS/Linux) or PuTTY (Windows) to connect to your server.

Step 2: Navigate to WordPress Root

bash

cd /path/to/your/wordpress-installation

Step 3: Deactivate All Plugins

Run:

bash

wp plugin deactivate --all

You will see a confirmation message such as:

tex

Success: Deactivated 5 of 5 plugins.

Step 4: Test wp-admin

Visit /wp-admin/ and log in. All plugins are now inactive.

Bonus: List and Reactivate Plugins

To see plugin status:

bash

wp plugin list

To activate a specific plugin:

bash

wp plugin activate plugin-slug

How to Identify the Problematic Plugin

Once you regain access, you must find which plugin caused the lockout.

Step 1: Reactivate Plugins One by One

  1. Go to Plugins → Installed Plugins.

  2. Activate one plugin.

  3. Log out and log back in.

  4. Test your site’s front end and admin area.

  5. Repeat until the error returns.

The last activated plugin is the likely culprit.

Step 2: Troubleshoot the Faulty Plugin

For the problematic plugin:

  • Update it — check for a newer version.

  • Reinstall it — delete and reinstall to replace corrupted files.

  • Contact support — use the plugin’s WordPress.org support forum or developer site.

  • Replace it — switch to a better-maintained alternative if the plugin is abandoned.

Step 3: Test in Staging

For business-critical sites, use a staging environment to test plugin updates and activations before applying them live.


What If Disabling Plugins Doesn’t Work?

If you still cannot access wp-admin after deactivating plugins, try these additional fixes.

Check for Theme Conflicts

A corrupted or incompatible theme can also block access.

  1. Via FTP/File Manager, rename the themes folder to themes-disabled.

  2. WordPress will fall back to a default theme.

  3. Test /wp-admin/ again.

Fix a Corrupted .htaccess File

A misconfigured .htaccess can block admin access.

  1. Via FTP/File Manager, rename .htaccess to .htaccess-backup.

  2. If you can log in, go to Settings → Permalinks and click Save Changes to regenerate it.

Increase PHP Memory Limit

Low memory can cause white screens.

Add this to wp-config.php before /* That's all, stop editing! */:

php

define( 'WP_MEMORY_LIMIT', '256M' );

Scan for Malware

Malicious code can block admin access. Use a security scanner such as Wordfence, Sucuri, or your host’s malware tool.


Special Case: Security Plugin Lockout

If a security plugin (e.g., Wordfence, iThemes, All In One WP Security) locked you out due to IP blocking, 2FA issues, or firewall rules:

  1. Via FTP/File Manager, rename only that plugin’s folder, such as:

    • wordfencewordfence-disabled

    • ithemes-securityithemes-security-disabled

  2. Test /wp-admin/ again.

  3. After regaining access, review the plugin’s lockout settings, whitelist your IP, and configure recovery codes.


Common Mistakes to Avoid

Deleting the Plugins Folder

Do not delete plugins. Only rename it. Deleting removes all plugin files permanently.

Editing active_plugins Without a Backup

A small mistake in serialized data can break your site. Always back up the database first.

Setting File Permissions to 777

This does not fix plugin conflicts and creates a major security risk.

Leaving Emergency Code Enabled

If you add temporary code to functions.php or a custom plugin to restore access, remove it immediately after recovery.

Reactivating All Plugins at Once

This can lock you out again. Reactivate one by one and test after each.


Prevention Checklist: Avoid Future Lockouts

  • Keep WordPress core, plugins, and themes updated

  • Use a staging site to test updates before going live

  • Limit plugins to only what you need

  • Choose reputable plugins with recent updates and good support

  • Back up your site weekly (or daily for high-traffic sites)

  • Monitor error logs and use a debugging plugin during development

  • Document custom code and plugin configurations

  • Review plugin compatibility before major WordPress or PHP upgrades.

See this post: WordPress maintenance checklist.


Frequently Asked Questions

Will disabling plugins delete their settings?

No. Disabling plugins only stops them from running. All settings remain stored in the database and will be available when you reactivate the plugin.

Can I disable just one plugin when locked out?

Yes. Via FTP/File Manager, rename only that plugin’s folder (e.g., bad-pluginbad-plugin-disabled). WordPress will treat it as inactive while leaving others running.

What if I don’t have FTP or phpMyAdmin access?

Contact your hosting provider. Most hosts can temporarily disable plugins for you or provide emergency access via their support tools. royalplugins

Can I disable plugins via SSH without WP-CLI?

Yes. Rename the plugins folder via command line:

bash

mv wp-content/plugins wp-content/plugins-disabled

Then restore it after testing.

Will this work on WordPress Multisite?

Yes, but plugin activation can be network-wide or per-site. After regaining access, check Network Admin → Plugins and individual site plugin settings.

How do I know if the issue is a plugin or theme?

Disable plugins first. If the problem persists, temporarily switch to a default theme by renaming the active theme’s folder in wp-content/themes/.

Learn more about Managing Plugins in the WordPress Documentation.


Discover more from WORDPRESS ROLE

Subscribe to get the latest posts sent to your email.

Discover more from WORDPRESS ROLE

Subscribe now to keep reading and get access to the full archive.

Continue reading

Overlooking the shops, restaurants, and year round activity of coconut point, while enjoying the privacy, comfort, and convenience of luxury condominium living in one of estero's most walkable destinations.