If your WordPress database has grown unusually large (for example, from 1GB to 6GB), it usually means your website is storing unnecessary data such as logs, transients, revisions, or WooCommerce activity records.
This guide will help you safely reduce your database size without breaking your website.
⚙️ Step 1: Check Which Tables Are Large
-
Log in to your cPanel or My20i dashboard.
-
Open phpMyAdmin and select your WordPress database.
-
Review the “Size” column to see which tables are the largest.
Common tables that usually grow too large include:
-
wp_actionscheduler_actions -
wp_actionscheduler_logs -
wp_woocommerce_sessions -
wp_postmeta -
wp_options -
wp_yoast_indexableorwp_rank_math_*
💡 Tip: You can sort the tables by size to quickly locate the biggest ones.
🧹 Step 2: Clean Up Safely Using a Plugin
Install one of the following trusted plugins from your WordPress dashboard:
-
WP-Optimize (Recommended)
-
Advanced Database Cleaner
After installation:
-
Go to the plugin’s settings.
-
Clean the following items:
-
Post revisions
-
Auto drafts and trashed posts
-
Spam and trashed comments
-
Expired transients
-
-
Click Optimize Database Tables.
⚠️ Always back up your database before cleaning. You can use plugins like UpdraftPlus or WPVivid Backup.
🧰 Step 3: Manual SQL Cleanup (Optional)
If you’re familiar with phpMyAdmin or SQL, you can safely run the following queries to remove unnecessary data.
1️⃣ WooCommerce Scheduled Actions
2️⃣ WooCommerce Sessions
3️⃣ Old Transients
These queries remove expired or completed logs, sessions, and cached data that WordPress no longer needs.
🧾 Step 4: Limit Future Database Growth
To prevent your database from growing too large again, add these lines to your wp-config.php file (above the line that says “That’s all, stop editing!”):
🧠 Step 5: Maintain Regular Optimization
-
Schedule WP-Optimize or Advanced Database Cleaner to run weekly.
-
Regularly delete spam, trash, and expired transients.
-
If your hosting plan supports it, enable Redis or Memcached object caching to reduce database load.
✅ Summary
By following the steps above, you can:
-
Reclaim several gigabytes of disk space
-
Improve your website speed and performance
-
Prevent future database bloating
Need Assistance?
If you’re not comfortable performing these steps yourself, our team can help.
Submit a ticket via your client area at support.intekhost.net and our support engineers will assist you in safely optimizing your WordPress database.