Deactivate And Activate All Plugins Of WordPress Via Database Or PHPmyadmin

Hi Friends, In this article I am going to explain you how we can enable or disable all wordpress plugins via database or phpmyadmin. Now you ask why you want to do this via database and phpmyadmin because we can do it via wordpress admin, but I need this because I was not able to login into admin of wordpress and that is because of one plugin, One plugin having problems in some code and that’s why it was giving error on admin main page and not showing login page, So it was little bit critical and I need to solve it asap. I was not able to login in admin, So it is not possible for me to deactivate plugin via admin and thats why I need to deactivate all plugins via database or phpmyadmin.

So to do this I open phpmyadmin or our database in any other interface. then I find ‘active_plugins’ option name in ‘wp_options’ table by query given below :

SELECT * FROM wp_options WHERE option_name = 'active_plugins';

Now when I found this row by above query I clicked on edit to edit this row. When I clicked on edit I found one string in ‘option_value’ field given below :


Above string is showing me activated plugins on my website, in your case it might be different because it is obvious that you are using different plugins then me. Now cut that string from there and saved it anywhere for later use when we want to enable all plugins again. Now after cut that string from ‘option_value’ save it and then I try to access site, Voila! that plugins error gone because i deactivated all plugins by phpmyadmin.

Now if I want to activate or enable all plugins again via phpmyadmin or database then do same things and after clicked on edit just paste that string to ‘option_value’ which saved for later use. In this way you can activate all plugins again by phpmyadmin or database.

Second method to deactivate or disable all plugins is just rename ‘wp-content/plugins/’ folder. You will have to manually reactivate the plugins after you rename the plugins folder back to its original name, but all plugin options are preserved too.

I hope this post helpful for someone. If you have any question then you can ask me anytime or post it in comment.

Also I am WordPress Developer, Freelance PHP Developer having more than 3 years of experience, So if you want to do any projects then you can contact me.

Hostgator Hosting in 1 Cent Coupon Code – “1CENTHECOUPON” (Without Quotes).

  • Allampatu

    how can i do if i would like to activate just one plugin?

    • Yes,Deactivate and activate all plugins

  • Great tip! It will be quiet useful to me and I am surely gonna try this out.
    Well Thanks for sharing!

  • I really liked the article and also the tips, very cool blog

  • Vedvard

    You are a very persuasive writer. How do I know? Because I am usually unwaivering when it comes to my opinions. You made me rethink my thoughts on this topic. Thanks a lot for the article.