Over time, databases can accumulate overhead or encounter issues that slow down query execution. Regular optimization and quick repairs can restore performance.
Step 1: Open phpMyAdmin in cPanel
- Log in to cPanel.
- In the 'Databases' section, click on phpMyAdmin.
Step 2: Select your Database
In the left sidebar, click on the name of the database you wish to optimize/repair. This will display all the tables inside the database.
Step 3: Select All Tables
- Scroll down to the bottom of the tables list.
- Check the Check all box to select all tables.
Step 4: Perform Optimization
- Click on the dropdown menu next to 'With selected:'.
- Select Optimize table.
- phpMyAdmin will execute the query and output a success status for each table, indicating that overhead has been cleared.
Step 5: Perform Repair (If needed)
If your website is showing database connection errors or database crash warnings:
- Select all tables again.
- In the 'With selected:' dropdown, select Repair table.
- phpMyAdmin will check and repair any corrupted indices or database records.
Was this tutorial helpful to you?