WP-CLI is the command-line tool for WordPress. With it you can update plugins, reset a password or search and replace across the database without opening wp-admin.
You need a shell to run WP-CLI. On Container Hosting, open the Terminal tab in your container panel. On DirectAdmin hosting, ask support to enable SSH (a jailed shell) first. On a VPS, install WP-CLI yourself.
1. Where you can run it
| Product | WP-CLI |
|---|---|
| DirectAdmin hosting | Over SSH, after support enables SSH for your account (open a ticket) |
| VPS | Install it yourself (see wp-cli.org), then run it over SSH |
| Container Hosting | In the browser Terminal tab (confirm your password or 2FA to open it) |
2. Getting started on DirectAdmin hosting
- Ask for SSH.Open a ticket and ask support to enable SSH on your hosting account.
- Connect.
ssh yourusername@your-server-hostname - Go to your site folder.
cd ~/domains/yourdomain.com/public_html - Check it works.
wp --info. If the command is not found, tell support on the same ticket.
3. Useful commands
wp core version # WordPress version
wp core update # update WordPress
wp plugin list # list plugins
wp plugin update --all # update all plugins
wp plugin deactivate --all # turn off every plugin (white-screen fix)
wp theme update --all # update all themes
wp user list # list users
wp user update 1 --user_pass='NewStrongPassword' # reset a password
wp search-replace 'https://old.example' 'https://new.example' --dry-run
wp cache flush # flush the object cache
wp cron event list # scheduled tasksRun search-replace with --dry-run first, and take a backup before changing the database.
4. Getting started on Container Hosting
- Open the Terminal tabin your container panel and confirm your password or 2FA code.
- Go to your site folder.
cd ~/public_html - Check it works.
wp --info. If the command is not found, open a ticket.
Take a backup with Back up now on the Backups tab before you change the database.
Where can I run WP-CLI on StarDomain?
In the Terminal tab on Container Hosting, over SSH on DirectAdmin hosting (enabled on request), or on a VPS.
How do I fix a white screen without WP-CLI?
Check the error log (the Logs tab on Container Hosting), then rename the suspect plugin's folder in wp-content/plugins to turn it off.