Skip to content

Instantly share code, notes, and snippets.

@lepittenger
Created March 15, 2016 16:36
Show Gist options
  • Save lepittenger/71dbd8437a034bdd8bc6 to your computer and use it in GitHub Desktop.
Save lepittenger/71dbd8437a034bdd8bc6 to your computer and use it in GitHub Desktop.
###
## 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 [email protected]
$ wp plugin uninstall akismet
$ wp plugin uninstall hello
$ wp plugin install advanced-custom-fields
$ wp plugin install stop-emails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment