Knowledgebase

How to Clean Up WordPress Database Bloat (Revisions & Transients) Print

  • 0

Shrink oversized wp_posts and wp_options tables for faster queries.

Step-by-Step Instructions

  1. Limit post revisions in wp-config.php.
  2. Remove expired transients and spam comments via WP-CLI or LiteSpeed DB Optimizer.
define('WP_POST_REVISIONS', 5);
# WP-CLI:
wp transient delete --all
wp db optimize

Pro Tip: Always back up your database before running bulk cleanup tools.

Need assistance? Open a ticket in the A1 Client Area or contact our 24/7 NOC Engineering Team on WhatsApp at +1 (406) 229-9597.


Was this answer helpful?

« Back