Saturday, October 24, 2026The WordPress PlaygroundFacebookXPinterest
Glossary

WP-CLI

WP-CLI is the official command-line tool for WordPress. CLI stands for Command Line Interface, which means you manage your site by typing commands in a terminal instead of clicking around the dashboard.

It sounds scary at first, but it saves a ton of time. Updating every plugin on a site, for example, takes just one short command.

What Can You Do With WP-CLI?

Almost everything you do in the dashboard, and plenty of things you can't. Here are some everyday commands:

  • wp core update updates WordPress to the latest version.
  • wp plugin update --all updates all your plugins at once.
  • wp plugin install akismet --activate installs and activates a plugin.
  • wp user list shows all the users on your site.
  • wp db export saves a backup copy of your database.

It works just like a TV remote. You can walk up to the TV and press its buttons, but the remote does the same job faster from your couch.

How to Start Using WP-CLI

  1. First, check that your host gives you SSH access. Many good hosts include WP-CLI already.
  2. Now, connect to your server through SSH using a terminal app.
  3. Next, move into the folder where WordPress is installed.
  4. Here, type wp --info and press Enter. If you see version details, WP-CLI is ready.

If it is not installed, you can download it as a single file and set it up yourself. The official WP-CLI commands reference lists every command with examples.

Search and Replace With WP-CLI

One of the most loved commands is wp search-replace. It swaps old text, like an old URL, across the whole database and handles serialized data safely. You can learn more in our guide on how to perform search and replace in WordPress.

Warning

Commands run instantly, and there is no undo button. Take a database backup first, and add --dry-run to wp search-replace to preview the changes.

[/notice]

That's it for WP-CLI. Once you get used to it, you may never want to update plugins one by one again. If you have questions, drop them in the comment box below.