Disable a WordPress Plugin Without Access to Your Admin Area

Disable a WordPress Plugin Without Access to Your Admin Area

Normally, disabling a WordPress plugin is very simple and straightforward.

How easy? You can login to your admin area, click the “Plugins” tab and click “Deactivate” next to the plugin.

You can see an example below with Google Analytics.

Disable a WordPress plugin

However, sometimes a plugin can make things more complicated and cannot be easily disabled. This is a very useful guide to rolling back a bad WordPress plugin udpate.

Some plugins can cause problems with logging into your admin area. That’s exactly what happened to one of our members. They changed a setting inside a plugin and suddenly started getting these errors when trying to login.

So, what do you do if you can’t login to your WordPress admin and disable a plugin? You have two choices:


Option #1: Disable the Plugin Files

The easier of the two options is to disable the plugin’s files.

  • Login to your site’s files using the file manager provided by your webhosting company or using an FTP program such as Filezilla.
  • Browse to the /wp-content/plugins/ folder.

The akismet plugin folder in /wp-content/

  • Find the folder of the plugin you wish to disable.
  • Rename that folder as in the image below:
A renamed version of the akismet plugin folder

Try to login to your WordPress site. You should get a message telling you that the plugin has been disabled.

Now you can set up about solving the initial problem with the plugin, either by deleting the plugin entirely or by researching and fixing the initial error.


Option #2.: Disable via the Database

The second option is more complicated and that is to disable the plugin via the database. First, you’ll need to access the database for your WordPress site. phpMyAdmin is a popular tool for this that’s provided by many hosts and it’s the one we’ll use in this tutorial.

Once you’ve logged into the database, look for the wp_options table:

The wp_options table in the WordPress database

You’re looking for a row with the option called active_plugins as below:

The active_plugins table in the WordPress database

If you want to turn off all the plugins on your site, you can simply delete this entire row by clicking on the red X button beside it. This sounds like a drastic action, but isn’t really so bad and won’t cause any lasting harm. Yes, all your plugins will be disabled, you can quickly login to WordPress and re-enable them.

Disabling all your WordPress plugins via the database

If you want to disable just one plugin, click on the pencil icon instead:

Disabling one WordPress plugin via the database

You’ll now see a screen like the one below:

the active_plugins data in the WordPress database

All you need to do here is change one thing. Change the a:1 before your plugin name to a:0.

So in this example, the original line is:

disabling a WordPress plugin

You will change that to line to this one:

changing your WordPress database to disable a plugin

To save your changes and finish disabling the plugin, click Go in the bottom-right corner.

Save your WordPress database changes

Now you can set up about solving the initial problem with the plugin, either by deleting the plugin entirely or by researching and fixing the initial error.

Author

  • Steve Burge

    Steve is the founder of OSTraining. Originally from the UK, he now lives in Sarasota in the USA. Steve's work straddles the line between teaching and web development.

0 0 votes
Article Rating
Subscribe
Notify of
61 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Matthew
Matthew
12 years ago

Thank you for this article. I was pulling my hair out trying to figure out how to access my admin area. Some wp plug-ins truly suck! Thanks again!

Nick
12 years ago
Reply to  Matthew

You’re very welcome, Matthew! Glad you got thing sorted! 🙂

