How to Disable a WordPress Plugin From the Database?

disable a plugin from wordpress database

WordPress plugins are a great way to add new functionality to your website. However, sometimes a plugin may cause issues that can’t be resolved through the WordPress dashboard. You may need to disable a WordPress plugin from the database in such cases.

What are the Top Reasons for Disabling WP Plugins from Database?

You might want to disable a WordPress plugin from the database for several reasons. For instance:

  • The plugin is causing your site to crash or behave abnormally, and you cannot access the WordPress dashboard to deactivate it.
  • The plugin is incompatible with your WordPress version or other installed plugins, and you want to remove it to avoid conflicts.
  • The plugin’s code interferes with your website’s functionality or security, and you must disable it immediately.
  • The plugin is no longer needed, but you cannot delete it because it stores important data in the database.

Whatever the reason, disabling a plugin from the WordPress database can help you resolve the issue quickly and efficiently.

How to Disable a WordPress Plugin from Database?

Before proceeding, it’s important to note that changing your WordPress database can be risky if you’re unfamiliar with the process. We recommend you completely backup your website and database before you begin. This way, you can restore your site to its previous state if anything goes wrong.

CREATE SAFE STAGING SITES AND PROTECT YOUR WEBSITE WITH WP STAGING. TRY IT NOW AND SEE THE DIFFERENCE FOR YOURSELF!

Top 4 Methods

Method 1: Disable all Plugins Using Cpanel

You can disable all WordPress plugins from the database using cPanel by following these steps:

  1. Log in to your cPanel account.
Log in to your cPanel, Disable WordPress Plugin from Database
  1. Navigate to the “Databases” section and click on “phpMyAdmin.”
click on phpMyAdmin
  1. Select the database that’s associated with your WordPress installation from the left-hand side.
  2. Click on the wp_options table, and then click on the “Browse” tab.
Click on the wp_options, Disable WordPress Plugin from Database
  1. Look for the active_plugins row and click on the “Edit” button.
Click on the active_plugins and edit button
  1. Delete the text in the option_value field.

This will disable all active plugins on your WordPress site. If you want to enable the plugins again, replace the text you deleted in Step 6 with the original plugin list and save the changes.

It’s important to note that this method will disable all plugins simultaneously, so it’s unsuitable if you want to disable a single plugin.

Method 2: Disable a Single Plugin Using Cpanel

  1. Log in to your cPanel account.
Log in to your cPanel
  1. Navigate to the “Databases” section and click on “phpMyAdmin.”
click on phpMyAdmin
  1. Select the database that’s associated with your WordPress installation from the left-hand side.
  2. Click on the wp_options table, and then click on the “Browse” tab.
Click on the wp_options
  1. Look for the active_plugins row and click on the “Edit” button.
Click on the active_plugins and edit button
  1. Disable the plugin

You’ll see a long string of text that looks like this:

a:3:{i:0;s:23:"akismet/akismet.php";i:1;s:37:"hello-dolly/hello.php";i:2;s:27:"wordpress-seo/wp-seo.php";}

A line in this string represents each plugin. To disable a plugin, you must find its corresponding line and remove it. For example, if you want to disable the Akismet plugin, you need to remove this line:

i:0;s:23:"akismet/akismet.php";

To remove the line, delete it from the string.

Be careful not to delete other lines or characters, which can cause errors! As it is easy to make errors here, using an online service that can automatically handle such serialized string changes is highly recommended. One of the most accessible and most popular free services is https://sciactive.com/phpserialeditor.php.

Disable WordPress Plugin from Database
  1. Once you’ve removed the line, click the Go button to save your changes.
Disable WordPress Plugin from Database

After disabling the plugin from the database, check your WordPress site to ensure it works properly. You can delete the plugin files from your WordPress directory if everything looks good.

Method 3: Using Adminer

Adminer is a free and open-source web-based database management tool, designed to handle multiple database management systems. It allows users to manage their databases through a graphical user interface. It provides a simple and easy-to-use interface for creating, editing, and deleting database objects, executing SQL queries, and managing data.

You can disable WordPress plugins using Adminer by following these steps:

  1. Download the latest version of Adminer from the official website (https://www.adminer.org).
Download Adminer File
  1. Upload the downloaded file to your WordPress site’s root directory using an FTP client or CPanel.
Upload Adminer File in Cpanel, Disable WordPress Plugin from Database
  1. Rename the file to something obscure; for example, my_adminer_file.php.
Rename Adminer File
  1. In your web browser, navigate to [yourdomain.com/my_adminer_file.php].
  2. You should now see the Adminer login page. Enter the database username and password to access the database.
Login into Adminer FIle
  1. Select the database that’s associated with your WordPress installation.
Select Your Database
  1. Click on the wp_options table, and then click on the “Edit” button next to the active_plugins row.
Click on the wp_option and Edit Button
  1. Delete the text in the option_value field and click on the “Save” button to disable all plugins.
Delete text Value Form option_value

This will disable all active plugins on your WordPress site. To enable the plugins again, replace the text you deleted in Step 4 with the original plugin list and save the changes.

Adminer is a powerful tool for managing databases, but be careful when making changes to the database, as incorrect changes can break your site.

Method 4: Using Hosting Account Like SiteGround

Here are the steps to disable a WP plugin from the database using SiteGround’s hosting account:

  1. Log in to your SiteGround hosting account’s control panel.
Login into SiteGround Account
  1. Under the “Websites” section, click on the “Site Tools” button next to the website where the plugin is installed.
Find Your Website and Click Site Tools
  1. Click on the “MySQL” option under the “Site” section.
Click MySQL Option Under the Site Section
  1. Under the “Tools” tab, click the “phpMyAdmin” option to launch the database management tool.
Click phpMyAdmin Tab, Disable WordPress Plugin from Database
  1. In the left-hand sidebar, click on the database for your WordPress website.
  2. Find the wp_options table and click on it to open it.
Find wp_options
  1. Look for the active_plugins option and click on the “Edit” button next to it.
Click on the active_plugins and Edit Button, Disable WordPress Plugin from Database
  1. This will open a window where you can edit the value of the “active_plugins” option. Delete the value that corresponds to the plugin you want to disable.
Delete text Form option_value, Disable WordPress Plugin from Database
  1. Click the “Go” button to save your changes.
Click the Go Button, Disable WordPress Plugin from Database
  1. Return to your WordPress website and check if the plugin has been disabled.

Conclusion

Disabling a WordPress plugin from the database can help you quickly resolve issues that cannot be fixed through the WordPress dashboard. However, it’s important to proceed cautiously and back up your website and database before making any changes. TRY WP STAGING FOR CREATING BACKUPS & STAGING ENVIRONMENT

Related Articles