Skip to content

Instantly share code, notes, and snippets.

@Zackio
Last active August 6, 2018 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zackio/e0a041f964e535ce370571363682cb91 to your computer and use it in GitHub Desktop.
Save Zackio/e0a041f964e535ce370571363682cb91 to your computer and use it in GitHub Desktop.
wp option update home 'http://localhost'
wp option update siteurl 'http://localhost'
wp config create --dbname="Horizon" --dbuser="root" --dbpass="pw"
wp db create
wp core install --url=localhost:8080 --title=title --admin_user=admin --admin_password=pw --admin_email=example@example
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-cli

Install:

brew install homebrew/php/wp-cli

Upgrade:

brew upgrade wp-cli   

Check version

wp --info

Issues

Error establishing a database connection

PHP not set to MAMP. which php to check then edit zshrc path something like this

PATH=~/git-home/bin:/Applications/MAMP/bin/php/php5.6.10/bin/:/Applications/MAMP/bin/php/php5.6.10/:/Applications/MAMP/Library/bin:$PATH:

Install Mulit-site

wpc [sitename] && cd [sitename]
wp core multisite-install --title="PHP 5.6.10" --admin_user="root" --admin_password="pw" --admin_email="zackary.allnutt@gmail.com"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment