Documentation

Can I use the wordpress command line client WP-CLI?

Last Updated: August 15, 2024 4:14 AM

Yes, WP-CLI is available on all Wordpress sites hosted with Dollie. It is built into our Control HQ and can even be made available to customer inside your Hub.

Using WP CLI from Control HQ & Your Hub

WP CLI can be found inside your Site Management Dashboard under the "Developer Tools" section. Go to Developers > WP CLI to open the terminal.

| Note: Make sure you are logged in to the site first.

Using the WP-CLI

Examples:

# Create a new database.
$ wp db create Success: Database created. 
# Drop an existing database. 
$ wp db drop --yes Success: Database dropped. 
# Reset the current database. 
$ wp db reset --yes 
Success: Database reset. 
# Execute a SQL query stored in a file. 
$ wp db query < debug.sql```

For more details on the database operations available to you using the wp-cli check out [the wp-cli documentation](https://developer.wordpress.org/cli/commands/db/).