WP AI Agent
Features Pricing Blog Contact Download Plugin Manage Subscription Get Free Key →

How to Disable a WordPress Plugin Without Admin Access: Full Guide

· · 8 min read

Knowing how to disable a WordPress plugin without admin access is an essential skill for anyone who manages WordPress websites. Whether a rogue plugin has locked you out of your dashboard, caused a white screen of death, or broken critical functionality, there are several reliable methods to deactivate plugins without ever logging into the WordPress admin area. This guide walks you through every approach, from FTP file renaming to WP-CLI commands, so you can recover your site quickly and confidently.

Why You Might Need to Disable a Plugin Without Admin Access

There are several common scenarios where accessing the WordPress admin dashboard becomes impossible and you need an alternative way to manage plugins:

  • White Screen of Death (WSOD): A poorly coded plugin triggers a fatal PHP error, rendering the entire site blank.
  • Dashboard redirect loops: A security or caching plugin misconfigures redirects, locking you out.
  • Memory limit exhaustion: A plugin consumes all available PHP memory, crashing the admin panel.
  • Corrupted plugin update: An auto-update introduces a bug that breaks the site before you can react.
  • Lost admin credentials: A plugin managing user roles has altered or removed your administrator account.

In every one of these situations, the methods below give you a back door to restore functionality without needing the WordPress admin interface.

Method 1: Rename the Plugin Folder via FTP or File Manager

The simplest and most universally accessible method is to rename the plugin's folder on the server. WordPress looks for plugins in a specific directory structure. When it cannot find an active plugin's folder under the expected name, it automatically deactivates it and displays an admin notice the next time someone logs in.

Using an FTP Client (FileZilla)

  1. Open your FTP client (FileZilla is free and popular) and connect to your server using the host, username, password, and port provided by your hosting company.
  2. Navigate to public_html/wp-content/plugins/ (the path may vary slightly depending on your host; some use www or your domain name instead of public_html).
  3. Locate the folder of the plugin you want to disable. For example, if the culprit is WooCommerce, the folder is named woocommerce.
  4. Right-click the folder and choose Rename.
  5. Add a suffix such as -disabled to the folder name, making it woocommerce-disabled.
  6. Press Enter to confirm. WordPress will immediately fail to load the plugin on the next page request.
  7. Test your site and WordPress admin. Once you regain access, you can rename the folder back to its original name and then properly deactivate the plugin through the dashboard.

Using cPanel File Manager

  1. Log into your hosting control panel (cPanel, Plesk, or similar).
  2. Open the File Manager tool.
  3. Navigate to public_html/wp-content/plugins/.
  4. Select the plugin folder, right-click, and choose Rename.
  5. Append -disabled to the folder name and save.
  6. Refresh your WordPress site to confirm the plugin is no longer running.

Pro tip: To disable all plugins at once (useful when you do not know which plugin is causing the issue), rename the entire plugins folder itself to plugins-disabled. WordPress will deactivate every plugin simultaneously. Remember to rename it back afterward.

Method 2: Disable Plugins via phpMyAdmin (Database)

WordPress stores active plugin data in the wp_options database table under the active_plugins option. By editing this record directly, you can deactivate any or all plugins without touching the file system.

Step-by-Step Database Method

  1. Log into your hosting control panel and open phpMyAdmin.
  2. Select your WordPress database from the left sidebar. If you are unsure of the database name, check your wp-config.php file for the DB_NAME constant.
  3. In the list of tables, click on wp_options (your table prefix may differ, e.g., mywp_options).
  4. Use the search bar or scroll to find the row where option_name equals active_plugins.
  5. Click the Edit (pencil) icon for that row.
  6. In the option_value field, you will see a serialized PHP array listing all active plugins, like this:
a:3:{i:0;s:19:"akismet/akismet.php";i:1;s:25:"woocommerce/woocommerce.php";i:2;s:28:"wordfence/wordfence.php";}
  1. To disable all plugins, replace the entire value with: a:0:{}
  2. To disable a single plugin, carefully remove its entry and update the array count. For example, to remove WooCommerce from the example above, the updated value would be:
a:2:{i:0;s:19:"akismet/akismet.php";i:1;s:28:"wordfence/wordfence.php";}
  1. Click Go to save the changes.
  2. Reload your WordPress site and attempt to log in to the admin dashboard.

Important: Serialized data is sensitive. A single character mistake can break the database record further. Always export your database as a backup before making manual edits.

Method 3: Use WP-CLI to Deactivate Plugins

WP-CLI is the official command-line interface for WordPress. If your hosting provider supports SSH access, WP-CLI is the fastest, safest, and most precise method to disable plugins without the admin panel. Many managed WordPress hosts (Kinsta, WP Engine, Flywheel) include WP-CLI by default.

Deactivating a Single Plugin

  1. Connect to your server via SSH. Your host will provide the credentials.
  2. Navigate to your WordPress installation directory:
cd /var/www/html/
  1. List all currently active plugins to find the exact plugin slug:
wp plugin list --status=active
  1. Deactivate the specific plugin using its slug (the folder name):
wp plugin deactivate woocommerce
  1. Confirm the deactivation was successful:
wp plugin list --status=inactive

Deactivating All Plugins at Once

If you are unsure which plugin is causing the problem, deactivate all of them in a single command:

