Quickly disable a WordPress plugin via the database
PDFRecently my WordPress instance crashed due to a faulty plugin update, resulting in a PHP error and rendering my blog useless. After overcoming the initial panic reaction, I realized i didn’t need to dive into the PHP code just yet: I could just disable the plugin in the database instead.
Here’s how, given you have access to the database.
In the database you are using, mySql in my case, go to the table “wp_options”. Now look for the row with the active plugins:
1 | SELECT * FROM wp_options WHERE option_name = 'active_plugins'; |
This should give you a row where the option_value column is something like the following (reformatted for readability):
1 2 3 4 5 6 | a:4:{ i:0;s:19:"akismet/akismet.php"; i:1;s:36:"google-sitemap-generator/sitemap.php"; i:2;s:55:"google-syntax-highlighter/google_syntax_highlighter.php"; i:3;s:29:"wp-swfobject/wp-swfobject.php"; } |
I think you get the idea: decrease the a:x number by 1, remove a plugin entry and renumber the remaining items. Removing the sitemap plugin would look as follows:
1 2 3 4 5 | a:3:{ i:0;s:19:"akismet/akismet.php"; i:1;s:55:"google-syntax-highlighter/google_syntax_highlighter.php"; i:2;s:29:"wp-swfobject/wp-swfobject.php"; } |
You can also simply delete the entire field to disable all plugins, as Jeff mentions.
Tags: wordpress
Cathy
Thank you Benny. You are a life-saver! I just tried the wp phpbb bridge. Bad mistake. I used your notes above to get myself out of trouble. Cheers!
Paul Weber
Had exactly the same problm (and precisely your same doubt) when my client updated his plugins and one of them (Ultimate Shortcodes) went beserk.
Client was totally locked out of site, including the backend, so I had to kill the plugin through WP’s database.
And yes I too do advise to copy the data to a text editor and to order the plugins in order to avoid accidentally deleting a semicolon etc.
Cheers
Paul
Pingback: Solving the White Screen of Death | X Theme Community