Manage your WordPress via Command Line – Install and Use WP-CLI On Ubuntu Linux 15.04

PHP CLI

WordPress is the most widely used blogging and Content Management System. A big percentage of internet sites are using WordPress at the moment. programmers all around the world are developing plugins and themes to enhance the functionality and look & feel of wordpress sites. WordPress is known for its simplicity and ease of use. Any user with basic experience and knowledge of computers and Content management can use this tool easily. Although, everthing on wordpress can be done via graphical user interface, also known as admin panel,  but there is one nice command line utility out there; PHP-CLI, it lets you manage your wordpress installations from command line. All the tasks you do from Admin or graphical panel can be done from command line now.

Installing and Using WP-CLI On Ubuntu

In order to use this tool, we should have following components installed on our Linux system.

  • PHP 5
  • Curl

Kindly note that wordpress also used MySQL and Apache, so lets just install Lamp-stack on our Ubuntu system, it should suffice for our needs.

sudo apt-get install lamp-server^

Once the installation of Lamp-stack is complete, run following command to install Curl.

sudo apt-get install curl

Our Ubuntu system is ready for WP-CLI now, run following on the terminal to install it.

curl -k -L https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar > wp-cli.phar

Here is how the successful installation process should look like.

Installing WP-CLI

Test the installation by running the following command:

php wp-cli.phar –info

PHP CLI

Start managing your old or new WordPress installations using command line tool.

Conclusion

You can do literally every Wrdpress related operation using this tool. Command Line junkies find this tool interesting and useful. Try it out today, do let us know about your comments and feedback.