Set Up Sage 8.5 + Git for localhost

Written by: John | 20th Oct 2016

Set up Roots Sage on your local host for WordPress development.

Open a Terminal and follow the steps below:

Step 1: Set up Bit Bucket
Step 2: Init Git locally

cd /path/to/your/project
git init
git remote add origin https://your-account@bitbucket.org/your-instance/project-name.git

 

Step 3: Set up Sage.

cd /path-to-themes-dir
composer create-project roots/sage your-theme-name 8.5.0

 

Step 4: Set up Gulp + bower

cd /path-to-new-theme-dir
npm install
bower install

 

Step 5: alter assets/manifest.json devUrl: copy-local-url-fom-browser

{
  "dependencies": {
    "main.js": {
      "files": [
        "scripts/main.js"
      ],
      "main": true
    },
    "main.css": {
      "files": [
        "styles/main.scss"
      ],
      "main": true
    },
    "customizer.js": {
      "files": [
        "scripts/customizer.js"
      ]
    },
    "jquery.js": {
      "bower": ["jquery"]
    }
  },
  "config": {
    "devUrl": "http:YOUR_LOCAL_URL"
  }
}

 

Related Posts

Web Build

Social Media

How to simply integrate Social Media into your Website Social media integration, add social media to your website to easily keep your viewers up to date with special offers and updates, via a bespoke or standard Twitter feed, Facebook status…
Web Build

Pixel Perfect Web Builds

Building websites to exactly mirror a graphic designers PSD or other creative document, right down to the last pixel. Not a simple task, but one I have done on a number of occasions. Many things are still left up to the developer in this process: The responsive views, the Java Script functionality & how the CMS is implemented...
Web Build

Why WordPress?

The key to everything WordPress is the open source factor, because of the open development environment many coders have invested their time developing plugins to do just about, well, everything.
Web Build

Responsive Web Design

Why does my site need to be responsive? I can't recall the number of times I have heard someone say "since I got my Ipad I have not even turned my laptop on" and It seems laptop & desktop machines are now increasingly becoming seen more and more as work tools...
Web Build

WordPress Themes

Wordpress themes, when to use an "off the shelf" theme or build bespoke. Both have advantages and disadvantages, I take a closer look here, to try to help determine which approach could be better for you.