> ## Documentation Index
> Fetch the complete documentation index at: https://kb.mochahost.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using WP-CLI in the Mochahost Dashboard

> Learn how to access and use the WordPress command-line tool WP-CLI in the Mochahost Dashboard.

With our unique WordPress command-line interface terminal, using WP-CLI has never been easier! No longer do you need to be a Linux pro to make use of the powerful WP-CLI tool set.

<Check>
  Tip
  Before you use WP-CLI, please read the release announcement at the [Rocket.net blog](https://rocket.net/blog/introducing-web-based-wp-cli-terminal-for-managed-wordpress-hosting/) for an overview and some basic information about how to use it.
</Check>

# Accessing WP-CLI

To access WP-CLI from the Mochahost Dashboard, follow these steps:

1. Log in to the Hosting Panel at [https://clients.mochahost.com](https://clients.mochahost.com).
2. In the left sidebar, click **Managed WordPress**:

   ![](https://files.readme.io/cc0800463b6cee2a9e10d4ff4567520db4722a5f358addaea8f08c58863ef506-image.png)
3. On the **My Websites** page, locate the site, and then click **Manage**:

   ![](https://files.readme.io/6d858372e81062e6ea0e6f14005fe05910430523d51a6e9fc20c62e1f5b18747-image.png)
4. On the Mochahost dashboard, click the **Advanced** icon:

   ![](https://files.readme.io/e01ab951b7caae734b6f49b7e14c7a158f35ff2175dfd5ab23b6c055d77d4baf-image.png)
5. In the **Advanced Settings** section, in the **WP Command Line Interface** row, click **WP-CLI:**

   ![](https://files.readme.io/3d711d1c9837b82dfd7534336fba33b6edc9929e1b2519ed9306443e4f5fc5b6-image.png)
6. The WP-CLI terminal appears, ready for your commands:

   ![](https://files.readme.io/3ebea7b9cfa36faed0377a2a7c23bbe8f6b2759133f851efbd3a05c08a15dba1-image.png)

<br />

# Using WP-CLI

The WP-CLI Terminal is not the same as an SSH command prompt. The only command available is wp with another command called an "argument" after it. For example:

`wp theme list`

`wp plugin list`

`wp user list`

The wp command invokes WP-CLI, and \[item] list displays lists of each of those items.

One of the most powerful tools available in WP-CLI is the search-replace command, which allows you to search the database for any text and replace it.

For example, the following command changes references from an old domain name (example.net) to a new domain name (example.com):

wp search-replace '[https://example.net](https://example.net)' '[https://example.com](https://example.com)'

<Note>
  Important
  You should not use this command to change a site’s domain name. The example above refers to an arbitrary URL in the database.
</Note>

In some cases, you may need to use the options --all-tables and --precise to instruct WP-CLI to search the entire database. You may also want to add the --dry-run option at the end so you can test the command without making any actual replacements in the database.
