Subscribe to PHP Freaks RSS

DeveloperDrive: How to Speed Up WordPress Development and Maintenance with WP-CLI

syndicated from www.phpdeveloper.org on October 5, 2017

The DeveloperDrive site has posted a tutorial for the WordPress users out there showing them how to enhance their workflow with WP-CLI, the command line tool that can be used to administer your WordPress instance without needing to log into the web UI.

As a WordPress developer, you’ve probably installed the WordPress CMS, updated it, and activated themes and plugins hundreds of times. And although these routine development and maintenance tasks are fairly easy to do with WordPress’ graphical user interface, doing them over and over again isn’t very efficient.

The good news is that you can easily and effectively speed up WordPress development and maintenance with the WordPress Command Line Interface (WP-CLI). With this in mind, in this post, we’ll explore the different ways you can use WP-CLI and offer some helpful WP-CLI commands to help you get started with a step in the right direction.

The post starts with a brief introduction to the WP-CLI tool and shows how to get it installed on your system in a Unix-based environment (basically grabbing a phar). It then walks you through some of the features of the tool including:

  • installing a new WordPress instance from scratch
  • keeping it updated
  • managing themes and plugins
  • creating custom post types

Examples of each command line call are included as well as some details about options and what's happening behind the scenes.