How to install Roots Sage 10 to build a modern WordPress Theme
By Sean Lang
Sage 10 is a powerful starter theme framework that helps developers build robust and customisable WordPress websites. It provides a clean and modern codebase, integrates seamlessly with modern tools like Tailwind CSS and Blade templates, and offers a flexible workflow for building custom functionality.
In this blog post, we’ll walk you through the essential steps of setting up a WordPress website using Sage 10, even if you’re a beginner. We’ll assume you have some basic understanding of WordPress and web development concepts.
Prerequisites
Before diving in, ensure you have the following installed:
- PHP 8.0 or later: WordPress requires PHP 8.0 or later.
- Composer: A dependency manager for PHP projects.
- Node.js and Yarn: Used for building Sage’s assets.
- A local development environment: You can use tools like XAMPP, MAMP, or Valet+ to set up a local WordPress instance.
Installing Sage 10
- Open your terminal and navigate to the WordPress themes directory.
cd wp-content/themes
- Run the following command to create a new Sage 10 project named my-website:
composer create-project roots/sage my-website
- Navigate into the newly created project directory:
cd my-website
- Install the project dependencies:
yarn install
- Build the project assets:
yarn build
- Log in to your WordPress admin panel and activate the my-website theme.
Additional Resources:
- Sage 10 Documentation: https://roots.io/sage/docs/
- Sage 10 Discourse Forum: https://discourse.roots.io/
By following these steps, you’ll have a basic Sage 10 WordPress website up and running. Remember, Sage 10 is a powerful and flexible framework, so don’t be afraid to experiment and explore its capabilities to create a truly unique and functional website.
Happy building!