Skip to content

Everything for WordPress, web development — and beyond

WP-CLI command builder

WP-CLI command builder for WordPress

Choose a scenario, fill in the fields — and you get a ready block of commands in the right order, with a backup and a dry run. Every flag is explained. The commands are built in your browser.

Adds --path= to every command. Leave empty to run from the site root.
Adds --url= — required for a multisite subsite.
From wp-config.php: $table_prefix.
General toggles
Replacement flags
Choose a scenario and fill in the fields — the commands with explanations will appear here.

The commands are built in your browser — domains, logins and passwords are never sent anywhere and never stored.

The order of the commands matters more than the commands themselves

WP-CLI asks for no confirmation and has no undo. That is why every scenario here follows the same pattern: first a backup, then a dry run, and only then the real command. wp db export — takes seconds and saves an hour of work. --dry-run in search-replace shows how many rows would change without changing anything. Skipping this step is the most expensive mistake in working with WP-CLI. --skip-columns=guid is on by default: in WordPress the guid is an immutable identifier of a post, not an address. Changing it makes RSS readers show the whole archive as new publications. --precise disables the fast path and forces WP-CLI to unpack serialised values. Slower, but this is exactly what saves the widgets and the theme settings. --all-tables-with-prefix picks up plugin tables with your prefix that the standard replacement leaves alone. After any bulk replacement you need wp cache flush and wp rewrite flush — otherwise the site will keep serving the old values from the cache.

Frequently asked questions