What does "optimize" mean?
A database stores your shop data, like products and orders. It is split into tables. A table is like one page of a spreadsheet.
When you add and delete data, the tables get messy. They have gaps, like a bookshelf with books pulled out. Optimizing closes those gaps. The database becomes tidy and quick again.
Before you start
Take a backup of your database first. Optimizing is usually safe, but a backup protects you if something goes wrong. In phpMyAdmin, use the Export tab.
phpMyAdmin is a tool for looking at databases in your browser. It is in cPanel and Plesk.
Steps in phpMyAdmin
- Log in to your hosting control panel.
- Open phpMyAdmin.
- In the list on the left, click your osCommerce database.
- You will see a list of tables. Many start with
osc_ororders,productsand so on. - Tick the Check all box under the table list.
- Find the drop-down menu named With selected.
- Choose Optimize table.
- Wait for the result page. Each table should show an "OK" status.
If you do not know which database is yours, open the file includes/configure.php in your shop folder. Look for the line with DB_DATABASE. Do not change the file.
Using SQL instead
You can also run a command in the SQL tab. Replace the table names with yours.
OPTIMIZE TABLE orders, products, customers;
This command tidies the three tables named in it.
Tips for a healthy shop
- Do this once a month, or after you delete many products or orders.
- Do it when the shop is quiet. Tables may lock for a short time.
Stuck? Open a support ticket.
Quick recap
- Optimizing tidies the database tables.
- Back up your database first.
- In phpMyAdmin, select all tables and choose Optimize table.
- Repeat it every month or so.