How to Create a New WordPress Theme Using the Underscores Boilerplate

How to Create a New WordPress Theme Using the Underscores Boilerplate

Creating a custom WordPress theme doesn’t have to start from scratch. The Underscores (_s) starter theme, developed by the team behind WordPress itself (Automattic), is a lean and flexible boilerplate perfect for building modern, custom themes.

This article walks you through setting up your own WordPress theme based on Underscores — tailored for freelancers, agencies, and developers in Australia who need clean, maintainable code.

Prefer watching over reading? You can check out this mini tutorial on YouTube in the player below. Or if you’re more of an old-school type who likes a proper walkthrough in text — just scroll down. 

Table of Contents

  1. What Is Underscores and Why Use It?
  2. Prerequisites
  3. Step-by-Step: Building a Theme with _s
  4. Basic Customisations After Installation
  5. Best Practices for Ongoing Development
  6. Conclusion

1. What Is Underscores and Why Use It?

Underscores is a WordPress starter theme — not a framework, not a parent theme. It’s designed to provide just the essentials:

  • Clean HTML5 markup
  • Ready-to-customise template structure
  • Lean, unopinionated CSS
  • No design or layout assumptions
  • Solid accessibility and internationalisation foundations

It’s perfect if you want to build a custom WordPress theme tailored to your project or client, with no bloat.

2. Prerequisites

Before you start, make sure you have the following:

  • Local Development Environment – use LocalWP, MAMP, XAMPP, or a Sydney-based DigitalOcean droplet.
  • Installed WordPress – have a clean install running locally.
  • Code Editor – Visual Studio Code or PhpStorm is recommended.
  • Basic knowledge of: PHP, WordPress theme hierarchy, HTML/CSS (optional: SCSS, JS, Git)

3. Step-by-Step: Building a Theme with _s

Step 1: Generate Your Theme

Go to https://underscores.me/ and fill out the form:

  • Theme Name: your-theme-name
  • Tick options like:
    • “Include SCSS files?”
    • “WooCommerce support”

Click “Generate” and download the ZIP file.

Step 2: Install the Theme

  1. Unzip the file.
  2. Rename the folder (e.g., your-theme-name).
  3. Move it into /wp-content/themes/.
  4. Go to Appearance > Themes in WP Admin and activate it.

Step 3: Explore the File Structure


your-theme-name/
├── 404.php
├── archive.php
├── comments.php
├── footer.php
├── functions.php
├── header.php
├── index.php
├── page.php
├── screenshot.png
├── sidebar.php
├── single.php
├── style.css
├── template-tags.php
├── inc/
├── js/
├── sass/ or css/

Step 4: Set Theme Details

Edit the header of style.css:

/*
Theme Name: Your Theme Name
Author: Your Name
Author URI: https://your-portfolio.com
Description: Custom WordPress theme based on Underscores
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: your-theme-name
*/

4. Basic Customisations After Installation

Register Menus and Widgets

function yourtheme_setup() {
  register_nav_menus([
    'primary' => __('Primary Menu', 'your-theme-name'),
  ]);

  add_theme_support('widgets');
}
add_action('after_setup_theme', 'yourtheme_setup');

Enqueue Styles and Scripts

function yourtheme_scripts() {
  wp_enqueue_style('yourtheme-style', get_stylesheet_uri());

  wp_enqueue_script('yourtheme-scripts', get_template_directory_uri() . '/js/script.js', ['jquery'], null, true);
}
add_action('wp_enqueue_scripts', 'yourtheme_scripts');

Create a Home Page Template

In front-page.php:

<?php get_header(); ?>

<main>
  <h1><?php bloginfo('name'); ?></h1>
  <p>Welcome to your new custom theme!</p>
</main>

<?php get_footer(); ?>

5. Best Practices for Ongoing Development

TipDescription
Use version controlUse Git from the start of your theme project
Follow WP Coding StandardsUse PHPCS
Use child themes for 3rd-party themesDon’t modify commercial themes directly
Test across devicesUse BrowserStack or physical devices
Optimise for speedMinify CSS/JS, load scripts conditionally
InternationaliseUse __() and _e() for translations

6. Conclusion

Underscores is a great starting point if you want full control over your WordPress theme, without reinventing the wheel. It’s especially useful in client work where clean code, flexibility, and accessibility matter.

If you’re an Australian business looking to bring on a dedicated WordPress developer familiar with best practices, I’d love to chat — especially if you’re open to 482 or 186 sponsorship.