Jan 29, 2021
2 mins read
I developed a quick and easy solution for my apprentices to hit the ground running when they have to set up an environment to develop custom WordPress themes and I am sharing it with everyone on GitHub!
This is based on Gulp Project Startup that I initially wrote a few years ago (and continue to update) that implements a fast and simple workflow to develop web pages that do not require the use of a modern framework such as ReactJS and Vue using SASS and Babel.
This tool was also developed to help and aid beginner developers that were been coached and mentored by me thru the past few years, and they just love it for the simple fact they do not have to worry about setting an environment up and can jump straight into code with their favorite tool right of the gate.
As more tools became accessible and available to all platforms (Mac, Linux, and Windows) and the way we develop pages and applications for the web evolved I decided to wrap this one in a Docker Container.
Yes, you will need to have docker installed on your machine but Docker now has great tutorials on how to install it.
Install Docker Desktop
There are a few steps to get this up and running but, it's quite simple.
Clone my repo by running:
CD into the directory with:
Follow the steps:
Start by setting your container by running
docker-compose up, this will install WordPress and set up a database using MariaDB, my database of choice for WordPress.
Once this is done you should be able to visit
localhostand create your admin user for WordPress.
Then let's set up our custom theme by installing all node packages at the root of the project with
Change your theme name in the main
Gulpfile.jsfile on line 32:
themeName: 'sandbox',to rename your theme folder.
gulp setupand this will generate all the folders to get you started with your custom theme. Continue reading below for more information about the structure that is generated and other commands available.
Read the full documentation here, and have fun creating awesome custom themes!
Follow me for more awesome stuff!!!