Websites & Applications

Run a WP-CLI command on your WordPress site

Run WP-CLI commands such as wp cache flush or wp plugin update on your NetOz-hosted WordPress environment from the browser, and keep a history of every command and its output.

Last updated 2 min read4 steps
On this page

WP-CLI is the command-line tool for WordPress. NetOz lets you run WP-CLI commands inside your environment straight from the portal, with no SSH access needed. Every command, who ran it and its output are recorded.

Before you start

  • You need Applications set to Manage for the application or environment.
  • Commands run against the live environment. Take a database backup first if the command changes content or settings.

Step 1 Open Command Executions

Go to Applications, open your website and select Manage on the environment. Choose Command Executions.

Open Command Executions in the NetOz Portal
Open Command Executions in the NetOz Portal

Step 2 Review previous commands

The list shows every command run on this environment, who ran it, whether it finished or failed and when. Select any row to see its output. To run a new one, select New Command.

Review previous commands in the NetOz Portal
Review previous commands in the NetOz Portal

Step 3 Enter the command and run it

Type the WP-CLI command, starting with wp, and select Execute.

Enter the command and run it in the NetOz Portal
Enter the command and run it in the NetOz Portal

Step 4 Read the output

The output appears as soon as the command finishes, usually within 30 seconds. It is also saved to the command history so you and your team can refer back to it later.

Read the output in the NetOz Portal
Read the output in the NetOz Portal

Useful commands

  • wp cache flush clears the WordPress object cache.
  • wp plugin list --update=available lists plugins with an update waiting.
  • wp plugin update <plugin-name> updates a single plugin.
  • wp user list --role=administrator lists administrators.
  • wp search-replace is powerful but changes your database, so back up first.

Was this guide helpful?

Your answer helps us keep these guides accurate.

Still stuck? We're here to help.