npm install -g gulp or
yarn global add gulp (You can skip this step if you already have gulp installed)
npm install or
gulp wp-init (Builds an installation from scratch)
gulp cleanup (Removes scaffolding files)
Scaffold a Wordpress project with a minimal starter theme in Bootstrap using Gulp.
Make sure you're running the latest version of NodeJS: https://nodejs.org/en/download/. You should also have gulp installed.
npm install -g gulp git clone https://github.com/lab19digital/wp19.git . && npm install
To build an installation from scratch
After installation, you will need to cleanup the scaffolding files (and remove the old repo)
To run the server after build or on an existing project. This starts browsersync. By default the site will serve from http://localhost:3000. You may need to wait a few seconds for browsersync to open the tab.
Out the box
This generator includes:
- Latest wordpress
- Latest wp-cli
After installation the server will run automatically. A theme called "default" is generated. To start the server in future, run
gulp php from the root.
Automatically installs the following plugins:
- timber-library (Twig templating)
package.json if you want to install any of the following:
Also removes the hello and akismet plugins and standard themes
Comes with jQuery, several other plugins are available but may not be imported by default:
A word about the built in PHP server for Mac users
Mac users have reported issues with the built in PHP server not connecting to the MySQL database correctly. This seems to happen for MAMP users. A php.ini file is not defined for MAMP users when using the built in server. You should copy your MAMP php.ini file to /etc/
php --ini should tell you where to find the file you need.
Should be copied to:
Once this is done, the socket file for MySQL socket connections will be found. If this is not the case you need to confirm your socket files exists and is configured correctly in the PHP.ini file being used.
mysql.default_socket = /Applications/MAMP/tmp/mysql/mysql.sock pdo_mysql.default_socket = /Applications/MAMP/tmp/mysql/mysql.sock
Created by Lab19 Digital.
Available gulp tasks
gulp wp-init - install wordpress / setup project
gulp js - compile JS with source maps
gulp sass - compile SCSS with inline source maps
gulp build - compile production ready JS & SCSS (minified & autoprefixed)
gulp watch - watch for files changes
gulp php - (default task) run the server and watch for files changes
gulp proxy - run BrowserSync without a server, you need to modify