wp plugin deactivate --all

Once you have regained admin access, reactivate plugins one by one to identify the culprit:

wp plugin activate plugin-folder-name

Method 4: Use a Must-Use Plugin to Force Deactivation

WordPress includes a special directory called mu-plugins (Must-Use plugins) located at wp-content/mu-plugins/. PHP files placed in this directory are executed automatically on every page load, before regular plugins, and cannot be deactivated from the admin panel. You can exploit this behavior to forcibly stop a problematic plugin from loading.

Creating a Must-Use Deactivation Snippet

  1. Connect to your server via FTP or File Manager.
  2. Navigate to wp-content/. If the mu-plugins folder does not exist, create it.
  3. Create a new PHP file inside mu-plugins. Name it something descriptive, such as disable-plugin.php.
  4. Add the following code to the file, replacing woocommerce/woocommerce.php with the path to the plugin you want to disable:
<?php
// Must-Use plugin to force-disable a specific plugin
add_filter( 'option_active_plugins', function( $plugins ) {
    $plugin_to_disable = 'woocommerce/woocommerce.php';
    $key = array_search( $plugin_to_disable, $plugins );
    if ( false !== $key ) {
        unset( $plugins[ $key ] );
    }
    return $plugins;
} );
  1. Save and upload the file to the server.
  2. WordPress will now execute this code before loading regular plugins, effectively preventing WooCommerce (or whichever plugin you specified) from activating.
  3. Once the issue is resolved and you have admin access, delete this disable-plugin.php file from the mu-plugins directory.

This method is particularly useful for developers who need to temporarily suppress a plugin in a staging or production environment without permanently altering the database.

Method 5: Edit wp-config.php to Enable Debug Mode and Identify Issues

Before disabling plugins, it helps to know exactly which one is causing the problem. Adding WordPress debug constants to your wp-config.php file enables detailed error logging without requiring admin access.

Enabling WordPress Debug Logging

  1. Access your server via FTP or File Manager and navigate to the WordPress root directory.
  2. Open wp-config.php in a text editor.
  3. Locate the line /* That's all, stop editing! Happy publishing. */ and add the following lines above it:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
  1. Save and upload the file.
  2. Attempt to load the broken page on your site.
  3. WordPress will write error details to wp-content/debug.log. Download and open this file to see which plugin file is throwing the fatal error.
  4. Use the file or class name in the error log to identify the offending plugin, then use one of the methods above to disable it.
  5. After resolving the issue, set WP_DEBUG back to false to avoid exposing debug information on a live site.

Best Practices After Regaining Admin Access

Once you have successfully disabled the problematic plugin and regained access to your WordPress dashboard, take the following steps to prevent the same situation from recurring:

  • Test plugin updates on staging first: Never apply plugin updates directly to a production site without testing them in a staging environment.
  • Set up automatic backups: Use a plugin like UpdraftPlus or a hosting-level backup solution so you always have a clean restore point.
  • Enable WordPress maintenance mode before major updates: This prevents visitors from seeing broken pages during the update window.
  • Monitor plugin compatibility: Check that plugins are compatible with your current version of WordPress and PHP before updating.
  • Keep login credentials secure and accessible: Store admin credentials in a password manager so a lockout caused by a plugin is your only obstacle.
  • Remove the temporary fix: If you renamed a folder or added an mu-plugins file, remember to reverse those changes after properly deactivating the plugin through the dashboard.

Frequently Asked Questions

Will disabling a plugin via FTP delete my plugin data?

No. Renaming a plugin folder via FTP simply prevents WordPress from loading the plugin. It does not delete any plugin files or the data the plugin stored in the database. Your settings and data remain intact. To permanently remove plugin data, you would need to uninstall the plugin through the WordPress dashboard, which typically triggers its own cleanup routines.

What is the fastest way to disable all WordPress plugins without admin access?

The fastest method depends on your server access. If you have SSH, the WP-CLI command wp plugin deactivate --all takes only seconds. If you have FTP or cPanel File Manager access, renaming the entire wp-content/plugins folder to plugins-disabled deactivates all plugins instantly without editing any individual files or database records.

Is it safe to edit the active_plugins option directly in phpMyAdmin?

Yes, but you must be careful with the serialized data format. A mistake in the serialized string — such as an incorrect character count or a missing semicolon — can cause additional errors. Always back up your database before editing. If you make a mistake, most hosting providers allow you to restore from a recent backup via phpMyAdmin or the control panel.

Can I disable a plugin without FTP, SSH, or phpMyAdmin access?

If you have no server-level access at all, your options are limited. You can contact your hosting provider's support team and ask them to disable the plugin on your behalf — they can usually do this via their own server tools. Alternatively, if you have access to a staging or backup copy of your site, you can test fixes there before the host applies them to your live environment.

Managing WordPress at the server level can feel daunting, but with the methods above you now have a complete toolkit for disabling plugins under any circumstances. If you prefer a simpler approach going forward, WP AI Agent is a powerful tool that lets you manage plugins, troubleshoot issues, and perform complex WordPress tasks through a natural-language AI chat interface — no FTP client or command line required.

Ready to manage WordPress with AI?

Get 100,000 tokens free every month. No credit card required.

Get Your Free License Key →

More from the blog