How to Optimize a Database in the WordPress CPanel
As you delete content, such as old posts and spam comments, from your WordPress website, it creates empty space in the database that runs on the server hosting the site. This empty space is called "overhead." The database files remain the same size after you delete the content from WordPress, until you either add content to fill the empty space or optimize the database by eliminating the overhead. If your Web hosting company uses the cPanel graphical front end, you can eliminate the overhead space through the phpMyAdmin console.
Instructions
-
-
1
Click the "phpMyAdmin" icon on your hosting provider's cPanel front end. This opens a new window. The left side of the window displays the title of your WordPress website's SQL database under the user name you selected when you opened the account with your hosting company.
-
2
Click the database title. This displays a list of the different tables stored in the database, such as "wp_posts." The numbers you see in the "Overhead" column on the right side of the page indicate the total amount of empty space you can remove from the tables to optimize the database.
-
-
3
Place a check in the box next to each table that shows data in the "Overhead" column.
-
4
Open the pull-down menu at the bottom of the page, and then click "Repair Table." This optimizes each selected table of the SQL database by removing the empty space. You will see a confirmation message when this process is complete.
-
1
Tips & Warnings
Many Web hosting companies have backup functions that allow you to back your SQL database tables up to a file on your computer. If possible, back your database tables up before repairing them; if anything unexpected should happen during the optimization process, the content of your website will not be lost.