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.

Instructor

  • 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
Blog Rating
Subscribe
Notify of
61 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Matthew

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

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

THANK YOU!! Very helpful.

Jatin Gupta

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

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

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

abie.co.in

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

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

bikash dash

Thanks you save me from a heart attack!!

Crackethill

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

moclezo

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

thanks a lot.

Michaelk

amazing answer. thanks

jitttue

oh..my goddddddddddd

thanks you

thanks you!

Tanja

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

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

Suzi Williams

I could kiss you!

A

WOW thanks bro!!

iide dev

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

Vyacheslav Zgordan

Thank you! It has helped me.

Helen

You saved my day 🙂

Marco

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

Thank you so much!!!

GOING CRAZY

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

EmdadUllah

Many many thanks

Kor

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

KF

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

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

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

Matt Bennett

Amazingly simple and worked fantastic! Thanks for the tip!

Omnionn

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

Alexander

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

Hitesh Garg

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

Aguila Jackson

Thank you so much! It just saved my life!

Kenny Meyer

Thanks for the tip.

Anyonymous

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

Maja Grugel

Thank you!

steve

Sure thing, glad it was useful

D Grylas

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

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

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

Amol

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

Tamara Burgess

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

AppleGazin

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

Dom

Brilliant thank you!

sam

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

Harry

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

Yupeng

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

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

Thank you option #2 worked for me 

Sekar Mohan

Thanks a lot. Option 1 works for me

phyllis hollett

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

Thank you, this was very helpful!

Jason

This article was incredibly helpful. Thank you!

alexgoth

great it works with rename of folder -disabled

Joseph

Thank you for this article.

John Bremner

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