Install
The recommended way to install core files, themes and plugins is with WP CLI.
Virtual Host
First set up a virtual host for your projects
- Open /etc/hosts and add a local domain name
127.0.0.1 example.dev
- Open Applications/MAMP/conf/apache/extra/httpd-vhosts.conf and add document root for your domain
<VirtualHost *:80> DocumentRoot "/Users/your_username/Documents/localhost/myApp" ServerName example.dev </VirtualHost>
Note: To use httpd-vhosts.conf for settings you need to include it from *Applications/MAMP/conf/apache/httpd.conf. See this article
Install core files, theme and plugins with WP Cli
- Navigate to root project folder
wp core download
-> Download core WordPress files. (doc)- Generate a wp-config.php file with db credentials, salt keys.
wp core config --dbhost=127.0.0.1 --dbuser=root --dbpass=root --dbname=mydb
(doc) (If you get mysql connection error:sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
) - Create the database (as specified in wp-config.php)
wp db create
- Install wordpress (populates the tables in the database)
wp core install --url=http://example.dev --title="Site title" --admin_user=admin --admin_password=pass [email protected]
(doc) (if you get the error: "Warning: mysqli_real_connect(): (HY000/2002):..." then set DB_HOST in wp-config.php to 127.0.0.1) - Add wp debug setting to wp-config.php
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true );
Theme install
All new projects should use MW's starter theme Ripples, which can you'll find on Github.
New clean theme install
If you're the first developer creator, do this first:
- Navigate to root project folder
- Important! Download our .gitignore file to wp root folder using the command
curl https://gist.githubusercontent.com/pederan/715f13e14575c264ecc0/raw/6b45b79a6c82f4294602630e011cec7b90f6e261/.gitignore > .gitignore
. We do not push wp core files to git. WpEngine only accepts wp-content folder (no core files) - Download and install with wp cli:
wp theme install https://github.com/makingwaves/ripples/archive/master.zip
- Rename folder:
mv wp-content/themes/ripples-master wp-content/themes/ripples
- Activate theme:
wp theme activate ripples
- Optionally delete default wp themes
- Get gitty with it
git init && git add . && git commit -m 'initial commit'
- Add Github remote :
git remote add origin [email protected]:makingwaves/reponame.git
Theme Install from existing project
Pull down an existing project
- Initialize git (from project root):
git init
- Add Github remote :
git remote add origin [email protected]:makingwaves/reponame.git
- Pull from Github :
git pull -u origin master
Theme install continued
- Navigate to theme folder:
cd wp-content/themes/ripples
- Run
npm install
to install the theme node module dependencies. (If you run into to any problems, please see FAQ) - Run
gulp setup
to setup the project. The setup process cleans, compiles and optimize the files in your assets folder, installs frontend dependencies with bower. - Add compass support by pointing to config.rb in the ripples theme folder
- Open gulpfile.js and change the dev url to your local domain name, e.g.
var devUrl = "http://example.dev"
- Run browser sync
gulp watch
- See Git section for WPEngine setup
!Note: Do not push other themes than ripples to Github. Delete or git ignore them.
Delete things you don't need
Themes :wp theme delete twentythirteen
Plugins : wp plugin delete hello && wp plugin delete akismet
Plugins install
wp plugin install wordpress-seo --activate
etc, etc
Wp admin setup
- In Settings->General:
- Remove / edit tagline
- Set correct Timezone, Date- and Time format and site language
- Settings->Permalinks : Set 'Post name' as the custom url structure
- If using Advanced Custom fields then add licence key to Custom Fields->Updates