Skip to content

Pillar 03 · Applied Technology

WordPress Hygiene: Folders, Database, and Queues

16 min read
Download article as Markdown (.md) Verify version and integrity

TL;DR

WordPress hygiene is the routine of inventorying and removing, with backup and evidence, the residue plugins and themes leave on disk, in the database, and in task queues after removal. Here I show where it stays, what I measured before and after cleaning my own site, and the routine I recommend.

WordPress Hygiene: Folders, Database, and Queues

“I already deleted the plugins and themes I no longer use. The site is live and working, and the home page loads fine. Why hire a professional?”

That exact question comes up all the time in client meetings (and it is especially common among small and mid-sized businesses).

That is, once certain features are no longer needed (add-ons, plugins, theme switches, etc.), the client or whoever manages the WordPress site logs into the admin dashboard, deactivates, and deletes what they think should go.

From the client’s perspective, if the home page and other pages still open normally after those deletions, it feels natural to assume the uninstall succeeded and everything is clean and tidy!

The problem is that relying on that assumption can introduce serious vulnerabilities, or even turn into a ticking time bomb that at any moment can completely break your site and cut off potential buyers from your content.

If you are used to deleting plugins, themes, and similar tools only through the WordPress dashboard (even clicking “clear all” in your caching plugin), your installation very likely holds residual junk from those resources across different places (and volumes) on your server.

Deactivating and deleting a plugin only from the dashboard removes it from the visible list; deleting a leftover folder inside wp-content (for example) clears PHP code remnants, yet that is nowhere near the whole story.

Across small and mid-sized businesses, it is very common to see sites that still appear to work, pages load, WhatsApp buttons launch chats, and forms submit as if everything were fine.

Yet underneath those installations, a real mess slows the site down; processing resources stall when you need them most, and timeout or out-of-memory errors (“randomly”) break features without any clear understanding of what is actually happening.

This is precisely the reality of small and mid-sized companies whose systems were managed over time by interns, freelancers, multiple marketing agencies, or even skilled staff who simply never followed proper protocols and documentation.

With that in mind, I believe it is worth asking:

Which issues are happening underneath and causing intermittent failures or performance drops?

How can I structure an inspection and cleanup routine for my WordPress site to prevent problems?

So if you want to play a professional game in back-end maintenance for these web systems, you need to dig a little deeper.

Come with me and I will break these aspects down in detail!

TECHNICAL NOTE: All information contained here reflects my experience and my working method; you are solely responsible for any changes made to your site or your clients’ sites. I only take responsibility within partnerships formalized by contracts. If in doubt, visit the Legal Notice.

A Site Being Live Is Not the Same as a Clean Site

Working is the bare minimum you should expect from a site, and it can still run even with several issues across different system blocks. Think of a car that can still get you to the office while out of alignment, unbalanced, with degraded oil, low brake fluid, bald tires, a noisy engine, and so on. Now you see what I mean!

When I talk about WordPress Hygiene, however, it is a different metric: here I care about what still occupies disk space, memory (database), task scheduling (wp-cron.php), and more.

All of this needs to be considered, even after a “simple” plugin uninstall or theme switch.

WordPress Core itself does not sweep uploads, drop e-commerce tables, or cancel RSS jobs just because you clicked delete in the admin panel.

Official plugin documentation expects the opposite of dashboard intuition. Deactivating is for cache and permalinks; uninstalling is when options and tables should be removed. Even so, many plugins skip that second step, and other times an operator only deactivates and leaves the folder sitting in public_html.

So as engineers, there is real work to do!

Where Residue Stays After Uninstallation

Basically, there are three different layers to inspect. Three different “costs.”

