Skip to content

WordPress fixes, security checks, and performance guides for site owners and builders.

Start with fixes
Fixes

How to Disable a WordPress Plugin via SFTP When wp-admin Is Inaccessible

Disable a broken WordPress plugin without wp-admin by renaming its folder over SFTP, then safely restore, update, or replace it.

3 min read Last updated Jun 14, 2026

If a plugin triggered a WordPress critical error and locked you out of wp-admin, you can disable a WordPress plugin without wp-admin by renaming its folder over SFTP. This leaves the plugin’s files and settings in place while preventing WordPress from loading its code.

Before changing anything, create a hosting backup or download a copy of the plugin folder. To use SFTP, you need credentials from your host and an SFTP client. To use your host’s file manager instead, you need access to the hosting control panel.

Rename the broken plugin folder

Connect to the server over SFTP, or open the hosting file manager, and locate the WordPress installation directory. It usually contains these folders:

wp-admin
wp-content
wp-includes

Open wp-content/plugins. Each installed plugin normally has its own directory. For example:

wp-content/plugins/contact-form-plugin

Rename only the suspected plugin directory by adding a suffix:

contact-form-plugin-disabled

Do not rename or delete individual PHP files. Renaming the directory is easier to reverse and limits the change to one plugin.

WordPress can no longer find the plugin at its registered location, so it stops loading it. This is the targeted version of the folder-renaming method described in the official WordPress troubleshooting documentation.

Try loading the site and wp-admin again. Clear any server, page, or CDN cache if the same critical-error page remains cached.

If you do not know which plugin failed

Start with plugins that were installed, updated, or configured immediately before the error appeared. Error emails sent by WordPress may also identify the plugin path that caused the fatal error.

If there is no clear suspect, rename the entire directory:

wp-content/plugins

to:

wp-content/plugins-disabled

Load wp-admin and check whether access returns. WordPress may mark the missing plugins as inactive when it detects that their files are unavailable.

Change the directory name back to plugins, then open Plugins > Installed Plugins. Reactivate plugins individually, checking the site and wp-admin after each activation. Proceed cautiously: activating the broken plugin can immediately restore the critical error. If that happens, rename its folder again and leave it disabled.

Renaming the main directory affects every standard plugin, so site features such as forms, stores, caching, and security controls may temporarily stop working. Restore the original directory name as soon as you can access the dashboard and begin testing plugins one at a time.

Some hosts and WordPress setups use a custom content directory. If wp-content/plugins does not exist, locate the directory containing the site’s installed plugin folders rather than creating a new one.

Repair the plugin before reactivating it

Once wp-admin works again:

  1. Leave the broken plugin disabled.
  2. Check whether the plugin vendor has released a compatible update or documented the error.
  3. Confirm that your WordPress and PHP versions meet the plugin’s requirements.
  4. Replace damaged plugin files with a clean copy from the original vendor if necessary.
  5. Rename the plugin folder back to its exact original name only when you are ready to test it.

Renaming the folder back does not necessarily reactivate the plugin automatically. Open Plugins > Installed Plugins and verify its status before activating it.

If activation triggers the critical error again, repeat the folder rename. Restore the site from your backup if the plugin changed data during activation. Contact the plugin vendor with the fatal-error message, excluding passwords, database credentials, and other private information.

Disable the plugin with WP-CLI instead

If you have SSH access and WP-CLI is installed, list active plugins from the WordPress directory:

wp plugin list --status=active --format=table

Then deactivate the suspected plugin using its slug:

wp plugin deactivate plugin-slug

The official WP-CLI plugin command documentation covers the available plugin management commands.

WP-CLI may fail when the broken plugin causes WordPress to crash before the command can run. In that case, rename the plugin directory through SFTP or the hosting file manager.

Editorial Staff

The BugWP editorial staff publishes practical WordPress guides for fixes, security, performance, hosting, Cloudflare, and plugin/theme recovery.