Sep 15, 2026 23:59:59

Limited-Time

Summer Offer

  • 0

    Days

  • 0

    Hours

  • 0

    Min

  • 0

    Sec

40% OFF

All Hosting Plans +
Unlimited Free Migrations

CLAIM NOW

*Valid till 15th September 2026

migration_campaign_2026

How to Manage WordPress Website With WP-CLI on Cloudways

A Cloudways tutorial on managing WordPress from the command line with WP-CLI: update plugins, manage themes, run database queries, and more, directly over SSH.

✨ What you’ll learn
✦ How to connect to your server over SSH and navigate to your app’s public_html folder.
✦ How to list, install, activate, deactivate, and update plugins (including all at once) using the plugin slug.
✦ How to check and update WordPress core from the terminal.
✦ How to create posts, list users, and export or import your database as an SQL file.

Welcome to Cloudways. This tutorial will show you how to manage your WordPress site using WP-CLI on the Cloudways platform.

WP-CLI is short for WordPress Command Line Interface. It is a powerful command-line tool that allows you to manage your WordPress installation directly from your server, using SSH, without having to navigate through the WordPress dashboard. It enables you to perform a wide range of tasks such as updating plugins, managing themes, running database queries, and more.

To establish an SSH connection to your server, here we are showing how to build the SSH connection on Mac. If you use Windows, you may check the video linked here to learn how to build an SSH connection to your WordPress application. Now let’s navigate to our server and open an SSH client. In this case, we’ll use the terminal. Begin by typing ssh followed by your master username. After the username, add the @ symbol followed by the server’s IP address. You can easily copy these from the platform. Once you’re connected, let’s start managing WordPress using WP-CLI.

Now you need to navigate to the public_html folder of your application by using this command. To find your application folder name, navigate to your desired application and copy the folder name from Application Settings, and replace the application_folder_name with your application folder name.

WP-CLI makes managing plugins incredibly simple. To list all installed plugins, type the command. To activate a specific plugin, use the command. To install a plugin, it is important to have the correct plugin name, or more specifically the plugin slug. You can find this slug in the WordPress plugin repository. For example, if you’re looking to install Breeze, head over to the WordPress official website. Type “breeze” in the search box, select your plugin. The last part of the URL is the plugin slug. The slug here is “breeze,” so to install this plugin using WP-CLI you would type the command. Here are a few more commands to help you manage plugins. To deactivate a plugin. To update a plugin. And to update all your plugins at once. These work well for all the plugins and make plugin management quick and efficient through the command line.

Updating WordPress core. It’s essential to keep your WordPress core up to date for security and performance. You can quickly check your current WordPress version with the command. You can quickly update your WordPress site to the latest version using the command. With just these simple commands, you ensure your WordPress site is running smoothly and securely.

If your terminal gets cluttered with too many commands or outputs, making it hard to navigate, you can use the clear command to refresh the terminal screen. This helps in maintaining a clean workspace, especially when you’re running multiple commands in succession.

WP-CLI isn’t just limited to plugins and updates. You can use some other commonly used commands that can help you manage your site effectively. To create a new post with a title and publish it immediately, simply run the command. If you want to see a list of all posts on your site, including their status and post type, use the command. You can also list all users registered on your WordPress site by typing the command.

WP-CLI also allows you to export your database into a SQL file. To do that, use the command. Similarly, the other useful commands are to reset a user’s password easily, to retrieve the value of a WordPress option, for example the site name, and to update a WordPress option, such as changing the blog name. If you need to import a database from a SQL file, use the command. To discover more commands and options, you can type the commands to get more help. The link for the WP-CLI official documentation is given in the description.

That’s it for this tutorial. If you have any questions, feel free to check out the Cloudways Knowledge Base or reach out to our support team.