Say you want to run a local wordpress environment to create wordpress themes. There are plenty of products that suits for you. But what if you want to use sass/scss and you want it to be automatically updated on your wordpress website. Then this product is the right product for you.
Theme from: Underscores.me
-
Install Local from the website.
-
Go to settings and change the "Default Sites Path" to:
/Users/[username]/local-sites/
. -
Create a new project. Choose the projectname wisely.
-
Clone or download this project and put it in a place of choice.
-
Open the "gulpfile.js".
-
Change the following variables:
theme_name: The name of your theme, on line 7.
project_name: The name of your project, must be equal to the project you filled in step 2, on line 9.
var theme_name = "test"; // This is the name of your theme var project_name = "test"; // This is the name of your wordpress project. It needs to be equal to the 'Local' folder where wordpress is installed.
-
Run
npm install
in the Terminal. -
Make sure you started the local server from "Local".
-
Run
gulp
, here you can see all the commands you can use. -
Run
gulp build
, this will compile all the files in the src folder. -
Run
gulp deploy
, this will send the/build
folder to the local wordpress theme directory. -
Go to [projectname].dev and login with the admin information you filled in step 1.
-
Go to
Appearance
>Themes
and activate your theme.
These steps needs to be done for daily usage:
- Open "Local" and start the server.
- Navigate to the folder where you cloned this project.
- Run
gulp
, here you can see all the commands you can use. - Run
gulp watch
and start editing the files. - Now the changes will compile automatically and deploy automatically to the local wordpress directory. The browser will reload automatically.
Version 1.0.0