Create a Wordpress site from the command line with wp-cli

PUBLISHED ON FEB 20, 2018

The first step is to install the wordpress command line tool. The below commands will download the package, grant the appropriate permissions for using the files and move the package to a place in our computer to a place where we can conveniently use it.

$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
$ chmod +x wp-cli.phar
$ sudo mv wp-cli.phar /usr/local/bin/wp
$ wp
$ mkdir wordpress-local-site && cd wordpress-local-site
$ wp core download
$ wp server
$ mysql -uroot -p
> create database wordpress;

Full post is on Medium

comments powered by Disqus