Setup wordpress using wp-cli
From GLMWiki
Contents
Setup mysql user
Here's how to create a mysql user that can add and modify databases in mysql.
GRANT USAGE ON *.* TO devuser@localhost IDENTIFIED BY 'devpass'; GRANT ALL PRIVILEGES ON *.* TO devuser@localhost; FLUSH PRIVILEGES;
Setup default config file for wp-cli
~/.wp-cli/config.yml
core install: admin_user: devuser admin_password: devpass admin_email: dev@email.com title: WordPress Development core config: dbuser: devuser dbpass: devpass dbhost: localhost extra-php: | define( 'WP_DEBUG', true ); define( 'DISALLOW_FILE_EDIT',true ); $table_prefix = 'glm_';
Download Wordpress
mkdir ~/sites/wordpress cd ~/sites/wordpress wp core download
Configure WordPress Installation
Note I had to manually create the mysql database before this step
wp core config --dbname=my-database-name
Create the Database
wp db create
Create the wordpress database tables
wp core install --url=testwp.localhost
Start php server
wp server --host=wordpress.dev
You'll have to add wordpress.dev or whatever you set the host to in your /etc/hosts file.
127.0.0.1 wordpress.dev
Once you do that you'll be able to goto http://wordpress.dev:8080
I was able to setup permalinks using Post name