A WordPress plugin broke your site? It usually happens right after you install, activate or update plugins. To fix it, you need to work out which plugin is responsible and deactivate it, then decide whether to go back to an earlier version, wait for an update that fixes the problem, or replace it with a different plugin.
WordPress gives you several tools for finding the culprit: the Recovery Mode email, the debug log, deactivating plugins by renaming their folder, and the Site Health screen. Before you use any of them, take a full backup, and then go through the steps in order.
If the site is not just showing an error on one page but has crashed completely, first go through the checks in the guide my website is down, and only then come back to hunting for the plugin.
Step 1: back up before you touch any plugin
The WordPress documentation says that before an update, manual or automatic, you should back up both the files and the database. The same applies to a fix. You are about to change files, and if something goes wrong you need a point to return to.
If the admin area works, a backup plugin such as UpdraftPlus can do this with one click. If not, download wp-content and wp-config.php over FTP, and export the database from phpMyAdmin using the Export tab.
Step 2: what changed recently, and automatic plugin updates
The first question is what changed since the site last worked. A new plugin? An update? And if you did not update anything by hand, the update may have been automatic. Since version 5.5 you can turn on automatic updates for each plugin separately, in the automatic updates column of the Plugins screen.
According to the WordPress documentation, by default an email is sent to the site owner after every automatic update attempt, whether it succeeded or failed. So look for such messages in the site admin’s inbox and see which plugin was updated close to the moment the problem started.
WordPress also does some things for you. Since version 6.6, automatic plugin updates have a rollback mechanism that restores the previous version if the update breaks the site. Since version 6.3, even with a manual update, if the update process itself fails halfway, WordPress restores the version that was installed. But if the update completed and the problem only shows up later, for example on a certain page or in a form, no mechanism will roll it back for you.
Step 3: the Recovery Mode email
If the site shows the message “There has been a critical error on this website”, WordPress has sent an email to the site admin address since version 5.2. The email has details about the error and a link to Recovery Mode.
Sometimes a problem plugin does not show that message at all, and you get a general server error such as a 500 error or 503 Service Unavailable. The plugin can still be the culprit, but the diagnosis is a little different, and it is covered in the separate guides on each of those errors.
When the email arrives, click the link. In this mode the plugins causing the error are paused only for you, and you can log in to the admin area and deactivate the problem plugin. Visitors to the site will keep seeing the error until you deactivate it.
Step 4: the debug log, to see which plugin appears in the error
When there is no email, or it is not clear from the email what happened, turn on error logging. In the wp-config.php file in the main folder of the site, add these lines before the line that starts with /* That's all, stop editing!:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
If the file already has a WP_DEBUG line, change it rather than adding a second one. Then reload the broken page and open wp-content/debug.log.
In the PHP Fatal error line you will see a path to a file. If it starts with wp-content/plugins/, the name right after it is the folder of the plugin at fault.
And do not forget to turn the log off at the end. The WordPress documentation does not recommend leaving debugging tools active on a live site, and Site Health warns that the log file may be accessible to everyone. So set WP_DEBUG back to false and delete the file.
Step 5: a WordPress plugin conflict, and how to find the problem pair
Sometimes no plugin is broken on its own, and the problem only appears when two work together. The WordPress documentation notes, for example, that a Publish or Save Draft button that does not work is usually caused by two plugins trying to use the same resources, and the solution it suggests is to deactivate plugins one by one until you find the source.
When you have access to the admin area, do it on the Plugins screen: deactivate one plugin, check the problem, and move on to the next. When the problem disappears, the last plugin you deactivated is one of the two. Activate it again on its own, then activate the others one by one to find its partner.
When you have no access to the admin area, log in over FTP or the file manager, go to wp-content and rename the plugins folder to plugins.hold. This deactivates all plugins. Once you are in the admin area, rename the folder back to plugins. According to the WordPress documentation, the plugins will stay deactivated and their settings are kept, and then you activate them one by one. If you already know the suspect, you can rename just its folder.
Step 6: compatibility with your PHP and WordPress versions
Every plugin defines its requirements in its main file. Requires at least is the lowest WordPress version it works on, and Requires PHP is the minimum PHP version. On the plugin’s page at wordpress.org this data appears under WordPress version, PHP version and Tested up to, next to Last updated.
You can see the PHP version running on your site under Tools > Site Health > Info, in the Server section, and compare it with the plugin’s requirements. If the problem started after your hosting company upgraded the PHP version, this is probably the direction to look in.
The solution is to update the plugin to a version that supports your PHP version. If there is none, you have to choose between an alternative plugin and changing the PHP version with your hosting company, and that decision affects the whole site, not only the plugin.
Step 7: going back to an earlier version of the plugin
When the latest update is the problem and you need the plugin working now, you can install an earlier version. With WP-CLI it looks like this, replacing plugin-slug with the plugin’s folder name and the number with the version that worked:
wp plugin install plugin-slug --version=1.2.3 --force
The --version option downloads that version from wordpress.org, and --force overwrites the installed version without asking. This only works for plugins from the wordpress.org repository. For a paid plugin you need to get the zip file of the earlier version from the vendor.
Before you choose which version to return to, read the changelog on the plugin’s page at wordpress.org, under the Development tab. It says what changed in each version, and sometimes whether your problem was already fixed in a newer one.
An old version is a temporary solution. In the meantime, turn off automatic updates for this plugin so it does not jump back to the broken version, and keep an eye out for the next release.
Before you install a new WordPress plugin
Some problems can be prevented at the choosing stage. The WordPress Site Health screen reminds you that plugins have deep access to your site, so it is important to keep them updated. The same logic applies before installation, because every plugin you add is more code running on every page load.
Before installing, open the plugin’s page at wordpress.org and look at three things. Last updated shows whether anyone still maintains it. Tested up to shows whether it was tested against a current WordPress version. And PHP version shows whether it fits the version running on your site. If you already have a plugin that does the same thing, it is better not to add another for the same job, because every extra plugin is one more thing to check when something breaks.
And if you can, install and update in a staging environment first, not on the live site. That way a problem plugin breaks there, and not in front of your customers.
When to stop and call an expert
- There is no backup, and no way to create one before you start.
- The problem plugin is the foundation of the site, like WooCommerce or your page builder, and deactivating it takes the whole site down.
- The error in the log points to custom code written specifically for your site.
- The earlier version does not work with your current PHP version, and the new one is broken.
- There are signs of a hack: a plugin you did not install, new admin users or foreign files.
In these situations every further attempt can make things worse. And even when someone else is handling it, a full backup comes first.
Frequently asked questions
How do I know which WordPress plugin broke my site?
Start with the Recovery Mode email that WordPress sends to the site admin. If there is no email, turn on WP_DEBUG_LOG and check wp-content/debug.log to see which folder under wp-content/plugins appears in the error.
What is a WordPress plugin conflict?
A situation where each plugin works on its own, but when two are active together something breaks. You find the pair by deactivating and activating plugins one by one.
Should I turn on automatic plugin updates?
The WordPress documentation recommends keeping plugins updated to the latest version for security reasons, and since 6.6 there is a rollback if an automatic update breaks the site. Before you turn it on, the documentation recommends making sure you have automatic backups you can return to.
Does deactivating a plugin delete its settings?
Deactivating by renaming the plugins folder keeps the settings, according to the WordPress documentation. Deleting a plugin is a different story, so during diagnosis you deactivate and do not delete.
How do I deactivate a plugin without access to the dashboard?
Over FTP or the file manager, rename the plugin’s folder inside wp-content/plugins, or rename the whole plugins folder to deactivate all plugins.
Can I go back to an earlier version of a plugin?
Yes. For plugins from wordpress.org you can install a specific version with the wp plugin install command and the –version option. For a paid plugin, ask the vendor for the earlier version file.
Found the plugin but not sure what to do about it, or the site still will not load? Get in touch and I will take care of it.
Sources: the common troubleshooting FAQ in the WordPress documentation and the official guide to automatic plugin updates.
