Skip to content

Audit. Clean. Optimize. Verify.

WordPress operations from FTP or an offline archive — plan-first, snapshot-backed, and verified.

Quickstart Safety model View on GitHub

Python 3.12+ License: MIT Status: beta Platform: Linux and macOS

wpt treats a WordPress site as a reproducible artifact: a live FTP webroot or an offline zip + MySQL dump. It plans every change, snapshots what it touches, applies only when asked, and verifies the result.

Two source modes, one contract

  • FTP / FTPS

    Work against a live webroot even when DNS points somewhere else, with TLS verification on by default.

  • Zip + SQL dump

    Audit and rehearse offline. The original archive stays untouched and is the rollback.

  • Local rehearsal

    Serve and verify a rehearsed zip before publishing it.

What it does

  • 38-check audit

    Core integrity, security, database health, media, performance, and configuration — with a Markdown report and a JSON twin.

  • Clean and optimize

    Junk files, stale core files, revisions, transients, orphan metadata, oversized media, WebP conversion, and hardening.

  • Backup and restore

    Full-site snapshots with manifests, selected-file rollback, and a transactional deploy that streams a webroot over SSH.

  • Verify

    Re-walk the site and re-fetch every live reference. Exit non-zero when something is broken.

  • Self-bounding

    Deadlines, circuit breakers, heartbeat progress, and graceful SIGTERM handling instead of a run that grinds forever.

  • Secrets stay out of files

    Passwords come from the environment; one logging path redacts them before they reach a log, report, or exception.

Quick start

Audit an offline archive and dump:

wpt --source local --zip site.zip --sql dump.sql audit --report audit.md

Preview a cleanup, then apply it:

wpt --source local --zip site.zip --sql dump.sql clean-files
wpt --source local --zip site.zip --sql dump.sql clean-files --apply --yes

Plan first

The first command is a dry-run plan. The second applies it. For a live site, use --apply only after reading the plan and taking a snapshot.

Safety by default

  • Read-only by default. No mutation happens without --apply.
  • Snapshots for FTP mutations. Every FTP mutating action snapshots its affected scope first; no snapshot means no apply.
  • Local mode rehearses. It mutates an in-memory overlay and materializes a new zip; the original is the rollback.
  • One redaction path. Credentials never reach a log, report, receipt, or exception.
  • Bounded work. A dead or crawling FTP channel trips a breaker instead of holding the run hostage.

Read the full safety model How the pieces fit

Documentation map

  • Quickstart — install, first audit, reports, apply.
  • Commands — task-oriented workflows.
  • Safety — plans, snapshots, rollback, local mode.
  • Architecture — sources, actions, bridge, audit, tests.
  • Development — setup, tests, packaging, release.
  • FAQ — platforms, databases, and operational limits.
  • Research — verified implementation recipes.

wpt is MIT licensed. Copyright © 2026 The wpt authors.