Skip to content

WordPress hardening checklist after a site takeover

A WordPress site you just inherited from a previous vendor or agency needs a hardening pass before it goes into your operations cadence. The 14-point checklist that produces a defensible starting baseline.

You just took over a WordPress site from a previous vendor, an agency, or an internal team that has moved on. You do not know what controls are in place, what shortcuts were taken, what credentials are still floating in a previous developer’s Notes app. Before this site enters your operations cadence — before you take an on-call rotation for it, before you put it under SLA — it needs a hardening pass. The 14-point checklist below produces a defensible baseline in a half-day for one site, a week for a fleet of twenty.

What’s happening

A site you did not build is a site with unknown security posture. The previous owners may have done excellent work, sloppy work, or both. The takeover checklist treats every assumption as suspect:

  • Every credential might be in the previous owner’s password manager.
  • Every plugin might be on a version with a known CVE.
  • Every cron event might be running attacker code planted years ago.
  • Every admin user might be a service account that has not been used in two years.
  • Every backup might be misconfigured and produce zero-byte files.

The work is methodical, not dramatic. None of the items below is complicated; what makes the checklist valuable is that you run all 14 in sequence and produce evidence for each.

How to verify

Initial site fingerprint:

# Versions
wp core version
wp plugin list --fields=name,version,status,update --format=csv > /tmp/plugins.csv
wp theme list --fields=name,version,status --format=csv

# Active users with admin roles
wp user list --role=administrator --fields=ID,user_login,user_email,user_registered,last_login

# WordPress URL settings
wp option get siteurl
wp option get home
wp option get admin_email

# Whether file editing is enabled in the admin
grep -E "DISALLOW_FILE_EDIT|FORCE_SSL_ADMIN|WP_DEBUG" wp-config.php

# Database table prefix
grep "table_prefix" wp-config.php

# Plugins with available updates (probably overdue)
wp plugin list --update=available --field=name

This output is the input for the hardening pass.

The fix

The 14 points, in execution order. Each one produces a measurable change.

  1. Rotate every secret. Salts, all administrator passwords, application passwords, the database user password if you control it, any API keys in plugin settings:

    wp config shuffle-salts
    wp user list --role=administrator --field=ID | xargs -I {} wp user reset-password {} --skip-email
    wp db query "DELETE FROM wp_usermeta WHERE meta_key = '_application_passwords';"

    The new credentials go to your password manager and the previous-owner-provided credentials get marked compromised. Any session that was active before the rotation is now invalid.

  2. Audit administrator accounts. Every account with the administrator role gets verified:

    wp user list --role=administrator --fields=user_login,user_email,user_registered,last_login --format=csv

    Service accounts get documented (what they are for, who owns them). Personal accounts of people who no longer work on the site get demoted to subscriber or deleted. Unknown accounts get investigated.

  3. Update WordPress core to current. Test in staging, then production:

    wp core update
    wp core update-db

    If the site is on a major version more than two behind current, expect plugin compatibility issues. Address them; the alternative is staying on an unpatched WordPress, which is not an option.

  4. Update every plugin to current. Same pattern. Plugins that are abandoned or no longer compatible go on the replacement list:

    wp plugin update --all
    wp plugin list --update=none
  5. Remove inactive plugins. Deactivated plugins still count as attack surface — their files are on disk, their database tables are present, their hooks may still register:

    wp plugin list --status=inactive --field=name | xargs -n1 wp plugin delete
  6. Verify core file integrity. wp core verify-checksums should return zero output. Any output means files have been modified compared to the WordPress.org distribution — investigate each one:

    wp core verify-checksums
    wp plugin verify-checksums --all
  7. Enable file editing block. The admin file editor is a backdoor channel for an admin compromise. Disable it:

    wp config set DISALLOW_FILE_EDIT true --raw

    Add DISALLOW_FILE_MODS true if the site does not need to install plugins from the admin (deployment should be via WP-CLI or version control anyway):

    wp config set DISALLOW_FILE_MODS true --raw
  8. Force HTTPS for admin. Even if the site is HTTPS-only:

    wp config set FORCE_SSL_ADMIN true --raw
  9. Deploy 2FA for administrators. Per the 2FA rollout KB. The previous owner may not have had 2FA configured; assume not until verified.

  10. Configure the WAF. If the site is behind Cloudflare or similar, apply the WordPress-specific custom rules per the WAF KB. If not, evaluate whether to add a WAF — the threshold for “needs a WAF” is essentially “exists on the public internet.”

  11. Configure audit logging. Install Simple History or equivalent per the audit logs KB. Set retention to one year minimum.

  12. Configure backups. Verify that backups exist, run on a schedule, and write to off-site storage that the production server cannot reach. Test restoration on a staging environment — a backup that has not been restored is a backup that does not work.

  13. Lock down the admin area. Apply IP allowlisting per the admin IP allowlist KB, rate-limiting on the login form, and disable XML-RPC or restrict it to Jetpack IPs.

  14. Document the takeover state. The artifact at the end of the checklist:

    • WordPress version, list of active plugins and versions, list of administrators, list of all admin users (active and inactive).
    • Security plugin in use and its configuration.
    • Backup configuration and last successful backup verification date.
    • WAF configuration and notable rules.
    • Identified gaps (any item above that was not fully completed, with the reason and the follow-up plan).

This document goes into the site’s runbook and is the baseline that future audits compare against.

A WordPress site that has been through this checklist is in a defensible operational state. It is not “fully secure” — no site is — but it is a site where you can answer “what controls are in place” without guessing. Stack Harbor runs this checklist on every site taken over under enterprise WordPress support, and the documentation it produces is the baseline for the ongoing ops cadence. If you just inherited a WordPress site or fleet and need to bring it to a defensible state before going live with operations, book the takeover audit.