Skype: bluewindlab
Install the Sage WordPress theme in LocalWP

Sage is a powerful WordPress starter theme that uses the power of Laravel and allows developers to write clean code for WordPress theme development. It comes with bud.js to compile the styles and scripts and provides an amazing experience for frontend development. In this tutorial, we will learn how to install the Sage WordPress theme in LocalWP. We are using the Bedrock WordPress installation for this example.

Install the Sage WordPress theme

Step 01: Navigate to the app/bedrock/web/app/themes directory. Next, run the following command. My theme name is petmatewp. You set the theme name according to your project.

composer create-project roots/sage petmatewp

It will take a few minutes to complete the installation process.

Step 02: Now, if you are trying to activate the theme from the WordPress dashboard, you will get an error message like this.

To fix that problem, we need to install the Acorn, which allows us to use Laravel components inside of WordPress.

We have used Bedrock for WordPress installation. So, from the terminal, we will navigate to the bedrock folder. Then run the following command.

composer require roots/acorn
Now, go to the WordPress dashboard and referesh the site. You will see the issue has been fixed and new theme has been activated.

Build Theme Assets

Step 03: Next, from the terminal, navigate to the theme folder and install yarn packages.

cd petmatewp
yarn install

Step 04: Now, we will run the build command.

yarn build

If you want to enable the watch mode, run the following command.

yarn dev

Please note that this is a starter theme. All the basic template files are already added to the theme folder. However, you need to configure all the files by yourself. Let’s set them up one by one.

Screenshot

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*

Back To Top