Skip to content

WordPress plugin inventory before a migration: the pre-cutover audit

Find the abandoned, license-locked, and server-coupled plugins before you move a WordPress site — the WP-CLI commands that produce the list, the four signals that predict breakage, and the four-way decision for each plugin.

A WordPress migration copies files and a database. It does not copy what your plugins quietly depend on: a drop-in a cache plugin wrote into wp-content, a license bound to the old IP, a PHP extension the destination was never built with, a crontab line the old host added for you. None of that is visible to rsync or a database dump, and each lands on the destination as a fatal, a blank page, or a plugin that silently deactivates itself. This is the audit you run a week before the move: produce the plugin list with WP-CLI, enrich it with the four signals that predict breakage, then decide what to do about each.

What you’ll accomplish

  • One CSV per site listing every plugin, theme, must-use plugin, and drop-in, produced from the command line rather than clicked through wp-admin.
  • Each row enriched with upstream activity (last release, “tested up to”), the declared Requires PHP, license binding to a domain or IP, and anything touched outside wp-content/plugins.
  • A named list of drop-ins and host-installed mu-plugins — the two categories an admin-screen review misses completely.
  • A PHP extension diff between source and destination, so “it worked on the old server” has a cause attached.
  • Every plugin in exactly one of four buckets — carry over as-is, move the license, replace before cutover, drop — with an owner and a date on the last three.

Prerequisites

  • SSH on the source with WP-CLI 2.x. Run wp --info first: it prints the version and, more usefully, the PHP binary WP-CLI is using. Some managed hosts pin an old release; everything below works from 2.4 onwards.
  • WordPress 5.5 or newer. The must-use and dropin statuses are much older, but auto_update arrived in 5.5 — drop it from --fields on anything earlier or the command errors out.
  • Shell access on the destination, or on a staging build running the PHP version and extension set you intend to use in production. Your laptop is not a comparison.
  • Vendor portal access for any premium plugins; half the license work happens in an account, not on a server. Bash rather than sh, for the process substitution in the validation step. No maintenance window: steps 1 through 8 do not write to the site.

How it works

wp plugin list gives you a skeleton — name, status, version, update pending. Nothing in it predicts a failed migration. The signals that do live elsewhere: in the readme on wordpress.org, in the header of the plugin’s main PHP file, in a vendor’s activation record, or on the server outside the plugin directory.

So the audit is one cheap command, four enrichment passes, then a decision. Upstream activity says whether anyone still maintains code you are about to run on newer PHP. Requires PHP gives the floor the author claims. License binding says whether the plugin still considers itself paid for on a new IP or domain. Server coupling says whether it has pieces a file copy cannot bring.

Flow from the raw WordPress plugin list through four enrichment signals into a four-way migration classification

Each plugin exits with exactly one label. An inventory where something is “probably fine but a bit risky” is a list nobody acts on.

Step-by-step

  1. Take the raw inventory in one pass. Run this from the WordPress root on the source.
wp plugin list --format=csv --fields=name,status,version,update,update_version,auto_update > plugins-source.csv
wp theme list --format=csv --fields=name,status,version,update > themes-source.csv
wc -l plugins-source.csv themes-source.csv

Expected: two counts, each one higher than the item count because of the header row. The status column should show a mix of active, inactive, must-use, and dropin. A PHP fatal here is itself a finding — see Troubleshooting.

  1. Split out must-use plugins and drop-ins. They behave differently from everything else.
wp plugin list --status=must-use --field=name
wp plugin list --status=dropin --field=name
ls -l wp-content/mu-plugins/ wp-content/object-cache.php wp-content/advanced-cache.php wp-content/db.php

Expected: the first prints zero or more names, commonly one or two you did not install on a managed host. The second prints drop-in filenames such as object-cache.php. The ls reports “No such file or directory” for absent drop-ins — a useful result, not an error. Record every name: none can be deactivated from the Plugins screen, and several were placed by your host.

  1. Add the update column.
wp plugin list --update=available --fields=name,version,update_version --format=table

Expected: a table of plugins with a newer release upstream, and an empty result when everything is current. A plugin three majors behind is a different risk from one a point release behind, and updating inside the cutover window mixes two changes you will later need to tell apart.

  1. Enrich every slug with upstream activity from the wordpress.org API. The directory exposes a plain JSON endpoint per slug.
