Skip to content
Help Center
  • Pricing
  • ProductsExpand
    • Premium PlansGet all the tools you need in one plan
    • Kadence ThemeLightning-fast performance theme for modern websites
    • Kadence BlocksDrop in ready designs with advanced controls for pixel perfect websites
    • Kadence Shop KitCreate a more effective WooCommerce shopping experience
    • Kadence ConversionsBoost sales and build engaged audiences with popups and banners
    • Kadence InsightsEasily create A/B tests. Optimize your pages to drive higher conversions.
    • View All Products
    • Get Kadence + Hosting
      In One Place

      Enjoy faster setup, top-tier performance, and worry-free WordPress hosting – Kadence Theme, Kadence Blocks, and Solid Security all pre-installed.

      Learn More

  • Kadence AI
  • Starter Templates
  • Blog
  • SupportExpand
    • Resource HubStart here for guides, Product docs, FAQs, and Troubleshooting tips, all in one place.
    • Contact SupportStuck on something? We’re here to help! Open a ticket for top-notch support.
    • Contact Our TeamGot pre-sales questions or need help choosing a plan? Open a ticket and our team will guide you.
    • About usCrafted with love in Missoula, Montana. Meet the team behind the mission.
Account Account
Get Kadence
Kadence Blocks
  • Features
  • Pro
  • Blocks
  • HelpExpand
    • Documentation
    • Submit a Ticket
    • Facebook Group
    • Feature Requests
    • Roadmap
    • Changelog
Help Center
Kadence Blocks

Kadence Blocks

Getting Started

Block Tutorials

  • Responsive Breakpoints in Kadence
  • Create a Full Screen Landing Page
  • How to Control the Hero or Title Section Sitewide and Per Page in Kadence

Kadence Blocks Pro

  • How to hook elements inside of post or page content
  • Kadence Custom Fonts
  • How to Create a Custom Search Page with Hooked Elements and the Advanced Query Loop

Troubleshooting Blocks

  • Troubleshooting White/Blank Screens in the Editor or Customizer
  • How to Download Previous Versions of the Kadence Theme and Plugins
  • How to run the WordPress built-in database repair tool
  • Recommended Server Resources
  • Troubleshooting the “Update Failed: Service Unavailable” error when updating Kadence Pro plugins

Advanced

Advanced Headers

Kadence Form Integrations

  • Home
  • Knowledge Base
  • Kadence Blocks
  • Kadence Theme
  • Troubleshooting

How to run the WordPress built-in database repair tool

If you are encountering errors related to your WordPress database, WordPress includes a built-in repair tool that can help resolve database-related issues. This guide will walk you through enabling and using this tool for troubleshooting purposes.

Repair Database
Table of Contents
  • Accessing the wp-config.php file
    • Editing the wp-config file
  • Running the WordPress database repair tool

Important: Before proceeding, it is recommended to back up your website and database before running this tool. While this tool is designed to repair issues safely, creating a backup ensures you can restore your site if needed. If you’re not familiar with editing a config file, it’s a good idea to reach out to your hosting provider’s support team for assistance.

Accessing the wp-config.php file

First, you’ll need to access your WordPress files. You can do this by connecting to your website via FTP, using your hosting provider’s file manager, or browsing the files locally if you’re working in a local environment. Once you’re connected, navigate to the root directory of your WordPress installation. This is the main folder that contains essential directories like the wp-content folder and important files such as the .htaccess and wp-config.php files.

To access your files via FTP, you’ll need to find your FTP connection details through your hosting provider’s control panel. Once you have this information, you can use FTP software like FileZilla or SmartFTP to connect to your website using FTP. Once you are connected via FTP, you will be able to access your website directories.

FTP Panel
Local Directory Sample
Example of a local directory.
Host File Editor Sample
Example of hosting file manager.

Inside of your website directory, you’ll find the wp-config.php file. This is the file that needs to be edited for this process.

WP Config File

Open the wp-config.php file in your preferred text editor. (On most hosting file managers, you can often edit files directly within the interface.) If you are using an FTP connection, you can download the file and open it with a text editor like Notepad or VS Code.

