WordPress: How to Disable Plugin


One day, my WordPress shows Sorry, your request cannot be accepted, and I can’t log in to the site. I summarized how to do in such cases.

If you got the message as I got, I recommend you to try the following. In my case, IP GEO Block plugin wqs the reason.

The message I got

Sorry, your request cannot be accepted.

« Back

Solution

If you could login and disable IP GEO Block plugin, it’s simple. But probably you can’t. So change the database or file.

Disable plugin in the database

Plugin valid and invalid is controlled in wp_options table in the database. The head of the table name, wp_, can be different according to the configuration in installation.

The following SQL disables all plugin, but in my case, another plugin error appeared when I execute it.

I disabled only one plugin, IP GEO Block. You have to some modification for disabling only one plugin. Get information about valid plugin as follows.

See the value of the column, option_value. It is like as follows.

Numbers and letters in the value can be different according to plugins you are using. Change the value as follows.

  1. Head number next to a: shows the number of valid plugins. Reduce it by 1.
  2. Delete the part, i:2;s:29:"ip-geo-block/ip-geo-block.php";.
  3. Reduce every number after the deleted position and just after i: by 1.

As a result, the value is modified as follows.

Then put this value into the database through MySQL Admin or by SQL.

After that, you can login and enable the disabled plugin. I solved in this way.

Disable plugin from the file system

Remove or rename the plugin directory in wp-content/plugins.