How to Activate WordPress Plugin Manually Through phpMyAdmin

WebTechRiser.com > WordPress > How to Activate WordPress Plugin Manually Through phpMyAdmin

Something went wrong on the long road from New York to California while I was deactivating a plugin used by my WordPress website. And, it made the whole front page of my website look blank. I couldn’t figure out exactly where the mistake was.

Anyway, I opened phpMyAdmin to check the website’s database. I checked the value of the option_value column of the active_plugins row in the option_name column in the *** _ options table of the database.

The SQL command to find this value is:

SELECT option_value FROM wtr_options WHERE option_name = 'active_plugins'

The result of the query will look like the following image:

How to Activate WordPress Plugin Manually Through phpMyAdmin

The value I found in the option_value column is as follows:

a:5:{i:0;s:37:"breadcrumb-navxt/breadcrumb-navxt.php";i:2;s:27:"redirection/redirection.php";i:4;s:31:"shared-counts/shared-counts.php";i:5;s:49:"webtechriser-companion/webtechriser-companion.php";i:6;s:41:"wtr-articlemegabox/wtr-articlemegabox.php";}

WordPress stores the information of the active plugins in the _options table as serialized data. WordPress generates this data using the serialize function of PHP. Of course, WordPress has its own maybe_serialize wrapper function for creating serialized data.

I formatted this serialized data for ease of understanding. Here is what I found:

a:5:{
    i:0;s:37:"breadcrumb-navxt/breadcrumb-navxt.php";
    i:1;s:27:"redirection/redirection.php";
    i:2;s:31:"shared-counts/shared-counts.php";
    i:3;s:49:"webtechriser-companion/webtechriser-companion.php";
    i:4;s:41:"wtr-articlemegabox/wtr-articlemegabox.php";
}

Here, a:5 with WordPress means that 5 plugins are currently being used on this site. Indicates the number of plugins from i:0 to i:4 in the curly bracket ({…}). In the first item, the semicolon next to i:0 is followed by a string with “s” in s:37, and the number “37” indicates the path of the plugin and the length of the plugin’s file name.

Here I found that the name of one of my plugins is not in this entry. So, I replaced a:5 with a:6. I added another item entry in the curly bracket.

a:6:{
    i:0;s:37:"breadcrumb-navxt/breadcrumb-navxt.php";
    i:1;s:27:"redirection/redirection.php";
    i:2;s:31:"shared-counts/shared-counts.php";
    i:3;s:49:"webtechriser-companion/webtechriser-companion.php";
    i:4;s:41:"wtr-articlemegabox/wtr-articlemegabox.php";
    a:5;s:39:"q2w3_fixed_widget/q2w3_fixed_widget.php";
}

Caution

Your website may not work properly if the values you changed in the database are incorrect.

Also read:  30+ Best Free WordPress Themes (Updated)

I recommend backing up your site files and databases before making any changes to the database, so that, if something goes wrong, you can restore your site from backup.

Category WordPress

Leave Your Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.