How do I optimise and reduce the size of my database? Print

  • 0

Over time, databases collect old data that slows your website down and uses space. A little housekeeping keeps your site fast.

1. Take a backup first

Always export a copy before cleaning up. See How do I download or back up my MySQL database?

2. Find the biggest tables

  1. Open phpMyAdmin from the MySQL Databases section of your control panel.
  2. Click your database name on the left. The table list shows each table's Size. Click the column heading to sort by size.

3. Clear out unneeded data

  • WordPress: old post revisions, spam and trashed comments, expired transients and logs from security or form plugins are the usual culprits. A plugin such as WP-Optimize can clean these safely.
  • Leftover tables: plugins you deleted may have left their tables behind. Only remove a table if you are sure nothing uses it.
  • Log and session tables: these can usually be emptied (Empty in phpMyAdmin) without affecting your site.

4. Optimise the tables

In phpMyAdmin, tick the tables you cleaned (or Check all), then choose Optimize table from the drop-down at the bottom. This reclaims the freed space.

Each database can hold up to 1 GB. See What is the maximum MySQL database size?

Need help?

Open a support ticket from your FariHost Client Area or message us on WhatsApp and our team will help you.


Was this answer helpful?

« Back