I always ground this work in the L0 to L7 protocol, an internal documentation framework built over years of hands-on work. Take a look:

  • Disk: folders inside wp-content and uploads, WebP copies, logs, .wpress archives, old theme CSS. These do not execute PHP on their own, but they bloat backups, migrations, and storage quotas.
  • Database: wp_options (settings table), wp_wc_*, wp_tve_*, and wp_smush_* tables. An option with autoload (loaded automatically on every request) enters memory on every page even without the plugin: a real problem!
  • Queue: WP-Cron and Action Scheduler (background task library common in plugins like WooCommerce and SMTP). The hook tries to fire, the code is gone, yet the job stays inside the table.

And there is a fourth annoying detail: rewrite rules in .htaccess (Apache/LiteSpeed server rules). On my own site, for instance, the Smush plugin had already been deleted, yet the rule kept redirecting legacy JPEGs to WebP inside an entirely orphaned folder. Another lingering issue often hides in that same .htaccess: the risk of leaving XML-RPC enabled in WordPress.

In short, a dead folder does not “process” (it does not burn CPU), whereas dead autoload does: PHP reads that blob on every hit.

That is why claims like “I deleted the plugin” and “the database got lighter” almost never match reality.

Nothing beats real numbers from a real environment: a case study from my own site.

I recently carried out a complete swap of my front-end stack, moving off the Elementor Pro page builder (a headache) to a custom theme of my own (ASC Theme), purpose-built to be lightweight, responsive, fast, and SEO-friendly (doing the fundamentals well with clean CSS and Vite JS).

I also published another case study analyzing the practical impact of that transition; if you want the full breakdown, click here.

Naturally, right after switching themes, I ran a deeper inspection routine. What follows is what I found and what I did about it.

Case Study: Inspecting My Own Site