You should check out our WordPress Beginner and Intermediate classes at [url=http://www.ostraining.com/online]www.ostraining.com/online[/url]

Kind regards,

Nick

Julie
Julie
11 years ago

THANK YOU!! Very helpful.

Jatin Gupta
Jatin Gupta
11 years ago

this tutorial not works on WordPress 3.4.1.

because there no active_plugins in wp_options table: please reply me…

i want to disable single wp plung-ins…

Bandar
Bandar
10 years ago
Reply to  Jatin Gupta

I have the same issue on 3.5+, and i’m re-uploading the files through ftp, if there is no luck then I hope to find the answer in this post!

Thanks
** Update **
The fix of this issue is by going to FTP/File Manager and then rename the plugins folder for example to (pluginsX), then access your wp-admin and voila it works!
Now set back the folder name to plugins, and from the dashboard you will find all the plugins are deactivated.
I strongly refer the issue to the running php version of the server, it if was higher than 5.2.17 then it will cause the blank issue.
Regards,

Bandar
Bandar
10 years ago
Reply to  Jatin Gupta

I had contributed the solution here but i think it was deleted by the mod.

abie.co.in
abie.co.in
6 years ago
Reply to  Jatin Gupta

Go to DataBase/phpmyadmin and click on search button, search the term plugin,

Browse it where ever it shows in the result.
You can find it for sure, it will be inside table_options by the way.

pedro
pedro
11 years ago

Thank u very much this info was extremely useful thank u again

bikash dash
bikash dash
11 years ago

Thanks you save me from a heart attack!!

Crackethill
Crackethill
11 years ago

BRILLIANT!! I used choice #2 and it works just fine. Thanks a million.

moclezo
moclezo
11 years ago

THANKS THANKS VERY VERY much, I come from Kenya and I was in q lot of stress after my site crashed,I tried several sites and they were not giving more options and step by step approach,am extremely happy,thanks

mohan
mohan
11 years ago

thanks a lot.

Michaelk
Michaelk
10 years ago

amazing answer. thanks

jitttue
jitttue
10 years ago

oh..my goddddddddddd

thanks you

thanks you!

Tanja
Tanja
10 years ago

A Twitter plug in for my wordpress (GoDaddy hosted) site would not let me access my wordpress ADMIN dashboard. Your article saved my butt. Thank you very much.

Kiran Kumar
Kiran Kumar
10 years ago

Thank you, the first method is working very fine. 🙂

Suzi Williams
Suzi Williams
10 years ago

I could kiss you!

A
A
10 years ago

WOW thanks bro!!

iide dev
iide dev
10 years ago

Thank Very Much Steve….Generally I never prefer to comment on blogs but you obliged me to comment….Thanks Again

Vyacheslav Zgordan
Vyacheslav Zgordan
10 years ago

Thank you! It has helped me.

Helen
Helen
9 years ago

You saved my day 🙂

Marco
Marco
9 years ago

If you have more than one plugin active, the database approach works a little different. You have to count down the number after ‘a:’ by one and delete the corresponding entry. For instance, to deactivate the https plugin in the following configuration
a:5:{i:0;s:59:”2-click-socialmedia-buttons/2-click-socialmedia-buttons.php”;i:1;s:29:”antispam-bee/antispam_bee.php”;i:2;s:17:”openid/openid.php”;i:3;s:65:”subscribe-to-comments-reloaded/subscribe-to-comments-reloaded.php”;i:4;s:35:”wordpress-https/wordpress-https.php”;}
change the entry to this:
a:4:{i:0;s:59:”2-click-socialmedia-buttons/2-click-socialmedia-buttons.php”;i:1;s:29:”antispam-bee/antispam_bee.php”;i:2;s:17:”openid/openid.php”;i:3;s:65:”subscribe-to-comments-reloaded/subscribe-to-comments-reloaded.php”;}

Vee
Vee
9 years ago
Reply to  Marco

Thank you so much!!!

GOING CRAZY
GOING CRAZY
9 years ago

THANKS A MILLION!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

EmdadUllah
EmdadUllah
9 years ago

Many many thanks

Kor
Kor
9 years ago

Thank you so much! Disabled it using the first method.

KF
KF
9 years ago

Saved my site…..make sure if you have mulitple plugins, you change the number at the start so it’s one less.
Before
a:29:{i:0;s:15:”worker/init.php”;i:1;s:29:”gravityforms/gravityforms.php”;i:2;s:23:”SD-mobile-nav/index.php”;i:3;s:37:”acf-options-page/acf-options-page.php”;i:4;s:29:”acf-repeater/acf-repeater.php”;
After
a:28:{i:0;s:15:”worker/init.php”;i:1;s:29:”gravityforms/gravityforms.php”;i:2;s:23:”SD-mobile-nav/index.php”;i:3;s:37:”acf-options-page/acf-options-page.php”;i:4;s:29:”acf-repeater/acf-repeater.php”;

Daniel
Daniel
9 years ago

Hi, It’s anyway to do this around? To get the code line to activate a specific plugin? Imagine W3 Super Cache is installed but not active and we wanna do this way, through phpmyadmin without having the option_value for that plugin. Thank you.

Ashley
Ashley
9 years ago

I cannot say thank you enough. I totally bombed my site and this fixed it!

Matt Bennett
Matt Bennett
9 years ago

Amazingly simple and worked fantastic! Thanks for the tip!

Omnionn
Omnionn
8 years ago

Thank so much for taking the time to help me and other. Well explained. You gave me back my WP! 🙂

Alexander
Alexander
8 years ago

if you have access to console, just install wp-cli and run `wp plugin deactivate %plugin_name%`

Hitesh Garg
Hitesh Garg
8 years ago

Thanks a ton… That was actually a life saver .. Wp-cache-plugin was driving me crazy..

Aguila Jackson
Aguila Jackson
7 years ago

Thank you so much! It just saved my life!

Kenny Meyer
Kenny Meyer
7 years ago

Thanks for the tip.

Anyonymous
Anyonymous
7 years ago

Yes!! Yes!! Thank you so dearly much! Bless you

Maja Grugel
Maja Grugel
7 years ago

Thank you!

steve
steve
7 years ago
Reply to  Maja Grugel

Sure thing, glad it was useful

D Grylas
D Grylas
7 years ago

I used option 1 and it worked, was able to log into back end.
Then while in back end went back to ftp and removed the word disabled and tried to activate plugin but got a message saying:

Plugin could not be activated because it triggered a fatal error.
Warning: require_once(/home/content/p3pnexwpnas04_data02/85/3015185/html/wp-content/plugins/photo-gallery-free-dev-9196c242eefda8c0dd0e9a98a6e4fb938e2b07bf/framework/BWGOptions.php): failed to open stream: No such file or directory in /home/content/p3pnexwpnas04_data02/85/3015185/html/wp-content/plugins/photo-gallery-free-dev-9196c242eefda8c0dd0e9a98a6e4fb938e2b07bf/photo-gallery.php on line 43
Fatal error: require_once(): Failed opening required ‘/home/content/p3pnexwpnas04_data02/85/3015185/html/wp-content/plugins/photo-gallery-free-dev-9196c242eefda8c0dd0e9a98a6e4fb938e2b07bf/framework/BWGOptions.php’ (include_path=’.:/usr/local/php5_6/lib/php’) in /home/content/p3pnexwpnas04_data02/85/3015185/html/wp-content/plugins/photo-gallery-free-dev-9196c242eefda8c0dd0e9a98a6e4fb938e2b07bf/photo-gallery.php on line 43

Nick
7 years ago
Reply to  D Grylas

Hi D,
Please make sure you’re running the latest version and/or contact the developer of the photo-gallery-free plugin about the bug. They’ll be able to get it fixed for you.

Susy Simc-Geissinger
Susy Simc-Geissinger
7 years ago

So glad I found this article. This solution helped me solve the locked out site, plugin error message within minutes.

Amol
Amol
6 years ago

Thank you for this article – it was very helpful. the plugin was pulling my site down.

Tamara Burgess
Tamara Burgess
6 years ago

Thanks for this article, it saved my bacon, eggs and mushrooms. Very helpful!

AppleGazin
AppleGazin
6 years ago

Thank You. Akismet update blew up on me and renaming it saved my bacon.

Dom
Dom
6 years ago

Brilliant thank you!

sam
sam
6 years ago

This is very important interview question ,I have asked more time. Thank you very much

Harry
Harry
6 years ago

Thank you for this great article! It saved me.
Activated a plugin and got locked out from the admin area.

Yupeng
Yupeng
6 years ago

Thank you SO MUCH. I just installed the “Simple LDAP login” plugin, and the “LDAP exclusive” option was turned on by default. When I logged off I could no longer log in.

You literally saved my life, I’ll give you a cookie.

Scott Lewis
Scott Lewis
5 years ago

This article is very misleading. The approach described here only works if you have only 1 plugin activated. The data the author is manipulating is a serialized PHP array. Changing the “a:1” to “a:0” truncates the array telling PHP/WP that the array is empty. If you have more than one plugin installed it will disable all of your plugins not just a single one as the title implies. Manually editing a serialized object is possible but only if you fully-understand the syntax of the serialized object. It is also very risky. It would be better to deleted everything from “i:0; s:19:”akismet/askisment.php”;

In a serialized object, the “a:1” means “This is an array with 1 item”. Inside the array, the “i:0” means “Integer 0” (or the 0th index of the array). The “s:19” means “What follows is a string 19 characters long”.

No doubt that this article has caused a lot of frustration for a lot of people who thought changing a single character would disable a single plugin.

Harish Rampure
Harish Rampure
5 years ago

Thank you option #2 worked for me 

Sekar Mohan
Sekar Mohan
5 years ago

Thanks a lot. Option 1 works for me

phyllis hollett
phyllis hollett
5 years ago

Thank you for this as for some reason I was not able to get rid of a certain plugin, and messing it around with it for way to long, and got this voila and it was gone.Thanks 

Bruce Kelley
Bruce Kelley
4 years ago

Thank you, this was very helpful!

Jason
Jason
4 years ago

This article was incredibly helpful. Thank you!

alexgoth
alexgoth
4 years ago

great it works with rename of folder -disabled

Joseph
Joseph
4 years ago

Thank you for this article.

John Bremner
John Bremner
4 years ago

I was completely blocked by from my admin because I forgot my Shield password. Searched online and this is the only thing that saved me. Thanks so much for this great guide. I’m hopeless at databases, but your guide is just simply easy and brilliant! Will reinstall shield and ensure a password that I have written down and can remember. Even deleting Shield by ftp doesn’t disable it!!!!!!

61
0
Would love your thoughts, please comment.x
()
x