How to Recover Your Website After a Plugin (or Theme) Breaks It

How to Recover Your Website After a Plugin (or Theme) Breaks It

You’ve just enabled a WordPress plugin, and now you can’t see your website’s front end. Or back end. Or both ends.

Whoops.

What just happened? It was just a simple plugin, how come it broke the whole website?

Well, plugins (and themes) do that sometimes. If it was poorly coded, or it conflicted with a poorly coded plugin or theme, or if it wasn’t coded to work on your hosting environment, it might break your website. And there’s nothing you can do about it.

Just kidding. There’s always a way. Take a deep breath, and let’s see how we can recover your WordPress website.

How to Recover a Broken WordPress Installation

First off,  we need to figure out what caused the problem.

What was the last thing you did before your website broke? Did you switch themes? Enabled a plugin? Enabled several plugins? Did you change any WordPress settings, or plugin options?

If it was a plugin (or several)…

If you remember which plugin (or plugins) you have enabled right before your website went down, good news! You can restore your website using FTP or SSH. Simply head over to the /wp-content/plugins/ directory and delete or rename the plugin folder(s). For example, if Akismet broke your website, you can rename the folder to /wp-content/plugins/akismet/ and visit your admin panel. Everything should be fixed now.

Oh, and if it’s because you’ve updated a plugin, well, revert back to the old version by:

  1. Heading over to wordpress.org/plugins and finding your plugin,
  2. Navigating to the “Developers” tab of the plugin’s pages,
  3. Downloading the older version,
  4. And uploading the archive contents into /wp-content/plugins/plugin-name/.

If it was a theme…

Thankfully, you can’t enable more than one theme, so if it was switching themes, it’s because of the theme you’ve just enabled.

Like what we did in plugins, connect to your FTP or SSH client and head over to the /wp-content/themes/ directory. Find the theme you enabled (If you can’t recognize the theme from the folder names, look for the style.css files in each folder to find the name of the theme you enabled) and rename the folder, then visit your admin page. You might not see the front end just yet, because there’s no enabled theme at the moment, but simply enabling your old theme would restore your website.

If it was a changed option…

Changing options might be a bit more tricky than simply renaming or deleting folders.

If you’ve changed a plugin’s settings (or a theme’s options), you’re in luck… sort of. Renaming folders will still work, but as soon as you re-enable the plugin or theme, you might break your website again.

If you’ve changed WordPress core settings (meaning your website’s settings), there’s nothing you can do with FTP or SSH.

In both scenarios, you need to get access to your website’s database, preferably with a GUI like phpMyAdmin.

First, export the tables to download a backup of your database! These are delicate data, and if you make it even worse, you might need that backup.

If you can, and have done so, head over to the wp_options table. (Warning: If you’ve set a different prefix for your tables for security purposes, look for the **_options table where the asterisks are that prefix.) Find out which field you’ve changed and if possible, revert it back to its original state. If you don’t remember, try emptying the field.

If nothing works…

If nothing works, you might need a professional to look after your website. First, contact your hosting provider to see if they have any earlier backups that you can use. If they can’t help you either, look for help on the internet.

Conclusion

Thanks for reading! If you liked the article, don’t forget to share it with your friends. And as always, we’re eager to know about what you think in the Comments section below.


We're part of the Asquared WordPress Agency. All rights reserved.