Create new project in Local by Flywheel:
- Set site name, local dev URL, and project directory
- Choose custom environment:
- PHP >= 7.1.3 (with php-mbstring enabled)
- Web server = Apache
- MySQL >= 5.6
-
Create a new repository in your GitHub or an organization: https://github.com/organizations/example/repositories/new (Do not initialize it with a README, license, or .gitignore files.)
-
Then clone the starter-template repo without commit history. Move the starter-template files into the project directory and initialize a new repo for the new project:
# @ app/public/
$ git clone --depth 1 https://github.com/m4leware666/wp-starter-template.git
$ rm -rf starter-template/.git
$ cp -r starter-template/. .
$ rm -rf starter-template
$ git init
$ git add .
$ git commit -m "Initial commit"
$ git remote add origin [replace with remote repository URL]
$ git remote -v
$ git push -u origin master
Make sure all dependencies have been installed:
- PHP >= 7.1.3 (with
php-mbstring
enabled) - Composer
- Node.js >= 6.9.x
- Yarn
- Run
yarn
from the theme directory to install dependencies - Update
resources/assets/config.json
settings:devUrl
should reflect your local development hostnamepublicPath
should reflect your WordPress folder structure (/wp-content/themes/sage
for non-Bedrock installs)
yarn start
— Compile assets when file changes are made, start Browsersync sessionyarn build
— Compile and optimize the files in your assets directoryyarn build:production
— Compile assets for production