I recently tried to update one of my WordPress plugins that somehow managed to bring my whole site down. I was unable to go to wp-admin to disable the plugin. I had to first disable all the WordPress plugins manually (through phpMyAdmin on my server) so I can get to wp-admin page, and then reinstall the plugin that caused the problem.
The best thing about this approach is that you don’t lose your existing configuration settings for the WordPress plugins (except for the one that caused issues in the first place).
Here are the detailed steps on how I went about getting my site back up.
1. Disable all the WordPress plugins manually
- Go to the cPanel of your web-server, and click on phpMyAdmin.
- Click on the database for your wordpress
- All the wordpress plugins are specified in the
wp_options
table’s ‘active_plugins‘ row. We need to remove the entry for the problematic plugin from this row’s ‘option_value’ column, so WordPress will disable all the plugins. Run the following sql statement to obtain the ‘active_plugins’ row.
SELECT option_value FROM wp_options WHERE option_name LIKE '%active_plugins%'
You should get something like below that defines all the active plugins you had.
a:9:{i:0;s:19:"plugin1/plugin1.php";i:1;s:45:"plugin2/plugin1.php";}
- Update the active_plugins after removing the value for the pulgin that caused issues from the value above. In my case it was plugin1, so the sql to update the row looked as follows:
UPDATE wp_options SET option_value = 'a:9:{i:1;s:45:"plugin2/plugin1.php";}' WHERE wp_options.option_name = 'active_plugins';
Note that I removed the part that says “i:0;s:19:”plugin1/plugin1.php”;” from the original result I got.
2. Go to wp-admin section of your WordPress blog
If you followed all the above steps, you should now be able to go back to your WordPress blog and get it to load without any errors. Navigate to the wp-admin page for your blog and login as the WordPress administrator.
3. Re-enable all the plugins
At this point, WordPress would have disabled all your other plugins.
- Go to
Plugins->Installed Plugins
section under your Dashboard - Activate all the plugins, except for the one that caused problems
- Load the live site on a different browser/tab to make sure those plugins are workings
4. Fix the problematic plugin
If you want to keep using that plugin, the best way is to just delete the plugin and reinstall it. The downside is you will have to reconfigure the plugin to suit your needs!
Let me know if you have used any other means to solve the same issue!