Skip to main content

Disable a Broken WordPress Theme or Plugin Using Database

A broken WordPress plugin or theme can cause a website not to load correctly or result in the website showing a blank white page. There are different ways you can fix a broken plugin or broken theme in WordPress. Warning Before You Get Started: Revisions to your website, such as this process below, are considered major revisions. Please make a backup before you begin. You are welcome to attempt the most common methods to fix this issue. See the following blogs below, such as:

  • Activate and Deactivate a Theme or Plugin
  • Disable/Delete Themes and Plugins in WordPress
  • Troubleshooting: Issues with Theme or Images and Clear Cache

All of these can be done within the Account Manager and/or the WordPress dashboard. Occasionally, a broken theme or plugin will disable the site so badly that it's impossible to log in to fix the problem from the dashboard. If this is the problem, then there are two ways to repair the site manually:

  • Rename the folder that contains the plugin or theme
  • Enable/Disable WordPress plugins using the database

Most popular applications (such as WordPress, Drupal, and Joomla) can detect if a theme or plugin is missing.

  • Before You Start — Create A Full Backup
  • Rename the Folder Containing the WordPress Plugin or Theme
  • Renaming the Folder — WordPress Theme
  • Renaming the Folder — WordPress Plugin
  • Enable/Disable WordPress Plugins Using the Database
  • How to Locate the Database Name
  • How to Disable in Database — WordPress Theme
  • How to Disable in Database — WordPress Plugin
  • Summary

Before You Start — Create A Full Backup

Any modifications such as this are considered major, and you should ensure you have a full backup of your WordPress website, which entails website files and their related databases. Pro Tip: Make A Backup: In addition to making sure all your website components are up to date, such as any scripts, WordPress theme, and plugins you use, keep your website data and files protected in the event of accidents, data loss, injections, and hackers. Ensure that you perform a complete backup of your website files and databases daily for straightforward restoration. To know more about how to make a backup, check out these guides:

  • Setting Up CodeGuard for Backups
  • How to Backup & Restore WordPress using Jetpack - Backup and Restore
  • How To Backup Databases: How to Backup a MySQL Database
  • How To Restore Databases using Backup icon feature in cPanel: How to Restore a MySQL Database
  • To back up and restore your data using FTP: What is FTP? An Introduction to File Transfer Protocol

Rename the Folder Containing the WordPress Plugin or Theme

This section will help you locate and rename the folder for the WordPress plugin or theme.

Renaming the Folder — WordPress Theme

A simple way is to change the name of the problematic folder. If it's a problem with a theme, navigate to the correct directory. For WordPress, it's /wp-content/themes/ rename the problem directory and retest the installation. wp-content-themes rename Here's an example walkthrough of renaming the affected directory. Rename theme walkthrough

Renaming the Folder — WordPress Plugin

If the issue pertains to a plugin, go to the appropriate directory for that plugin and change the name of the problematic folder. In the case of WordPress, this is located at /wp-content/plugins/. wp-content-plugin rename Here's an example walkthrough of renaming the affected directory. wp-plugin-rename walkthrough To isolate the issue, you can do this on each plugin one at a time to see what’s causing the problem.

Enable/Disable WordPress Plugins Using the Database

This will show you how to enable or disable a WordPress plugin or theme using the database. Before you proceed, make sure to locate your Database Name.

How to Locate the Database Name

  1. Log in to your Bluehost Account Manager.

  2. Click Hosting in the left-hand menu. Bluehost Account Manager - Hosting Tab

  3. In the Hosting page, click the FILE MANAGER button.

  4. Locate and click the Settings button found on the top right-hand corner. cPanel -  File Manager - Settings

  5. Preferences windows will appear. Ensure that the Show Hidden Files (dotfiles) box and WebRoot (public_html or www) are selected in default. cPanel -  File Manager - Preferences

  6. Next, in your File Manager, locate and choose public_html.

  7. Find the wp-config.php file and click it.

  8. Right-click, then select edit , then click the edit button on the pop-up window. wp-config-gif

  9. Please take note of the database name. For example: edit database name walkthrough

How to Disable in Database — WordPress Theme

  1. Once phpMyAdmin is open with the correct database, find the right table. In most cases, this will be wp_options
  2. Choose to browse, then edit the template and the stylesheet tables. template stylesheet walkthrough
  3. Change the name to twentytwentythree (the current default WordPress theme), and click Go.
  4. Once updated, you can access the back end while making changes to your website.

How to Disable in Database — WordPress Plugin

  1. In phpMyAdmin, click the affected database name from the side navigation menu to the left.
  2. Click wp_options , then click > to go to the next page. Here, you can access the active_plugins option.
  3. Once you locate the active_plugins, click edit. phpmyadmin plugins walkthrough
  4. Under the active_plugins page, you will see lines of code, like the example below:
a:5:\{i:0;s:50:"google-analytics-for-wordpress/googleanalytics.php";i:1;s:19:"jetpack/jetpack.php";i:2;s:47:"mojo-marketplace-wp-plugin/mojo-marketplace.php";i:3;s:37:"optinmonster/optin-monster-wp-api.php";i:4;s:24:"wpforms-lite/wpforms.php";\}

active plugins page with lines of code

To enable the plugins, please follow the instructions starting from Steps 1-3, then paste the code you saved from your PC. Click Go to save changes. Troubleshooting Tips and Resources: If neither of these solutions fixed the WordPress broken plugin or theme, it's recommended to search at the source of the script as they provide support in the form of troubleshooting guides.

  • WordPress Support Forum.
  • Drupal Support Forum
  • Joomla Support Forum
  • Zen Cart Support Forum
  • OS Commerce Support Forum
  • Concrete5 Support Forum

Summary

To ensure your WordPress broken plugin or theme is fixed, there are different methods you can take to locate the specific issue and resolve the problem. This process involves various things you can try, from disabling/enabling a plugin or theme, renaming the folder containing the plugin or theme, updating the plugin or theme, or reaching out to support the source code creator. When implemented with other techniques, your website goes live and is back online. Other great tips as you build or edit your website can be found in this blog: Everything you Need to Know About WordPress SEO: Optimization Tips + Best Practices + Plugins.