Snippets

Lauren Pittenger WP-CLI Install Setup

Created by Lauren Pittenger last modified
###
## SET UP DATABASE
###
$ /Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot
$ CREATE DATABASE dbname;
$ quit;

###
## IMPORT A DATABASE & FIND/REPLACE
###
$ wp db import path/to/file.sql
$ wp search-replace 'http://replacethis.dev' 'http://withthis.com' --skip-columns=guid

###
## SET UP LOCAL DEV URL
###
$ atom /private/etc/hosts
$ atom /Applications/MAMP/conf/apache/httpd.conf

###
## SET UP WP INSTALL
###
$ wp core download
$ wp core config --dbname=dbname --dbuser=root --dbpass=root
$ wp core install --url=wpcli.dev --title="WP CLI" --admin_user="Lauren Pittenger" --admin_password=securepassword --admin_email=lepittenger@gmail.com
$ wp plugin uninstall akismet
$ wp plugin uninstall hello
$ wp plugin install advanced-custom-fields
$ wp plugin install stop-emails

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.