Skip to content

How to enable WordPress plugins from the database?

Currently, WordPress is among the most commonly used blogging platforms, and at the same time, it is also used to develop websites. In general, WordPress has many aspects to it; however, the most awesome feature is the ability to expand site capabilities through plugins. At times, a person may require to enable or activate a plugin and he or she is unable to access it through WordPress dashboard. In such circumstances, one can enable the WordPress plugins from the database although the plugins section is unavailable. This solution, however, is not as efficient as the one that focus on options located in the WordPress dashboard; it is, however, possible.

By the way the handling of the database as should be pointed out comes with lots of risks in case one has no idea what they are doing. Prior to modifying the database, it is advisable to first back up your WordPress site’s blog.

 

To enable or activate WordPress plugins from the database, follow these steps:

 

Step 1: Access the WordPress Database

Making use of the WordPress database is the first step. Both a command-line interface, such as MySQL, and a program like phpMyAdmin can be used for this. Once gaining access to the database, you can move on to the following action.

Step 2: Locate the wp_options Table

Locate the wp options table in the WordPress database. All of the settings and choices for your WordPress site are kept in this table. Search for the value “active plugins” in the option name column.

Step 3: Update the Option Value

A serialized array of the plugins that are currently active on your website may be found in the option value column for the option name “active plugins.” You need to include a plugin’s file path in this array in order to enable or activate it.

For instance, to activate the Akismet plugin, add the following code to the option value field:

a:1:{s:8:”akismet/akismet.php”;b:1;}

This code adds the file path “akismet/akismet.php” to the active plugins array and sets its value to “1,” indicating that the plugin is turned on.

Step 4: Save Changes

After you have added the plugin to the active_plugins array, save the changes to the database.

Step 5: Verify Plugin Activation

The WordPress dashboard or a visit to your site can be used to confirm that the plugin is active. Your web server may need to restart or the cache has to be cleared if the plugin is not active.

Here’s a more detailed guide with sample code to help you activate WordPress plugins from the database:

Step 1: Access the WordPress Database

It is necessary to first gain access to the WordPress database using a tool like phpMyAdmin or a command-line interface like MySQL. Locate the “wp options” table after choosing the database that houses your WordPress website after you have access to it.

Step 2: Locate the active_plugins Option

Find the “active plugins” option in the “wp options” table. The active plugins on your site are stored in a serialized array using this option. Click the “Edit” button next to the “active plugins” row to see the option’s current value.

Step 3: Modify the Option Value

A plugin must be activated by adding the path to the plugin’s main file to the array and changing the value of the “active plugins” option. You might enter the following code in the option value field to enable the Akismet plugin, for instance:

a:1:{s:8:"akismet/akismet.php";b:1;}

The file path “akismet/akismet.php” is added to the active plugins array by this code, and its value is set to “1,” indicating that the plugin is turned on. The code portion that begins with “a:1:” denotes that there is only one element in the array, and the portion that follows, “b:1;,” changes the element’s value to true.

By using the same format, you can expand the array to include additional components if you wish to activate multiple plugins. For instance, you would add the following code to your website to make both the Akismet and Jetpack plugins active:

a:2:{s:8:"akismet/akismet.php";b:1;s:20:"jetpack/jetpack.php";b:1;}
Step 4: Save Changes

After you have modified the option value, click on the “Go” button to save the changes to the database.

Step 5: Verify Plugin Activation

To verify that the plugin is activated, go to the WordPress dashboard and check the “Plugins” page. You should see the plugin listed as enabled. Alternatively, you can visit your site and check if the plugin is working as expected.

Conclusion

If you are unable to access the WordPress dashboard, you may be able to activate WordPress plugins from the database. Yet, it’s crucial to exercise caution when working with the database because a mistake could have a negative impact on your website. Always create a backup of your website before making any database changes, and if you’re not confident working with databases, think about getting help from a professional. More info Contact Us

Categories

Featured Products

Recommended Posts

1 Comment

  1. Hello, i feel that i saw you visited my blog so i came
    to return the want?.I’m attempting to to find things to improve my web site!I suppose its
    good enough to use some of your ideas!!


Add a Comment

Your email address will not be published. Required fields are marked *