Spectial
Offer. We are offering a
15%
discount on this London Dedicated Server. Use this Coupon Code 4BMS2SU5OB
Buy Now
Spectial
Offer. We are offering a
15%
discount on this London Dedicated Server. Use this Coupon Code 4BMS2SU5OB
Buy Now
Spectial
Offer. We are offering a
15%
discount on this London Dedicated Server. Use this Coupon Code 4BMS2SU5OB
Buy Now
Spectial
Offer. We are offering a
15%
discount on this London Dedicated Server. Use this Coupon Code 4BMS2SU5OB
Buy Now
Spectial
Offer. We are offering a
15%
discount on this London Dedicated Server. Use this Coupon Code 4BMS2SU5OB
Buy Now
Spectial
Offer. We are offering a
15%
discount on this London Dedicated Server. Use this Coupon Code 4BMS2SU5OB
Buy Now
Spectial
Offer. We are offering a
15%
discount on this London Dedicated Server. Use this Coupon Code 4BMS2SU5OB
Buy Now
Spectial
Offer. We are offering a
15%
discount on this London Dedicated Server. Use this Coupon Code 4BMS2SU5OB
Buy Now
Spectial
Offer. We are offering a
15%
discount on this London Dedicated Server. Use this Coupon Code 4BMS2SU5OB
Buy Now
Spectial
Offer. We are offering a
15%
discount on this London Dedicated Server. Use this Coupon Code 4BMS2SU5OB
Buy Now
WP-CLI is a powerful command-line tool that allows you to manage WordPress installations efficiently. Whether you're installing plugins, updating themes, or managing users, WP-CLI speeds up your workflow and is ideal for system administrators, developers, and agencies managing multiple WordPress sites.
In this tutorial from Colobird, we’ll walk you through how to install WP-CLI globally on a server and demonstrate some of the most useful commands.
Automate repetitive tasks.
Perform updates without logging into the WordPress dashboard.
Manage plugins, themes, users, and more via terminal.
Save time on large-scale WordPress maintenance.
Before you begin, ensure your server environment meets the following requirements:
A UNIX-like operating system (Linux, macOS, FreeBSD, etc.)
PHP version 5.4 or higher
WordPress 3.7 or newer installed
To install WP-CLI globally on your server, follow these steps:
1. Download WP-CLI using curl or wget:
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
2. Check that WP-CLI works:
php wp-cli.phar --info
3. Make the file executable and move it to a global location:
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
4. Verify the installation:
wp --info
If everything is set up correctly, you’ll see details about your server environment and WP-CLI version.
To update WP-CLI to the latest version, run:
wp cli update
Or repeat the installation steps with the latest .phar
file.
To test WP-CLI from a specific user account (e.g., your WordPress site user):
su - wordpress
wp --version
Replace wordpress
with the actual system username.
List all installed plugins:
wp plugin list
Activate a plugin:
wp plugin activate plugin-name
Deactivate a plugin:
wp plugin deactivate plugin-name
Delete a plugin:
wp plugin delete plugin-name
Update all plugins:
wp plugin update --all
Update a single plugin:
wp plugin update plugin-name
List all themes:
wp theme list
Install a theme:
wp theme install theme-name
Activate a theme:
wp theme activate theme-name
Update all themes:
wp theme update --all
Check current WordPress version:
wp core version
Update to the latest WordPress version:
wp core update
Downgrade WordPress to a specific version (use with caution):
wp core update --version=6.2.2 --force
List all users:
wp user list
Create a new administrator:
wp user create newusername email@example.com --role=administrator --user_pass=StrongPassword123!
Update a user’s password:
wp user update username --user_pass=NewSecurePassword
Delete a user:
wp user delete username
Delete a user and reassign their content to another user:
wp user delete olduser --reassign=newuser
Official WP-CLI Handbook
WP-CLI Commands
WP-CLI Community Commands
WP-CLI is an essential tool for any WordPress server administrator or developer. With it, you can streamline your workflows, automate tasks, and manage WordPress efficiently — all from the command line.
Need help setting up WP-CLI on your Colobird-hosted server? Contact our support team, we're here to help!