Introduction

One of the aspects of WordPress that has made it so popular as a website framework is the vast number of plugins available to enhance and expand just about every aspect of the base install. Occasionally a plugin doesn’t play well with others. It can do so in such a spectacular way that it crashes your site. Other times a subtle bug can drive you mad looking for the source. In both of these cases, the common advice is to disable all of your plugins and re-enable them one by one to find the culprit. This article talks about how to disable all of your plugins at once even if you cannot get into your admin screen anymore.

Prerequisites

– You will need an install of WordPress with access and rights to that directory.

While this tutorial is largely system agnostic, the explanatory screenshots are from Windows.

Step 1 – List Which Plugins To Reactivate

Many of us have plugins installed that are inactive. This tutorial will disable all of the plugins at once, so you will need to know which plugins you want to reactivate. If you still have access to your admin screen, make a list of the plugins that are active. If things are broken enough that you are unable to access your admin screen, you’ll get another chance to make that list in step 3 below.

Step 2 – Locate the Plugins Directory

Find the root of your WordPress install on the virtual private server. The root will have a bunch of .php files and the directories wp-contentwp-admin and wp-includes.

List of files in WordPress root directory

Go into the wp-content directory. Inside is a directory helpfully called plugins. This directory contains all of the PHP code for your plugins, activated or not.

Step 3 – Rename the Plugins Directory

Rename the directory from plugins to anything else. I like plugins-disabled, for clarity, but the method works fine with any name. By renaming the directory, we have removed the plugins from where WordPress looks for them without deleting any code.

Step 4 – Reload WordPress Admin Screen

This method relies on the way that WordPress checks to see if a plugin’s files exist before attempting to load it. When you reload the Admin screen, WordPress looks for plugins and cannot find them where it expects them to be (because we just renamed the directory). Because WordPress can’t find the plugins, it disables all of them in one fell swoop. You will see errors for each plugin deactivated this way (and here’s where you get that chance to list the plugins which were active if you didn’t or weren’t able to when you started this process). These are one-time errors.

Disable plugin error example in WordPress Admin

Step 5 – Restore Plugins

Rename the plugins-disabled directory back to plugins, and reload the admin page again. All of your plugins should reappear, but they will be in the deactivated state now.

Step 6 – Activate Plugins

Unless you to want to leave your site completely without active plugins, you can now activate them, one-by-one, testing the site until you find your problem.

Shortcut: Remove a Single Plugin

If you know that a specific plugin is causing the problem, you can remove just its directory from the /wp-content/plugins directory to achieve the same effect on a smaller scale.

Atlantic.Net

Atlantic.Net offers VPS hosting as well as managed hosting services which include a layer of business-essential managed services to your hosting packages. Contact us today for more information.