Install Sage by copying the project into a new folder within your WordPress themes directory.
Make sure all dependencies have been installed before moving on:
- WordPress (opens new window) >= 4.7
- PHP (opens new window) >= 7.0 (with
php-mbstring(opens new window) enabled)
- Composer (opens new window)
- Node.js (opens new window) >= 6.9.x
- Yarn (opens new window)
Install Sage using Composer from your WordPress themes directory (replace
your-theme-name below with the name of your theme):
# @ app/themes/ or wp-content/themes/ $ composer create-project roots/sage your-theme-name
From the command line on your host machine (not on your Vagrant box), navigate to the theme directory then run
# @ themes/your-theme-name/ $ yarn
You now have all the necessary dependencies to run the build process.
# Getting ready for Browsersync
If you later want to use Browsersync during
yarn run start you need to update
devUrl at the bottom of
assets/config.json to reflect your local development hostname.
For example, if your local development URL is
https://project-name.test you would update the file to read:
... "devUrl": "https://project-name.test", ...