Is your WordPress admin panel running slower every day? Are database queries taking hundreds of milliseconds to execute during WooCommerce checkouts? Over time, every active WordPress site accumulates thousands of bloated, orphaned, and expired database rows that degrade server performance.
Whenever you test plugins, write post drafts, delete old media, or receive spam comments, WordPress leaves behind “ghost” records across your core MySQL tables. Because standard WordPress core never automatically sweeps orphaned records or expired transients, these rows continuously bloat your wp_options, wp_postmeta, 그리고 wp_commentmeta tables.
In this step-by-step tutorial, you will learn how to safely clean and optimize your WordPress database using SiteSkyline Optimizer (SOptimizer). Unlike dangerous database sweepers that risk dropping critical tables or altering options, SOptimizer’s Database Cleaner is strictly scoped to provably-junk rows only—keeping your live posts, customers, orders, and site configurations 100% safe.
Why WordPress Databases Slow Down Over Time
Every dynamic request in WordPress requires communicating with your MySQL database. When database tables swell with tens of thousands of abandoned rows, two major performance bottlenecks arise:
- Autoload Query Overhead: In your
wp_optionstable, expired transients and orphaned plugin data inflate autoloaded queries. This forces your server to load megabytes of unused data into RAM on every single page load before PHP can output anything. - Slow Meta Table Scans: 그만큼
wp_postmetatable often becomes the largest table in your database. When posts are deleted without cleaning associated metadata, MySQL query execution times climb, directly hurting server response time (TTFB). - Indexing Degradation: Unpurged spam comments, auto-drafts, and oEmbed previews consume memory and expand database index sizes, forcing disk reads rather than fast memory lookups.
| Database Junk Category | Root Cause in WordPress | Performance Impact | SOptimizer Safe Action |
|---|---|---|---|
| Expired Transients | Temporary cache rows left behind until explicitly re-read | Bloats wp_options, inflates memory & autoload queries | Purges both timeout and value rows in one query |
| oEmbed Caches | Video and link preview caches in wp_postmeta | Wastes storage and bloats metadata tables | Safely clears rows; automatically rebuilds on demand |
| Orphaned Postmeta | Leftover meta rows after posts, pages, or products are deleted | Massive table bloat, degrades post queries & search | Deletes rows whose parent post no longer exists |
| Auto-Drafts | Generated automatically by block editor when opening new posts | Pollutes wp_posts table with unvisited records | Removes abandoned, unsaved drafts safely |
| Spam Comments | Accumulated spam comments sitting in the spam bucket | Inflates wp_comments and wastes database disk space | Permanently empties spam rows |
| Orphaned Commentmeta | Metadata left behind when parent comments are removed | Leaves abandoned rows in wp_commentmeta | Deletes stranded meta rows with no valid parent |
Step 1: Open the SiteSkyline Optimizer DB Cleaner
To begin cleaning your database, log into your WordPress administrative dashboard and navigate to SiteSkyline Optimizer > DB Cleaner.
The DB Cleaner dashboard provides a crystal-clear overview of all six provably-junk categories. Each row features a live query counter that immediately displays the exact number of stranded records detected on your server.
Crucially, SiteSkyline Optimizer is engineered with enterprise safety in mind: Every category is scoped strictly to provably-junk records. No live posts, pages, custom post types, users, options, or WooCommerce orders are ever touched.

Step 2: Clean Expired Transients from the Options Table
The first item in the cleaner is Expired Transients. Transients are temporary data entries used by plugins (e.g., API cache responses, weather widgets, social counters, or license checks) stored in the wp_options table.
Here is the core problem: WordPress does not run an automatic garbage collector for expired transients. A transient is only removed when a plugin tries to access it again. If a plugin is updated, deactivated, or simply never calls that key again, both the timeout record (_transient_timeout_*) and the value record (_transient_*) remain stuck forever.
In SiteSkyline Optimizer, inspect the live row count next to Expired Transients 그리고 Clean button. Optimizer executes a single targeted query that cleanly eliminates both the expiration key and the data record.

Step 3: Remove Orphaned Postmeta and Clear oEmbed Caches
The next two rows target your site’s largest metadata storage: wp_postmeta.
- oEmbed Caches: Whenever you paste a YouTube link, Vimeo URL, or Tweet into your content, WordPress fetches preview metadata and caches it in postmeta. These caches accumulate over time. Clearing them frees up disk space immediately, and WordPress will seamlessly rebuild previews on demand if a post is visited.
- Orphaned Postmeta: When you delete a blog post, page, WooCommerce product, or custom portfolio item, WordPress does not always cascade-delete every single custom field or SEO meta record associated with that post ID. Over years of site updates, thousands of orphaned postmeta rows remain stranded. Purging them streamlines metadata indexing and speeds up complex queries.

Step 4: Purge Unsaved Auto-Drafts and Spam Comments
WordPress is designed to protect your writing by automatically generating an auto-draft record in wp_posts whenever you click Add New Post 또는 Add New Page.
However, if you ever click “Add New” and then navigate away or close the tab without writing a title or saving, that auto-draft remains stranded in your database forever. These entries cannot be visited by users or search engines, serving only to clutter your database.
Additionally, comments marked as Spam sit in your spam bucket consuming database storage. SiteSkyline Optimizer enables you to permanently eliminate both auto-drafts and spam comments with dedicated one-click Clean actions.

Step 5: Clean Orphaned Commentmeta and Verify Empty States
Just as deleted posts leave orphaned postmeta, deleted comments often leave behind orphaned records in wp_commentmeta. These records no longer correspond to any valid comment ID.
다음을 클릭하세요. Clean button next to Orphaned commentmeta to delete stranded records. Notice that SiteSkyline Optimizer’s interface is completely dynamic: The moment a category’s row count reaches zero, its Clean button automatically disables. This prevents redundant queries or unnecessary table locks.

Step 6: Verify Database Optimization and Server Speed
Once all six categories display zero rows and disabled clean buttons, your database cleanup is complete!
You can verify the immediate performance benefits across your site:
- Faster Admin Dashboard: Navigating through the WordPress admin, editing posts, and managing WooCommerce products feels noticeably snappier.
- Reduced Autoload Memory: With expired transients purged from
wp_options, PHP processes require less memory allocation per request. - Lightweight Backups: Your database export SQL dumps and automated server backups will be significantly smaller in file size and finish much faster.

자주 묻는 질문
Is it completely safe to use the SiteSkyline Optimizer Database Cleaner?
Yes. Many legacy database plugins run broad commands like OPTIMIZE TABLE or allow users to drop tables they don’t understand, which can break site functionality. SiteSkyline Optimizer’s cleaner is strictly hardcoded to remove provably-junk data (expired transients, orphaned meta with no parent ID, unsaved auto-drafts, and spam). Your published content, pages, customer orders, and settings are never touched.
Will clearing oEmbed caches break any videos on my site?
No. oEmbed caches are purely cached HTML response snippets. When an oEmbed cache row is deleted, WordPress simply re-fetches the preview from YouTube, Vimeo, or Twitter the next time a visitor views that post, without losing any content or layout integrity.
How often should I run the Database Cleaner?
For most standard blogs and business websites, running the DB Cleaner once every month or two is plenty to keep tables lean. For busy WooCommerce stores, membership sites, or high-volume publishing sites with multiple authors, running a quick clean every week or two keeps transient bloat to a minimum.
Should I back up my site before running database cleanup?
While SOptimizer’s queries are mathematically safe and target only orphaned and expired data, it is always best practice to maintain regular automated database backups before performing any server-side maintenance.



