The conventional method of turning off and on plugins in WordPress works 99.9% of the time. But sometimes, when you’re doing development work in a fast way (possibly “cowboy coding” in a sloppy way… :p), you’ll need to make plugin stop being loaded by WordPress in a different way. For that very small percentage case, it’s useful to know how to disable a plugin when you aren’t able to login to the admin area of a WordPress site. That’s where the (S)FTP hack we’ll cover today comes in.

Reasons you might need to use this non-standard way of disabling a plugin (or theme) could be:

  • You can’t log in to a WordPress site anymore (password was changed, you lost it) but you *need* to disable a plugin right now for a client
  • Your just “white-screened” your WordPress site, and you know the issue is that you broke a plugin file, but can’t quite figure out how to fix it (see our Quick Guide about a possibly-better solution to a WordPress “white-screen of death”)
  • You just want to to know if this trick works (it does, as the video shows)
  • Other reasons I can’t think of

Here’s the video of how you can deactivate a plugin without having access to the WordPress dashboard:

How to Disable a WordPress Plugin When You Can’t Log In

  1. Connect to your sites file system via (S)FTP. (Technically this works on any site in any connection mechanism, but this is the most likely.)
  2. Find the folder of the plugin (or theme) you want to disable.
  3. Rename the folder of the plugin (or theme).

That’s it. If you take those steps, WordPress can no longer find the thing it was looking to load, and it’ll “fail better” by just skipping loading the problem file. It’s not the most elegant way to do it—when you finally get to login to the site WordPress will complain to you about the missing file—but it does work. And in a desperate pinch, it’s a great little trick to have in your back pocket.