SlideShare a Scribd company logo
Grunting WordPress 
Automate your WordPress development 
workflow with Grunt.js
Josh Lee 
Owner & Lead Developer / QC Creative 
@joshleecreates
Why Grunt? 
What can it do for me?
All the repetitive chores... 
● Compile LESS, SASS, 
Stylus, CoffeeScript, 
etc. 
● JSHint / JSLint 
● Concatenate and 
minify scripts and 
styles 
● Run with different 
settings for 
development and 
“builds” 
● Automatically 
generate sprite 
sheets 
● Deploy using git, ftp, 
scp or rsync 
● Live reload in the 
browser 
● Compress images
Grunt uses Plugins
“contrib-” = officially maintained 
● contrib-watch 
● contrib-jshint 
● contrib-clean 
● contrib-copy 
● contrib-uglify 
● contrib-imagemin 
● contrib-concat 
● contrib-less 
● contrib-sass 
● contrib-compass 
● contrib-stylus 
● contrib-livereload 
● contrib-cssmin 
● contrib-htmlmin
Step 1 
Install Node.js & NPM: http://nodejs. 
org/
Step 2 
Make a basic package.json
A basic pa
Install the Grunt-CLI globally
Install grunt in your project folder
Using “--save-dev” automatically updates package.json
Install some plugins… (with --save-dev)
All NPM packages (Grunt and it’s plugins) get installed in 
`node_modules/` 
Add this directory to .gitignore to prevent repo bloat 
New developers can install all dependencies with `npm install` in the 
project dir
fancy trick to autoload 
all grunt plugins 
Gruntfile.js — the secret sauce 
(example from http://mattbanks.me/grunt-wordpress-development-deployments/)
from http://justinklemm.com/grunt-bower-wordpress-themes/
Automate your WordPress Workflow with Grunt.js
WordPress
Automate your WordPress Workflow with Grunt.js
This is not ideal...
For theme and plugin development, keep grunt stuff in the 
theme/plugin folder
Supercharge your whole site 
● Use one Gruntfile for the entire site 
● Combine CSS and JS from multiple plugins and 
your theme — speeds up your site! 
Best when: 
● you have complete control over site code 
● you want to use grunt for deployment
Grunt stuff is in the 
top-level folder 
with the other 
developer files 
This whole folder 
can be safely 
deployed without 
writing out long 
lists of ignored files 
for your deploy system 
WordPress in a 
subdirectory
Let’s do it live...
Other Tools 
● Bower 
● Composer 
● Yeoman 
● roots.io 
● WP Stack
Questions? 
Josh Lee 
www.joshuamlee.com 
josh@qccreative.com 
@joshleecreates

More Related Content

What's hot (20)

PDF
Production Ready Javascript With Grunt
XB Software, Ltd.
 
PDF
Introduction to Express and Grunt
Peter deHaan
 
PDF
WordPress as a Headless CMS - Bronson Quick
WordCamp Sydney
 
PDF
Bower & Grunt - A practical workflow
Riccardo Coppola
 
PPTX
Blazor v1.1
Juan Luis Guerrero Minero
 
PPTX
Integrating grunt and bower with maven
Rahul Nanwani
 
PDF
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Develcz
 
PPTX
Grunt to automate JS build
Tejaswita Takawale
 
PPTX
Blogging for hackers (english)
Stephen Mariano Cabrera
 
PPTX
Grunt and Bower
George Estebe
 
PPTX
DevDay 2018 - Blazor
Denis Voituron
 
PDF
Windows azure and linux
Andrey Kucherenko
 
PDF
Daniel Steigerwald - Este.js - konec velkého Schizma
Develcz
 
PDF
Building the Front End with AngularJS
John Ennew
 
PDF
Debugging WordPress Core and Plugins!
Bronson Quick
 
KEY
Scripting with NodeJS
Ben Pearson
 
PPTX
Dial up your flow
Wes Eklund
 
PDF
Advanced front-end automation with npm scripts
k88hudson
 
PDF
The swiss knife of a word press developer
Ivelina Dimova
 
PPT
Yeoman
James Cryer
 
Production Ready Javascript With Grunt
XB Software, Ltd.
 
Introduction to Express and Grunt
Peter deHaan
 
WordPress as a Headless CMS - Bronson Quick
WordCamp Sydney
 
Bower & Grunt - A practical workflow
Riccardo Coppola
 
Integrating grunt and bower with maven
Rahul Nanwani
 
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Develcz
 
Grunt to automate JS build
Tejaswita Takawale
 
Blogging for hackers (english)
Stephen Mariano Cabrera
 
Grunt and Bower
George Estebe
 
DevDay 2018 - Blazor
Denis Voituron
 
Windows azure and linux
Andrey Kucherenko
 
Daniel Steigerwald - Este.js - konec velkého Schizma
Develcz
 
Building the Front End with AngularJS
John Ennew
 
Debugging WordPress Core and Plugins!
Bronson Quick
 
Scripting with NodeJS
Ben Pearson
 
Dial up your flow
Wes Eklund
 
Advanced front-end automation with npm scripts
k88hudson
 
The swiss knife of a word press developer
Ivelina Dimova
 
Yeoman
James Cryer
 

Viewers also liked (12)

PDF
Modernizing Your WordPress Workflow with Grunt & Bower
Alan Crissey
 
PDF
WordPress Theme Structure
keithdevon
 
PPTX
WordPress Theme Development: Part 2
Josh Lee
 
PDF
WordPress Development - Taxonomies
Juan Pablo De la torre Valdez
 
PDF
Gulp WordPress @Grand-Frontend-Osaka 2015 Summer
Kite Koga
 
PPTX
Word press workflows and gulp
Eli McMakin
 
PPTX
Introduction to using Grunt & Bower with WordPress theme development
James Bundey
 
PDF
Isomorphic WordPress Applications with NodeifyWP
Taylor Lovett
 
PDF
Building a Website The Easy Way With Wordpress
Easily Amused, Inc. & The WP Valet
 
PDF
Intro to WordPress theme development
Thad Allender
 
PDF
Riding The Crazyhorse: Future Generation WordPress
Liz Danzico
 
PDF
WordPress for the modern PHP developer
Chris Sherry
 
Modernizing Your WordPress Workflow with Grunt & Bower
Alan Crissey
 
WordPress Theme Structure
keithdevon
 
WordPress Theme Development: Part 2
Josh Lee
 
WordPress Development - Taxonomies
Juan Pablo De la torre Valdez
 
Gulp WordPress @Grand-Frontend-Osaka 2015 Summer
Kite Koga
 
Word press workflows and gulp
Eli McMakin
 
Introduction to using Grunt & Bower with WordPress theme development
James Bundey
 
Isomorphic WordPress Applications with NodeifyWP
Taylor Lovett
 
Building a Website The Easy Way With Wordpress
Easily Amused, Inc. & The WP Valet
 
Intro to WordPress theme development
Thad Allender
 
Riding The Crazyhorse: Future Generation WordPress
Liz Danzico
 
WordPress for the modern PHP developer
Chris Sherry
 
Ad

Similar to Automate your WordPress Workflow with Grunt.js (20)

PDF
Front End Development Automation with Grunt
Ladies Who Code
 
PDF
Getting Started With Grunt for WordPress Development
David Bisset
 
PDF
Grunt training deck
James Ford
 
PPTX
Modern Development Tools
Ye Maw
 
PDF
Grunt.js and Yeoman, Continous Integration
David Amend
 
PPTX
Frontend Workflow
DelphiCon
 
PDF
What makes me "Grunt"?
Fabien Doiron
 
PDF
Grunt: the wild boar dev's best friend - WordCamp London 2018
Marco Chiesi
 
PDF
Grunt js and WordPress
WP Australia
 
PDF
GruntJS
Predhin Sapru
 
PDF
Modern Web Application Development Workflow - EclipseCon France 2014
Stéphane Bégaudeau
 
PDF
Frontend Engineer Toolbox
Ynon Perek
 
PPTX
Putting the Develop in Development
Jason Yingling
 
PDF
Modern Web Application Development Workflow - web2day 2014
Stéphane Bégaudeau
 
PDF
The Secrets of The FullStack Ninja - Part A - Session I
Oded Sagir
 
PPTX
Grunt Continuous Development of the Front End Tier
Erick Brito
 
PDF
Front End Workflow
Matt Bailey
 
PDF
Quest for the Perfect Workflow for McrFRED
Andi Smith
 
PDF
Grunt All Day
douglasknudsen
 
Front End Development Automation with Grunt
Ladies Who Code
 
Getting Started With Grunt for WordPress Development
David Bisset
 
Grunt training deck
James Ford
 
Modern Development Tools
Ye Maw
 
Grunt.js and Yeoman, Continous Integration
David Amend
 
Frontend Workflow
DelphiCon
 
What makes me "Grunt"?
Fabien Doiron
 
Grunt: the wild boar dev's best friend - WordCamp London 2018
Marco Chiesi
 
Grunt js and WordPress
WP Australia
 
GruntJS
Predhin Sapru
 
Modern Web Application Development Workflow - EclipseCon France 2014
Stéphane Bégaudeau
 
Frontend Engineer Toolbox
Ynon Perek
 
Putting the Develop in Development
Jason Yingling
 
Modern Web Application Development Workflow - web2day 2014
Stéphane Bégaudeau
 
The Secrets of The FullStack Ninja - Part A - Session I
Oded Sagir
 
Grunt Continuous Development of the Front End Tier
Erick Brito
 
Front End Workflow
Matt Bailey
 
Quest for the Perfect Workflow for McrFRED
Andi Smith
 
Grunt All Day
douglasknudsen
 
Ad

Recently uploaded (20)

PPTX
PE introd.pptxfrgfgfdgfdgfgrtretrt44t444
nepmithibai2024
 
PDF
123546568reb2024-Linux-remote-logging.pdf
lafinedelcinghiale
 
PPTX
Template Timeplan & Roadmap Product.pptx
ImeldaYulistya
 
PDF
Web Hosting for Shopify WooCommerce etc.
Harry_Phoneix Harry_Phoneix
 
PPTX
本科硕士学历佛罗里达大学毕业证(UF毕业证书)24小时在线办理
Taqyea
 
PPTX
ONLINE BIRTH CERTIFICATE APPLICATION SYSYTEM PPT.pptx
ShyamasreeDutta
 
PPTX
Cost_of_Quality_Presentation_Software_Engineering.pptx
farispalayi
 
PPT
Computer Securityyyyyyyy - Chapter 1.ppt
SolomonSB
 
PDF
AI_MOD_1.pdf artificial intelligence notes
shreyarrce
 
PDF
𝐁𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓
hokimamad0
 
PPTX
英国假毕业证诺森比亚大学成绩单GPA修改UNN学生卡网上可查学历成绩单
Taqyea
 
PDF
Technical Guide to Build a Successful Shopify Marketplace from Scratch.pdf
CartCoders
 
PPTX
ipv6 very very very very vvoverview.pptx
eyala75
 
PDF
How to Fix Error Code 16 in Adobe Photoshop A Step-by-Step Guide.pdf
Becky Lean
 
PDF
Build Fast, Scale Faster: Milvus vs. Zilliz Cloud for Production-Ready AI
Zilliz
 
PDF
The Complete Guide to Chrome Net Internals DNS – 2025
Orage Technologies
 
PDF
DevOps Design for different deployment options
henrymails
 
PPTX
Random Presentation By Fuhran Khalil uio
maniieiish
 
PPTX
原版西班牙莱昂大学毕业证(León毕业证书)如何办理
Taqyea
 
PPT
Computer Securityyyyyyyy - Chapter 2.ppt
SolomonSB
 
PE introd.pptxfrgfgfdgfdgfgrtretrt44t444
nepmithibai2024
 
123546568reb2024-Linux-remote-logging.pdf
lafinedelcinghiale
 
Template Timeplan & Roadmap Product.pptx
ImeldaYulistya
 
Web Hosting for Shopify WooCommerce etc.
Harry_Phoneix Harry_Phoneix
 
本科硕士学历佛罗里达大学毕业证(UF毕业证书)24小时在线办理
Taqyea
 
ONLINE BIRTH CERTIFICATE APPLICATION SYSYTEM PPT.pptx
ShyamasreeDutta
 
Cost_of_Quality_Presentation_Software_Engineering.pptx
farispalayi
 
Computer Securityyyyyyyy - Chapter 1.ppt
SolomonSB
 
AI_MOD_1.pdf artificial intelligence notes
shreyarrce
 
𝐁𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓
hokimamad0
 
英国假毕业证诺森比亚大学成绩单GPA修改UNN学生卡网上可查学历成绩单
Taqyea
 
Technical Guide to Build a Successful Shopify Marketplace from Scratch.pdf
CartCoders
 
ipv6 very very very very vvoverview.pptx
eyala75
 
How to Fix Error Code 16 in Adobe Photoshop A Step-by-Step Guide.pdf
Becky Lean
 
Build Fast, Scale Faster: Milvus vs. Zilliz Cloud for Production-Ready AI
Zilliz
 
The Complete Guide to Chrome Net Internals DNS – 2025
Orage Technologies
 
DevOps Design for different deployment options
henrymails
 
Random Presentation By Fuhran Khalil uio
maniieiish
 
原版西班牙莱昂大学毕业证(León毕业证书)如何办理
Taqyea
 
Computer Securityyyyyyyy - Chapter 2.ppt
SolomonSB
 

Automate your WordPress Workflow with Grunt.js