for slug in $(wp plugin list --field=name --status=active); do
  meta=$(curl -s "https://api.wordpress.org/plugins/info/1.0/${slug}.json" | python3 -c 'import json,sys
d = json.load(sys.stdin)
if isinstance(d, dict) and "last_updated" in d:
    print("\t".join([d["last_updated"], str(d.get("tested")), str(d.get("requires_php"))]))
else:
    print("not in directory")')
  printf '%s\t%s\n' "$slug" "$meta"
done

Expected: one tab-separated line per active plugin, such as akismet 2026-04-23 10:34pm GMT 7.0.4 7.2 — slug, last update, tested up to, required PHP. not in directory means premium, custom, or pulled: three very different situations that look identical from here. Flag anything last updated over eighteen months ago, or whose “tested up to” trails your destination WordPress by two majors.

  1. Read Requires PHP out of the plugin headers on disk. Step 4 gave you the author’s readme; this is what the destination will actually parse.
for f in wp-content/plugins/*/*.php; do
  grep -q "Plugin Name:" "$f" || continue
  req=$(grep -m1 "Requires PHP:" "$f" | sed 's/.*Requires PHP:[[:space:]]*//;s/[[:space:]]*$//')
  printf '%s\t%s\n' "$(basename "$(dirname "$f")")" "${req:-unset}"
done | sort -u

Expected: one line per plugin directory, such as woocommerce 7.4 and some-old-slider unset. unset is the common case — the header is optional, per the WordPress plugin header requirements — so treat it as unknown, never as safe. Then confirm the destination’s PHP with the binary WordPress itself uses, not what php -v reports in your shell:

wp eval 'echo PHP_VERSION, PHP_EOL;'

Expected: a bare version string such as 8.1.27. A jump across a PHP major is the most common source of post-migration fatals; what a PHP version jump breaks covers where to look.

  1. Diff the PHP extensions between source and destination. On each machine in turn:
php -m | tr -d '\r' | sort > ext-source.txt
wc -l ext-source.txt

Expected: something like 62 ext-source.txt. Run the same command on the destination as ext-dest.txt, bring both to one machine, then:

diff ext-source.txt ext-dest.txt

Expected: ideally no output. Lines starting with < are extensions on the source and missing on the destination, and those break something real. Recurring offenders: imagick (image and PDF plugins), intl (multilingual, date formatting), gd, zip (backup and import tools), soap (shipping and payment gateways), bcmath, exif.

  1. Find the plugins whose license is bound to the old server.
grep -rlE "edd_action|EDD_SL_|license_key|activate_license" wp-content/plugins --include="*.php" | cut -d/ -f3 | sort -u

Expected: a short list of directory names — usually the premium page builder, the premium SEO or security plugin, the forms plugin, the backup plugin. To see where one phones home:

grep -rhoE "https://[a-zA-Z0-9.-]+" wp-content/plugins/<slug> --include="*.php" | sort | uniq -c | sort -rn | head

Expected: a ranked list of hostnames with counts, such as 41 https://api.vendor.example. Confirm in each vendor portal what the activation is keyed to. Site-URL-keyed licenses survive a server move and break on a domain change; IP-keyed licenses do the opposite. Deactivate on the source before cutover, reactivate on the destination afterwards — most vendors rate-limit re-activations, and learning that inside the window is expensive.

  1. Find the server-coupled pieces. Start with cron, because that failure is silent.
wp config get DISABLE_WP_CRON
crontab -l | grep -i -E "wp-cron|wp cron"

Expected: true or 1 on any host that moved you off WP-Cron, plus one crontab line calling wp-cron.php through curl or wget. If the first errors out saying the constant is not defined in wp-config.php, then WP-Cron still fires on page loads and there is nothing to carry. If both exist, recreate that crontab line on the destination — replacing WP-Cron with a system cron entry has the form. Then see which plugins depend on it:

wp cron event list --fields=hook,next_run_relative,recurrence --format=table

Expected: a table of scheduled hooks. Hook names carry their owner’s prefix, so woocommerce_scheduled_sales and action_scheduler_run_queue name themselves. Those plugins stop working without complaining if cron does not come across. Finally, writes and shell-outs:

find . -maxdepth 1 -type f -name "*.php" ! -name "wp-*.php" ! -name "index.php" ! -name "xmlrpc.php"
grep -rlE "shell_exec|passthru|proc_open|popen" wp-content/plugins --include="*.php" | cut -d/ -f3 | sort -u

Expected: the find normally prints nothing. Anything it prints is a PHP file dropped at the web root by a plugin or an attacker, and it will not be inside a wp-content copy. The grep prints plugins that call system binaries; confirm the destination has each one on PATH.

Map of the places a WordPress plugin reaches outside wp-content/plugins: drop-ins, host mu-plugins, a system cron entry, PHP extensions and binaries, and an external license endpoint

  1. Classify each plugin into one bucket and write it down. Keep it flat, next to the CSV, so validation can check it.
printf 'slug\tbucket\towner\tdue\n' > buckets.tsv
printf 'akismet\tcarry\t-\t-\n' >> buckets.tsv
printf 'acme-builder-pro\tlicense\tmarie\t2026-08-19\n' >> buckets.tsv

Expected: a growing TSV. carry when nothing in steps 4 through 8 flagged it. license when it is paid and keyed to something that changes. replace when upstream is dead, the PHP floor is above your destination, or it needs an extension you cannot get. drop for anything inactive nobody can justify — a migration is the cheapest moment to delete a plugin.

Validate it works

First, prove every plugin got a decision. Nothing should print:

tail -n +2 plugins-source.csv | cut -d, -f1 | sort > all-plugins.txt
tail -n +2 buckets.tsv | cut -f1 | sort > classified.txt
comm -23 all-plugins.txt classified.txt

Then restore to the destination staging build and compare the two inventories directly:

wp plugin list --format=csv --fields=name,status,version > plugins-dest.csv
diff <(tail -n +2 plugins-source.csv | cut -d, -f1,2 | sort) <(tail -n +2 plugins-dest.csv | cut -d, -f1,2 | sort)

Expected: no output apart from rows you deliberately changed. A plugin that arrived inactive when it was active, or a dropin row that vanished, is what this audit exists to catch. Finally, three confirmations on the destination:

wp plugin verify-checksums --all
wp cron event list --format=count
wp eval 'echo PHP_VERSION, PHP_EOL;'

Expected: Success: Verified 24 of 24 plugins. or a similar count, with warnings for plugins not distributed through wordpress.org — those cannot be checksummed, and the warning is normal. The cron count should be within one or two of the source, and the PHP version the one you diffed extensions against in step 6.

Troubleshooting

wp plugin list dies with a PHP fatal. Re-run as wp plugin list --skip-plugins --skip-themes --format=csv, which loads WordPress without executing plugin code. You get the inventory, and the fatal names a replace candidate. Never migrate around a fatal you have not read.

Most slugs come back not in directory. Premium plugins were never listed; plugins pulled for a security issue no longer are. Both return the same nothing. A vendor invoice means premium; a formerly free plugin with no invoice was probably removed — treat it as replace.

Requires PHP says 7.0 but the plugin still fatals on PHP 8.2. The header declares a floor, not a ceiling, and it is a claim rather than a test: an author who set Requires PHP: 7.0 in 2019 and stopped shipping in 2023 never tested 8.2. Only a staging run settles it.

A drop-in copied by hand keeps throwing a fatal. Drop-ins are generated by their parent plugin against the local server, so a copied object-cache.php points at a Redis or Memcached socket that does not exist on the new box. Delete it and let the parent write a fresh one once the new backend is configured.

A premium plugin deactivates itself hours after cutover. The license check runs on a schedule rather than every request, so an IP-bound or domain-bound activation fails late and looks unrelated to the migration. Rebind in the vendor portal; this is why step 7 exists.

When this is the wrong approach

This is a migration preflight, scoped to one move. If you want a standing security posture across many sites — which plugins have gone unmaintained, which need retiring, on a schedule — that is a different runbook: auditing abandoned plugins across a WordPress fleet.

Skip most of this for a same-host account transfer, such as a cPanel-to-cPanel move through the transfer tool: those carry drop-ins, mu-plugins, cron entries, and PHP configuration together, so the audit asks questions whose answers cannot change. Skip it entirely for a small site with under ten plugins and no premium licenses, where a clean install plus a content import is faster.

And be honest about what an inventory is: it predicts, it does not test. It will not catch a plugin that breaks for a reason nobody wrote down. A full staging run on the destination image is the only thing that finds those, and no audit removes the need for a rollback plan and a real maintenance window. The commands are documented in the WP-CLI plugin list reference.

Running WordPress that earns real money deserves an operator — Stack Harbor runs that stack under Enterprise WordPress; book an infrastructure consult.