WP-CLI is a command-line tool for managing WordPress. It lets you update WordPress, manage plugins and users, and fix problems – even when you can’t get into your WordPress admin area. It’s already installed on your hosting, so there’s nothing to set up.
1. Connect over SSH
You’ll need SSH access to your website. For security, SSH is only allowed from IP addresses we’ve approved, so you may need to ask us to add yours first. See how to connect to your website using SSH.
2. Go to your website’s folder
When you connect, you start in your website’s home folder. WordPress is usually in the public_html folder, so move into it:
cd ~/public_html
WP-CLI commands need to be run from the folder where WordPress is installed – the one containing the wp-config.php file.
3. Check it’s working
wp --info
wp core version
The first command shows details about WP-CLI and PHP. The second shows your WordPress version. If you see a version number, you’re ready to go.
Useful commands to try
| Command | What it does |
|---|---|
wp plugin list | Lists your plugins, whether they’re active, and whether updates are available |
wp theme list | Lists your themes |
wp user list | Lists your WordPress users |
wp option get siteurl | Shows your website’s address, as WordPress sees it |
wp help | Lists every command. Add a command name for help with it, for example wp help plugin |