WP Config

Editing the wp-config file

Inside the wp-config.php file, you will need to add a line of code and save the file. Find the text that says;
/* That's all, stop editing! Happy publishing. */

Before the stop editing line, add the following line of code to enable the WordPress database repair tool.
define( 'WP_ALLOW_REPAIR', true );

Since the repair tool does not require authentication, leaving this line in place could pose a security risk. Therefore, it is important to remove the define( 'WP_ALLOW_REPAIR', true ); line of code from the wp-config.php file after you are finished using the database repair tool

Enable Repair

Then, save the wp-config.php file and complete the steps below to run the database repair tool.

Running the WordPress database repair tool

Once the WordPress database repair is enabled in the wp-config.php file, you will have access to run this tool by using the following URL.
https://yourwebsite.com/wp-admin/maint/repair.php

Just replace yourwebsite.com with your website domain.

Repair Database

You can Repair the Database or Repair and Optimize the Database. Running the repair can generally help when it comes to database-related WordPress errors/issues. If you continue to experience issues after running the repair, additional troubleshooting may be required.

Once you are finished using the database repair tool, you must remove the define( 'WP_ALLOW_REPAIR', true ); line of code from your wp-config.php file.

This tool does not require authentication, therefore can be a security risk. So once you are done with this feature, edit the wp-config.php file, and remove the define( 'WP_ALLOW_REPAIR', true ); line of code.

Removing Code

Once finished, be sure to save the wp-config.php file.

Do you feel this document was helpful?
The Kadence WP Logo
Crafted in Missoula, Montana
  • Follow Kadence on Facebook
  • Follow Kadence on Youtube
  • X
  • Follow Kadence on Instagram
Trustpilot
Products
  • Kadence Plans
  • Kadence Theme
  • Kadence Blocks
  • Kadence AI
  • Kadence Starter Templates
  • Kadence Shop Kit
  • Kadence Conversions
  • Kadence Pattern Hub
  • View All
Resources
  • Blog
  • Podcast
  • Knowledgebase
  • Support ticket
  • Feature Requests
  • FAQ
  • WordPress Hosting Services
About Us
  • About Kadence
  • Become an affiliate
  • Contact us
  • Terms
  • Privacy Policy
  • Security
Our Partner Brands
  • SolidWP
  • LearnDash
  • The Events Calendar
  • GiveWP
  • MemberDash
Kadence Community
  • Kadence Marketplace
  • Join the Facebook Group
  • Subscribe to our YouTube Channel
© 2024 Kadence WP | All prices are in USD
Logo for StellarWP an umbrella brand of Premium WordPress plugins
  • Pricing
  • Products
    • Premium PlansGet all the tools you need in one plan
    • Kadence ThemeLightning-fast performance theme for modern websites
    • Kadence BlocksDrop in ready designs with advanced controls for pixel perfect websites
    • Kadence Shop KitCreate a more effective WooCommerce shopping experience
    • Kadence ConversionsBoost sales and build engaged audiences with popups and banners
    • Kadence InsightsEasily create A/B tests. Optimize your pages to drive higher conversions.
    • View All Products
    • Get Kadence + Hosting
      In One Place

      Enjoy faster setup, top-tier performance, and worry-free WordPress hosting – Kadence Theme, Kadence Blocks, and Solid Security all pre-installed.

      Learn More

  • Kadence AI
  • Starter Templates
  • Blog
  • Support
    • Resource HubStart here for guides, Product docs, FAQs, and Troubleshooting tips, all in one place.
    • Contact SupportStuck on something? We’re here to help! Open a ticket for top-notch support.
    • Contact Our TeamGot pre-sales questions or need help choosing a plan? Open a ticket and our team will guide you.
    • About usCrafted with love in Missoula, Montana. Meet the team behind the mission.
Account Login
  • Features
  • Pro
  • Blocks
  • HelpExpand
    • Documentation
    • Submit a Ticket
    • Facebook Group
    • Feature Requests
    • Roadmap
    • Changelog