Sage theme install
Based on our previous article How to install Bedrock, a WordPress boilerplate you will have a WordPress site up an running. We will now be building our template to control the layout of our site.
# Change directory to our themes folder
$ cd /var/www/example.co.uk/public_html/bedrock/web/app/themes/
Install Sage using Composer from your WordPress themes directory (replace
your-theme-name below with the name of your theme):
# @ app/themes/ or wp-content/themes/
$ composer create-project roots/sage your-theme-name
Once complete you will have the core files for your sage theme. By default it will be called ‘Sage Starter Theme’ which is available to select from the WordPress admin panel under Appearance, then Themes.
To edit the theme name, edit the
styles.css file in the resources folder of the theme.
Theme Name: Sage Starter Theme
Theme URI: https://roots.io/sage/
Description: Sage is a WordPress starter theme.
Author URI: https://roots.io/
Text Domain: sage
Working with the Sage theme
/your-theme-name/resources/assests/config.json to setup the devURL and the proxyURL.
And make sure you have logged into the WordPress admin area and selected the new theme.
# Change directory to our theme folder
$ cd /var/www/example.co.uk/public_html/bedrock/web/app/your-theme-name/
# Install all the node modules
$ yarn install
# Run yarn
$ yarn start
You can then start editting the code and building the site/template.