WordPress deactivate a plugin via database?

2019-03-14 08:02发布

I have a wordpress script, wp-supercache, that I need to disable (as its cached on a nasty error), however, the error is causing the wp-admin redirect to fail, which means I can't get into the site to disable the plugin.

Any advice? I can access the database via cpanel.

标签: php wordpress
10条回答
趁早两清
2楼-- · 2019-03-14 08:35

Another way to do this is you can backup the site and then just rename the folder of the plugin under /wp-content/plugins/ to some other name . So the plugin will be disabled. I wont prefer deleting the plugin folder as it may cause errors. After the step is done log in to your wordpress site and delete the plugin from there

查看更多
太酷不给撩
3楼-- · 2019-03-14 08:43
  1. Backup database or just the wp_options table
  2. SELECT option_value FROM wp_options WHERE option_name = 'active_plugins';

  3. Copy selected string (serialized string) and paste in the left side at https://serializededitor.com/
  4. Remove the line which plugin you want to deactivate
  5. Copy the serialized result string from the right side and update active_plugins value with it.

    UPDATE wp_options SET option_value = 'THE_NEW_SERIALIZED_STRING' WHERE option_name = 'active_plugins' LIMIT 1;

查看更多
一纸荒年 Trace。
4楼-- · 2019-03-14 08:46

I wrote a little exe in .dot to repair/remove options string from database.

  1. Download exe here
  2. Run on MySQL server

SELECT * FROM wp_options WHERE option_name = 'active_plugins';

  1. Paste Results in textbox, press parse.
  2. Remove the ones you don't want.
  3. Click output, it copies output to clipboard
  4. replace brackets inside the single quotes below with output and Run on MySQL server

UPDATE wp_options SET option_value = '[replace inside single quotes with your output' WHERE option_name = 'active_plugins';

  1. No warranties... I don't claim to be programmer

enter image description here

查看更多
迷人小祖宗
5楼-- · 2019-03-14 08:46

To disable all Wordpress plugins on your site:

  1. Login to your database management tool (e.g. PHPMyAdmin)
  2. Execute the following query:

UPDATE wp_options SET option_value = '' WHERE option_name = 'active_plugins';

查看更多
该账号已被封号
6楼-- · 2019-03-14 08:47

You just need to change the values in the record "active_plugins" in the database. You can find the process Here

查看更多
▲ chillily
7楼-- · 2019-03-14 08:51

Try re-naming the folder of the plugin and then see if error is gone (make backup first of course.). If that does not help, here is the solution then.

查看更多
登录 后发表回答