Skip to main content
WP-CLI is installed on all servers. When you are logged in over SSH, run it as the wp command.

Useful commands

Create an administrator user

wp user create myuser me@email.com --role=administrator

Verify WordPress core and plugins

wp core verify-checksums
wp plugin verify-checksums --all

Install and activate a plugin

wp plugin install litespeed-cache --activate

Reinstall an existing plugin

wp plugin install litespeed-cache --force

Update all plugins

wp plugin update --all

Search and replace (for example HTTP to HTTPS)

wp search-replace 'http://mydomain.com' 'https://mydomain.com' --skip-columns=guid --precise
For search-replace, add --all-tables if you need every table in the database, not only those WordPress registers via $wpdb.
Many subcommands support --dry-run so you can preview changes before applying them.
Last modified on June 4, 2026