WordPress command line

Work on your Wordpres via command line – saves time & increasing fun!
Did you know? WP-CLI is the official command line tool for interacting with and managing your WordPress sites. The idea  is that it allows you to interact with, and manage, WordPress sites via a command line interface. According  to the official documentation, it’s a command line alternative to using the traditional WordPress admin user interface. There are many things you can perform with that tool such as take backups, perform database operations, publish content, manage WP-Cron jobs, and perform hundreds of other tasks.

How to Install WP-CLI

Step 1

Make sure that your WordPress is meeting the requirements, which are:

  • PHP 5.3. 2 or later
  • WordPress 3.4 or later

You can check and update your PHP version via your Servage control panel with few clicks. Click HERE to find the guide how to do that. We recommend to update to the newest PHP version.

In the next step, make sure you run WordPress in the version 3.4 or higher.  You can easily upgrade your WordPress via your Servage account to the newest version, click THIS LINK to get to know how.

Step 2
First connect to your server’s command line through SSH. For each Servage hosting account, we are offering one SSH account. You find more info about SSH in our Helpdesk (click HERE) or directly via our 24/7 real support.

Using the cURL command, type:

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

Step 3

Next, we will set the permissions to make it executable. Enter the following command:

chmod +x wp-cli.phar

Your are done! You can now start using the WP-CLI commands.  HERE is a listing of all currently available WP-CLI commands with links to documentation on usage and subcommands.