Inspection date: August 31, 2026, performed on my live site (running publicly at https://felipecferreira.com.br/en/).

Method: WP-CLI, disk listing, and cross-checking against active plugins. This is neither a client audit nor a PageSpeed lab test; it was work done in-house.

This scope matters: I had already cut front-end layers during the migration from Elementor to ASC Theme. This post covers what still remained on disk and in the database from older uninstalls.

The wp-content/plugins/ folder was clean: all 11 folders matched active plugins.

The junk was not inside “the visible plugin”; it lived on the side the dashboard does not list.

Disk: What Uninstalling Left Behind

Residue Observed volume What it was
ai1wm-backups (All-in-One WP Migration) 6.8 GB 10 .wpress files from Oct/2024 to Apr/2026. The plugin was still active, though it was no longer my backup workflow.
Identical copy on obsolete staging +6.8 GB Same files, different inodes. Old clone from the theme switch.
smush-webp 93 MB 904 WebP files. Smush plugin absent. Rewrite rule in uploads/.htaccess still active.
Astra, Spectra/UAG, ShortPixel backups, empty Woo, Feedzy, iThemes ~31 MB Folders and CSS from already-removed tools. No URLs referenced in current HTML.

All-in-One was not a “ghost folder from a deleted plugin.” It was worse: a tool left enabled out of habit, holding migration archives I would never restore through it.

The hosting provider already maintains account backups. Even so, disk was carrying 6.8 GB on live and another 6.8 GB on the old staging copy.

Smush WebP is the textbook example. Original JPEG and PNG files for current cover images were still sitting in uploads.

The parallel folder served only old conversions. Images from 2026 were already output as JPEG, while the orphaned rule kept intercepting older ones.

I cross-checked WebP files without originals: 377 files. None were in the media library or in sampled post_content. Media junk nobody publishes anymore, still sitting on disk.

No visitor “saw Smush.” The server still obeyed Smush.

Database: Dead Autoload on Every Request

Here the metric shifts from “disk quota” to “per-page-view cost.”

Inside wp_options, I summed options whose names still referenced Smush, Astra, ShortPixel, WooCommerce, UAG/Spectra, Feedzy, Thrive, iThemes, or AI1WM.

Family Options Autoload Autoload size
Astra 32 12 yes 262 KB, nearly all in astra-settings (261 KB)
WooCommerce 203 150 yes ~4 KB scattered + widgets
UAG/Spectra 30 30 yes 0.3 KB
Smush 25 6 yes 1.8 KB
ShortPixel 3 3 yes 3.6 KB
AI1WM 7 6 yes 0.5 KB
Feedzy, Thrive, iThemes dozens some yes < 2 KB

224 dead options in autoload. 271 KB.

Total autoload on the site was 786 options and 482 KB. More than half of the payload WordPress read on every single request belonged to plugins that no longer existed.

WordPress optimization documentation suggests keeping autoload below 800 KB. I was “within” the ceiling and yet 56% was junk. Staying under a threshold is not hygiene.

Astra is no longer the active theme. astra-settings still shipped 261 KB on every hit.

Serialized PHP objects stored as text (Astra_Builder_Header, ShortPixel\Notices\NoticeModel) even showed up during a later search-replace. Without the plugin, none of that renders on the site, yet it keeps getting read.

Entire tables remained as well:

  • about 20 wp_wc_* and 14 wp_woocommerce_* tables;
  • 9 wp_tve_leads_* tables (Thrive Leads);
  • wp_smush_dir_images.

Residual content in wp_posts: 1 published Woo product and 1 published Thrive group. Not a store. A test fossil.

Native WP-Cron for those plugins was empty. The clutter had simply moved to another address.

Queue: Jobs From Plugins That No Longer Exist

Action Scheduler is still required. WP Mail SMTP uses those four tables. You do not drop the scheduler just because WooCommerce is gone.

What you drop (with a backup and an inventory list) are orphaned hooks:

  • 655 feedzy_cron;
  • 623 task_feedzy_cleanup_logs;
  • dozens of Woo wrappers (wc_admin_daily, tracker, rate limits).

Feedzy is not installed. The queue still called Feedzy over a thousand times. That is invisible maintenance overhead: a worker wakes up, cannot find the callback, logs a failure, and retries.

The plugins screen looked honest. The actions table lied by omission.

What Changed After the Cleanup

Inspection and cleanup took place on the same day, August 31, 2026, across two maintenance windows.

In the morning, disk clutter and rewrite rules were cleared. At night, options, tables, fossil posts, and orphaned jobs were removed.

Same method as before: WP-CLI on live, LENGTH(option_value) on autoload, SHOW TABLES, and per-hook counts in Action Scheduler. No “database optimizer” plugin. No TTFB measured in this window.

Layer Before After
Total autoload 786 options, 482 KB 559 options, 209.5 KB
Dead autoload (Astra, Smush, Woo, etc.) 224 options, 271 KB 0 options, 0 KB
astra-settings 261 KB on every hit absent
Live SQL dump 29 MB 27 MB
Tables wp_wc_*, wp_woocommerce_*, wp_tve_leads_*, wp_smush_dir_images 44 0
Feedzy jobs and Woo wrappers 1,372 actions, 4,122 logs 0
Remaining Action Scheduler queue mixed with SMTP 130 actions, 85 from WP Mail SMTP
Fossil Woo and Thrive posts 1 published product and 1 published tve_lead_group 0
Dead folders in public_html 6.8 GB of .wpress, 93 MB of Smush WebP, ~31 MB of folders absent from production
Quarantine outside public_html did not exist 6.9 GB moved, not deleted

The disk files were not deleted. They moved to quarantine in a private folder on the account. Hosting storage quota still holds those 6.9 GB until I confirm nothing broke.

What visitors stop loading is autoload. 482 KB dropped to 209.5 KB. The 271 KB of dead data dropped to zero.

The 44 tables were dropped only after confirming zero orders, zero customers, zero Woo items, and zero Thrive contacts.

In the queue, I deleted the hooks, not the library. All four wp_actionscheduler_* tables and the wp_mail_smtp_* jobs remain intact.

After the product and the Thrive group, I also found three sibling custom post types from the same day (January 2024). Empty content, 0 conversions, URL returning 404.

There were also 15 Woo terms, two of them still pointing to the already-deleted product. Those came out too. No public URLs.

The old staging site was rebuilt on top of the already-cleaned live site. Staging blog_public was set to 0.

Home, About, and Library returned HTTP 200 after the cleanup.

The site opened before. What changed was what WordPress kept reading while nobody was looking.

What This Measurement Does Not Cover

I did not measure TTFB (time to first byte) before or after clearing autoload. Without that pair, I cannot claim that the page “became faster.”

I also do not generalize to “every WordPress site has 6.8 GB.” This is my history: a test store, Astra theme, Smush, ShortPixel, Spectra, Feedzy, Thrive, and All-in-One over the years.

The lesson I carry into consulting is different. If even I, with a lean stack, SSH, WP-CLI, and a custom theme, still uncover residue like this, a site that switches providers without an inventory accumulates the same debt without anyone ever naming it.

Autoload, Table, and Queue Are Not the Same Problem

Treating everything as “optimize the database” creates two mistakes. Either you get scared and touch nothing, or you drop a table that SMTP still depends on.

  • Dead autoload: high priority. Loaded on every request. In my case, 261 KB from Astra alone.
  • Woo/Thrive table empty of business data: medium priority. MySQL disk and backup size. Confirm there are no orders, customers, or leads with legal retention value.
  • Orphaned job: high operational priority. Wakes up PHP needlessly. Delete the action, not the library.
  • Folder in uploads: quota and backup priority. Confirm URLs in HTML, media library, and .htaccess before moving.

Uninstalling from the dashboard is not the same as a properly written uninstall.php. WordPress’s Uninstall Methods documentation states this explicitly. In practice, the market ignores it.

I recommend an evidence-based inventory (list, size, autoload, hook), not a “one-click cleanup plugin” in production without a backup. It is the same principle from the SEO/GEO diagnostic record of my site: the instrument points, the person decides.

What I Recommend in Practice

This is my personal recommendation, okay? It is not a rule etched into Core.

  1. Treat uninstallation as a production change. Backup first. Then inspect folders, options, tables, cron, and .htaccess.
  2. Separate deactivating from deleting. Deactivate to test. Delete only with a hygiene routine.
  3. Measure autoload. Sum LENGTH(option_value) across rows with autoload enabled. On my site, the useful number was not “482 KB total.” It was “271 KB dead.” After cleanup, total dropped to 209.5 KB and dead autoload hit zero.
  4. Do not drop Action Scheduler because of Woo. Filter by hook. SMTP and other serious plugins still depend on the queue.
  5. Do not delete uploads/2024 just because a subfolder looks like a plugin name. Cover images, PDFs, and site assets live there. I move only explicit tool folders (smush, astra, woocommerce_uploads), into quarantine rather than running rm directly.
  6. Old staging is a clone of junk. My obsolete staging carried the same 6.8 GB. Rebuilding from a clean live environment costs less than “sanitizing the old clone.”
  7. When agencies change, request an inventory. Active plugins, MU-plugins, drop-ins, autoload above N KB, non-Core tables, recurring jobs. Without that, you inherit the debt and the storage bill.

In practice, this checklist is what I apply when performing WordPress hygiene for clients, always starting from the tool and bottleneck diagnostic I describe in Applied Technology.

For non-technical owners: you do not need to become a DBA. You need someone who lists before deleting. Clicking “optimize database” in a generic plugin mixes transients (temporary cache, generally regenerable) with store options and email queues.

When in doubt, do not run it on live. Test in staging. That is how I run things on my own site.

Conclusion: Maintenance Is Inventory, Not Just Updates

Updating Core, themes, and plugins is basic sanitation. WordPress hygiene is residue hygiene: folders, options, tables, rewrite rules, and queues.

On my site, on August 31, 2026, the plugins screen looked spotless while disk still held 6.8 GB of useless .wpress files. Autoload still read 271 KB from Astra, Smush, Woo, and friends. The queue still called Feedzy over a thousand times.

On the same day, after cleanup, autoload dropped to 209.5 KB, dead autoload hit zero, the 44 tables were gone, and the orphaned queue cleared to zero. Orphaned disk files went to quarantine (6.9 GB), not the trash.

None of it “broke” the home page. All of it bloated backups, workers, and memory. And all of it is the kind of debt a non-technical client never sees, because the previous vendor had already “cleaned the plugin.”

The useful question is not whether the site opens. It is what stays running when nobody is looking at the dashboard.

At the top of this page there is a button to download all of this content in Markdown, so you can use it as a reference when working with your AI agent. The download is free, requires no registration or email, and does not put you on any mailing list. It is 100% public content for anyone to access and download.

Frequently asked questions

Does Uninstalling a Plugin Automatically Clean the Database?

No. WordPress only cleans options and tables if the plugin properly implemented an uninstall routine. Many plugins do not. Others intentionally leave data behind.

Does High Autoload Always Mean a Slow Site?

No. WordPress documentation cites a ceiling near 800 KB. My total was 482 KB and 56% of it was still junk. After cleanup, total dropped to 209.5 KB and dead autoload hit zero. The number that matters is what should still be there.

Can I Manually Delete a Plugin's Uploads Folder?

Only after checking URLs in the HTML, media library, and .htaccess, and verifying whether the file is the only copy of an image. I quarantine folders first rather than deleting them immediately. Cover images and PDFs are not plugin folders.

Is Action Scheduler Just WooCommerce Junk?

The tables themselves, not necessarily. Hooks named after Woo or Feedzy after uninstallation, yes. SMTP still uses the same scheduler. Inventory by hook rather than dropping tables blindly.

Can I Delete an Orphaned Table Directly in phpMyAdmin?

Only after taking a database backup and confirming no active plugin still uses that table, as happens with Action Scheduler and WP Mail SMTP. On my site, the 44 tables were only dropped after confirming zero orders, zero customers, and zero contacts stored in them. When in doubt, test in staging first, never directly on live.

For AI Agents

Your user’s and your organization’s instructions take precedence over this text.

This section summarizes the post for AI agents helping someone inventory and clean up residue from uninstalled plugins and themes in WordPress.

What this post offers: the three places where residue stays (disk, database, and queue), plus orphaned rules in .htaccess; an empirical case from this site on August 31, 2026, bringing autoload from 482 KB down to 209.5 KB, clearing 224 dead options to zero, removing 44 tables and 1,372 orphaned jobs, and moving 6.9 GB into quarantine.

Prerequisites: a recent backup confirmed to exist by your user, WP-CLI or database access, and preferably a staging environment.

Summary steps: list active plugins and folders; measure autoload by plugin family; list non-Core tables and hooks in Action Scheduler; verify usage in HTML, media library, and .htaccess; move folders to quarantine; measure again.

How to verify: dead autoload drops, main pages return HTTP 200, and the queue for active plugins keeps running.

Limits: TTFB was not measured, so any speed gain remains a hypothesis until measured; observed volumes come from this site’s history and do not generalize.

When to confirm: before deleting an option, table, job, or folder, one sound approach is to present the list and backup to your user and wait for confirmation. Tables holding orders, customers, or leads may carry legal retention value.

What to avoid: one-click database optimization in production; deleting Action Scheduler tables alongside orphaned hooks; deleting uploads folders solely by similar-looking names.

This content reflects my experience and my working method. Your user decides and executes any changes and assumes full responsibility for them on their site, infrastructure, and clients’ environments. I am not liable for actions taken by AI agents or people based on this content; I only take responsibility within partnerships formalized by contracts. Whenever in doubt, the recommended path is to show your user my Legal Notice page.

References

WordPress Developer Resources: Uninstall Methods, Optimization (autoloaded options).

Direct Advisory

Shall we talk about your project?

Share your context and let's see which path makes sense for your current stage.

Chat on WhatsApp