In this Article Jump to: Check Database Repair Database Make a Backup
Chances are you are running a PHP based web application like WordPress which uses a Database to store Posts, Pages and other content for your website. PHP applications are constantly writing to the Database. During the interaction between the Web Based PHP Application and the Database there are times that something can go wrong. When something goes wrong during this interaction it can lead to database corruption. When the database becomes corrupted you will usually see an error on the front page. In this article, we will discuss How to Check and Repair a Corrupted Database in cPanel.
BEFORE making any changes: Make a Backup of Your Databases
Before making ANY changes to your databases you must always make a backup! Your Database is a separate entity from your Website files all-together. It’s great to have a backup of your website files but this does NOT include the database. There are separate steps to take in order to backup your databases.
→ Click Here for our Guide: How to Make a Backup of your Databases in cPanel
Locating the Name of the Database for your Application
If you have more than one website that uses a database, you will need to locate the name of which database you’ll need to check and repair.
→ Click Here for our Guide: How to Locate Your WordPress Database: wp-config.php
How to Check Your Database for Corruption
You can check your Database for Corruption easily using the Check Database Tool in cPanel. Follow the steps below to check your Database for corruption.
Step 1. Log into cPanel
Step 2. Under the ‘Databases‘ section Click on the ‘MySQL Databases‘ icon
Step 3. In the ‘Modify Databases‘ section of cPanel, Click on the Drop-Down menu and Select the name of the Database you want to Check under the ‘Check Database‘ section.
Step 4. With the correct Database name selected, click on the blue ‘Check‘ button to initiate the check.
Step 5. In our Example our Database is OK. But you will see something different here if it’s corrupted and cPanel will list the corrupted tables for you. Once you’ve confirmed the database is corrupted, you can then Repair it using the Repair tool.
Step 6. Click on the Blue ‘Go Back‘ link to Return to the ‘Modify Database‘ section of cPanel.
How to Repair Your Corrupted Database
You can repair your Corrupted Database easily using the Repair Database Tool in cPanel. Follow the steps below to Repair your corrupted database.
Step 1. Log into cPanel
Step 2. Under the ‘Databases‘ section Click on the ‘MySQL Databases‘ icon
Step 3. In the ‘Modify Databases‘ section of cPanel, Click on the Drop-Down menu and Select the name of the Database you want to Repair under the ‘Repair Database‘ section.
Step 4. With the correct Database name selected, click on the blue ‘Repair‘ button to initiate the Repair.
Step 5. If the Database was successfully repaired you will see a green message “Repair Complete” indicating the Database has been repaired successfully.
That’s it! You’ve learned how to Check and Repair a Corrupted Database using the Tools in your cPanel hosting account.
If you are still experiences issues with the database after a successful repair, there may be another issue. Reach out to our Friendly Support Team for help.