This guide is the hands-on half of the technical debt question: how to measure the debt in a WordPress install, classify it, and turn the findings into a fix-or-rebuild decision. If you first need to make the business case, start with the business cost of WordPress technical debt, then come back here with a staging copy of your site.
You will need admin access, database access (phpMyAdmin or a SQL client), Google Search Console, and an afternoon.
The four forms debt takes
WordPress debt shows up in four places, and they feed each other.
Plugin sprawl is the most visible. A typical install starts with plugins for forms, email sync, SEO, image optimization, caching, security and backups, plus a snippets plugin because the theme has no clean hooks. Then come a store, a membership plugin, a course plugin and a second page builder someone installed for the marketing team. Past a certain count, nobody can see the dependencies anymore: one plugin needs a newer PHP version, another breaks on it, and a third only works alongside the second. Removing any piece might topple the stack.
Theme debt lives in functions.php and CSS overrides. One developer hacked a custom post type into the theme. Another added a few hundred lines of CSS to override the theme’s cascade. A third edited the parent theme directly because the child theme was not loading. The theme can no longer be updated, and the site is frozen on whatever version it was when the edits started.
Database debt is invisible until you look. Deactivated plugins leave their rows in wp_postmeta and wp_options. Options nobody has touched in years still autoload on every request. Test content from an abandoned feature is still there. The number of queries per page creeps up, and nobody knows why.
Infrastructure debt is the catch-all: hosting sized for the traffic you had years ago, no CDN, backups that run at peak hours, unindexed queries, a PHP version that is falling out of support.
They compound. A plugin that does too much adds database queries, which exposes the hosting limits. A theme that is hard to change pushes developers toward workaround plugins, which adds to the sprawl.
Running the audit
Work on a staging copy where you can, and collect data before forming opinions.
Profile queries with Query Monitor
Install Query Monitor, a free debugging plugin (not a caching plugin). Load the homepage and a few key templates while logged in as an admin. Query Monitor shows how many queries fire, which are slow, which component triggered them, and which are duplicated. Look for patterns: a large share of time spent loading options points to autoload bloat, and a single plugin responsible for dozens of queries on a page that does not use it is a red flag.
Inventory the plugins
Export the plugin list. For each one, record what it does and where it is used. A page builder behind most of your pages is load-bearing. A plugin installed “just in case” and used nowhere is debt. Then check maintenance: when it was last updated, which WordPress version it was tested up to, and whether the WordPress.org listing warns that it has not been tested with recent releases. A large install count is not a guarantee of maintenance; a recent update history is better evidence.
Examine the theme
Open the child theme’s functions.php. A few dozen lines is normal. Hundreds of lines usually means features that belong in plugins are living in the theme. Look for CSS selectors that target specific page or post IDs, and for edits made directly to the parent theme. On a local copy, switch to a default theme and load a few pages. If most functionality disappears, the site is theme-locked.
Measure scripts and styles
Use the browser’s DevTools Network panel alongside Query Monitor. Count the CSS and JavaScript files on the homepage and on a typical content page, and note their total size. As a rough guide, more than a handful of stylesheets or a couple of dozen scripts on a content page usually means plugins and the theme are loading assets on pages that do not need them. Your own budget depends on the site; the point is to know the numbers and where each file comes from.
Quantify autoloaded options and post meta
Find the largest autoloaded options. Since WordPress 6.6, the autoload column can hold on, auto and auto-on as well as the older yes, so check for all of them (replace wp_ with your table prefix):
SELECT option_name, LENGTH(option_value) AS bytes
FROM wp_options
WHERE autoload IN ('yes', 'on', 'auto-on', 'auto')
ORDER BY bytes DESC
LIMIT 20;
Autoloaded data is read on every request, including API calls, so large serialized blobs from old plugins cost you on every page. Recent WordPress versions also flag a large autoload total in Site Health.
Then look at post meta:
SELECT meta_key, COUNT(*) AS rows_count
FROM wp_postmeta
GROUP BY meta_key
ORDER BY rows_count DESC
LIMIT 20;
Meta keys that belong to plugins you removed long ago are dead weight.
Check Core Web Vitals
In Search Console, open the Core Web Vitals report and note how many URLs are Good, Need improvement and Poor. This is field data from real visitors. Then run PageSpeed Insights on a few representative templates to see which resources are responsible. Poor field data on templates that are heavy with plugins and theme assets is usually debt showing up where users feel it.
Classify what you found
Sort every finding into one of the four forms:
- Plugin debt: redundant, unmaintained or abandoned plugins; plugins duplicating features WordPress now has built in; plugins with open security advisories.
- Theme debt: hard-coded customizations in
functions.php, CSS targeting specific IDs, a parent theme that can no longer be updated, no child-theme separation. - Database debt: a large autoload total, post meta from removed plugins, orphaned custom post types, unindexed meta keys used for filtering or sorting.
- Infrastructure debt: a PHP version near or past end of security support, no CDN, no object or page caching, backups during peak traffic.
Remediate or rebuild
The decision rule is simple: remediate local debt, rebuild systemic debt.
Debt is local when the plugins are few, maintained and purposeful; the theme can still be updated and uses standard hooks; the autoload total is modest; and most URLs pass Core Web Vitals. A focused cleanup handles it: remove unused plugins, delete dead meta, upgrade PHP, optimize images, add a CDN.
Debt is systemic when plugins overlap and cannot be removed safely, the theme is a fork nobody can update, the database has grown in ways nobody can explain, a large share of URLs fail Core Web Vitals, or a page builder is the only way content gets made. Cleaning that up in place can cost as much as a rebuild and still leave you with the same architecture.
Two of our own engagements show both paths. For Roseville Landscape Material Supply, it was upkeep first and a rebuild later: we worked on its WordPress site from 2021, and in 2024 it moved to Astro, where static generation took the database queries, PHP execution and plugin overhead off every request. For the Totallyamaha network of Yamaha snowmobile forums, one of which Arun has administered since 2013, the answer has been continuous upkeep: three forums on one server, software kept current, and old threads kept at their original addresses. Continuous upkeep works when someone owns it; debt accumulates when nobody does.
The audit output
Record the findings in a spreadsheet, one tab per area:
- Plugins: name, purpose, where used, last updated, tested-up-to version, debt level (low, medium, high).
- Theme: lines of custom code, number of ID-specific overrides, last update, lock-in risk.
- Database: total size, autoload total, orphaned meta rows, unindexed keys used in queries.
- Infrastructure: PHP version and its support end date, CDN, caching, backup schedule.
- Performance: Core Web Vitals distribution, PageSpeed results for key templates.
Finish with two numbers side by side: the estimated cost of remediation and the estimated cost of a rebuild. A useful rule of thumb: if remediation costs well over half of a rebuild and leaves the architecture unchanged, rebuild. If it costs a fraction of a rebuild and the debt is localized, remediate.
Next steps
An audit is data, not a recommendation. Install Query Monitor on a staging copy this week, run the two queries above, and fill in the spreadsheet.