Skip to main content

Get a Database Health Report with Advanced Database Cleaner and AI

Database size, the biggest tables, autoloaded data and old data waiting to be cleaned, read through Advanced Database Cleaner with nothing changed.

Difficulty Beginner
Time ~5 min

Prerequisites

A site connected to WPVibe running Advanced Database Cleaner 4.3 or newer (tested on 4.3.1, free) on WordPress 6.9 or newer and PHP 8.2 or newer with OpenSSL, with "Expose plugin abilities" turned on in Advanced Database Cleaner, Settings, Developer integrations, and an administrator account, served over HTTPS.

The prompt
My WordPress site uses Advanced Database Cleaner. Give me a health report of my database. Don't change anything.

1. Run discover_abilities with category adbc. If no adbc abilities are listed, or a call answers adbc_abilities_disabled, stop and tell me to install or update the free Advanced Database Cleaner plugin (4.3 or newer, on WordPress 6.9 or newer and PHP 8.2 or newer with OpenSSL) and turn on "Expose plugin abilities" in Advanced Database Cleaner, Settings, Developer integrations. If a call answers adbc_application_password_required, stop and tell me the plugin runs its abilities only for an administrator connected over HTTPS.
2. Run adbc/get-system-information and tell me the database size, the WordPress version and the autoload warning threshold.
3. Run adbc/get-general-data. List each cleanup category with a count above 0, biggest size first, with its count and size in KB or MB, and say in plain words what each one is (revisions are old copies of posts and pages, auto-drafts are unsaved drafts WordPress makes, expired transients are cached data past its date, unused post meta belongs to posts that no longer exist). If a category has a keep_last value, name the rule (for example, keep the last 7 days) and say the count already leaves out what the rule keeps; a rule by days has no effect on categories without dates, such as expired transients and unused or duplicated meta.
4. Run adbc/get-tables-list with sortBy size, sortOrder DESC and itemsPerPage 10. Name the ten biggest tables with their size and rows. For each one whose belongs_to type is w, say it is a WordPress core table; for the rest, say which plugin its name suggests, and that this is a guess from the name.
5. Run adbc/get-autoload-health and tell me the autoloaded size against the limit and the health it reports. Autoloaded options are read on every page load.
6. Run adbc/count-total-tables-to-optimize, adbc/count-total-tables-to-repair and adbc/count-total-cron-jobs-with-no-action, and give each count in one line.
7. Finish with the three things worth doing first, biggest win first, and for each one where to do it: Advanced Database Cleaner's General cleanup screen for the cleanup categories, its Options screen for autoloaded options, its Tables screen for tables, its Cron jobs screen for cron jobs. Tell me to back up the database before any cleanup. Do not run any ability that changes something.
Already connected?

Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:

Run the “Get a Database Health Report with Advanced Database Cleaner and AI” recipe from the WPVibe cookbook on my connected site.

Your site feels slower than it used to, or your host says the database is getting big, and you don’t know where the weight is. Advanced Database Cleaner’s screens show it all, but working out which numbers matter and what is safe to clean takes time nobody has.

The AI reads the database through Advanced Database Cleaner: its size, the biggest tables, how much is loaded on every page, and how much old data waits in each cleanup category, such as revisions, spam, trashed posts and expired transients. It gives you the three things worth doing first and changes nothing.

Paste the prompt and read the report. Cleaning is up to you: back up your database first, then use Advanced Database Cleaner’s General cleanup screen. To see exactly what one category would delete before you clean it, use this recipe; for a cleanup done without this plugin, use this one.

Outcome

A short report of where your database's weight is and the three things worth cleaning first, with nothing changed.