Optimising Your WordPress Database (Firstserv Guide)

As your WordPress site grows, your database will gradually accumulate additional data—such as post revisions, drafts, user data, and temporary (transient) information. Over time, this can increase database size and impact performance.

Regularly cleaning and optimising your database helps keep your website running efficiently.


Before You Begin

⚠️ Always take a full backup of your website before performing any database optimisation.

While these actions are generally safe, having a backup ensures you can quickly restore your site if anything unexpected occurs.


Using the LiteSpeed Database Optimiser

The easiest way to clean your WordPress database is by using the LiteSpeed Cache plugin, which includes a built-in Database Optimiser.

Access the Optimiser

  1. Log in to your WordPress dashboard
  2. Go to LiteSpeed Cache → Manage
  3. Open the DB Optimiser tab

Understanding the Interface

  • Blue check marks – This area has already been cleaned
  • Red crosses – Cleaning is available for this item

Optimisation Options Explained

Clean All

Runs most cleanup tasks in one go.

⚠️ Note: This does not include:

  • Optimise Tables
  • Clean CSS/JS Optimiser

Post Revisions

Removes old versions of posts and pages.

  • Keeps only the current version
  • Frees up database space

⚠️ You won’t be able to restore previous revisions after removing them.


Auto Drafts

Deletes automatically saved drafts created while editing posts.

Safe to remove if:

  • You have no incomplete or unsaved work

Trashed Posts

Permanently deletes posts and pages that have been moved to the rubbish bin.


Spam Comments

Removes all comments marked as spam.

✅ Recommended, as these serve no purpose and take up space.


Trashed Comments

Permanently deletes comments that have been placed in the trash.


Trackbacks & Pingbacks

Removes trackbacks and pingbacks (external links from other sites).

  • Safe to delete if you don’t use or display them

Expired Transients

Deletes expired temporary data stored in the database.

✅ Recommended for regular cleanup.


All Transients

Removes all transient data (both expired and active).

⚠️ Notes:

  • Some transients may remain or be recreated automatically
  • Used by plugins for caching and temporary storage

Optimise Tables

Optimises the structure of your database tables for better efficiency.

✅ Helps improve database performance
❗ Not included in “Clean All”—must be run separately


Clean CSS/JS Optimiser

Removes stored data related to CSS/JavaScript optimisation.

✅ Useful if you are using LiteSpeed’s:

  • Minification
  • Combination features

❗ Not included in “Clean All”


Best Practices

  • Run database cleanups regularly
  • Avoid removing data you may still need (e.g. revisions if you rely on them)
  • Monitor site performance after optimisation
  • Combine this with caching and image optimisation for best results

Benefits of Database Optimisation

  • Faster page load times
  • Reduced server resource usage
  • Smaller database size
  • Improved backend and admin performance

Summary

Keeping your WordPress database clean is an important part of ongoing site maintenance. Using the LiteSpeed Database Optimiser, you can quickly:

  • Remove unnecessary data
  • Improve performance
  • Keep your site running efficiently

If you need help optimising your database or configuring LiteSpeed tools, the Firstserv support team is always available to assist.

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to install the Wordpress Litespeed cache plugin

  LiteSpeed Cache – What It Is and How It Helps If you’re running a WordPress website and...

How to disable the WordPress CRON job and set it up in cPanel

  Optimising WordPress Cron (wp-cron) – Firstserv WordPress does not...

Fixing WordPress mixed content issues

  Fixing Mixed Content Warnings When you visit a website using https://, your browser expects...

How to optimise your WordPress site

Optimising Your WordPress Website (Firstserv Guide) WordPress is a...

Configuring Redis Object Caching using Litespeed Cache

Object Caching and Redis (Firstserv Guide) What is Object Caching? Object caching is a...