Step 1: Login to cPanel
Step 2: Click on the phpMyAdmin button under Databases section.
Step 3: Select the database that you want to optimize from the list in the left column.
Step 4: Select the tables you wish to optimize by checking the check box in front of each one, or clicking on Select All if you want to optimize all of them.
Step 5: From “With selected” drop-down menu and choose the Optimize table.