← Back to Automattic/_s

How to Deploy & Use Automattic/_s

_s WordPress Theme - Deploy and Usage Guide

Prerequisites

  • Node.js - Required for SASS compilation and JavaScript linting
  • Composer - Required for PHP dependency management and code quality checks
  • WordPress - This is a WordPress theme, so you need a WordPress installation to use it

Installation

Quick Start

  1. Clone or download the repository:

    git clone https://github.com/Automattic/_s.git
    cd _s
    
  2. Rename the theme directory to your desired theme name (e.g., megatherium-is-awesome).

  3. Perform a six-step find and replace on the theme name:

    1. Search for '_s' (inside single quotations) and replace with: 'megatherium-is-awesome'
    2. Search for _s_ and replace with: megatherium_is_awesome_
    3. Search for Text Domain: _s in style.css and replace with: Text Domain: megatherium-is-awesome
    4. Search for <code> _s</code> (with a space before it) to capture DocBlocks and replace with: <code> Megatherium_is_Awesome</code>
    5. Search for _s- to capture prefixed handles and replace with: megatherium-is-awesome-
    6. Search for _S_ (in uppercase) to capture constants and replace with: MEGATHERIUM_IS_AWESOME_
  4. Update the stylesheet header in style.css with your own information.

  5. Update or remove links in footer.php with your own information.

  6. Rename _s.pot from the languages folder to use your theme's slug.

  7. Update or delete this README file.

Setup Dependencies

composer install
npm install

Configuration

  • Theme Name: Update the theme name throughout all files using the find and replace process
  • Text Domain: Change from _s to your theme's slug in style.css and all references
  • Stylesheet Header: Update the header information in style.css with your theme details
  • Language Files: Rename the .pot file in the languages folder to match your theme's slug

Build & Run

Development

  • Watch SASS files: Automatically compile SASS to CSS when files change

    npm run watch
    
  • Compile CSS manually:

    npm run compile:css
    
  • Generate RTL stylesheet:

    npm run compile:rtl
    

Code Quality

  • Check PHP files against WordPress Coding Standards:

    composer lint:wpcs
    
  • Check PHP syntax:

    composer lint:php
    
  • Generate translation file:

    composer make-pot
    
  • Check SASS files against WordPress Coding Standards:

    npm run lint:scss
    
  • Check JavaScript files against WordPress Coding Standards:

    npm run lint:js
    

Distribution

  • Generate distribution ZIP archive:
    npm run bundle
    

Deployment

Since this is a WordPress theme, deployment involves:

  1. Manual Upload: Upload the theme folder to your WordPress installation's wp-content/themes/ directory via FTP or file manager.

  2. WordPress Admin: Install the theme through the WordPress admin dashboard:

    • Go to Appearance → Themes
    • Click "Add New" → "Upload Theme"
    • Upload the generated ZIP file from npm run bundle
  3. Version Control: If using version control, commit your changes and push to your repository, then deploy through your preferred WordPress deployment workflow.

Note: This project is archived and inactive. For modern WordPress development, consider using Block Themes instead. Visit Block Themes for the current recommended approach.

Troubleshooting

Common Issues

  1. "Cannot find module" errors after npm install

    • Ensure Node.js is properly installed and updated
    • Try deleting node_modules and re-running npm install
  2. PHP syntax errors after find and replace

    • Double-check all find and replace operations were completed
    • Run composer lint:php to identify syntax errors
  3. Theme not appearing in WordPress admin

    • Verify the theme folder is in wp-content/themes/
    • Check that style.css has a valid stylesheet header
    • Ensure no PHP syntax errors exist in the theme files
  4. SASS compilation fails

    • Check that Node.js dependencies are installed
    • Verify SASS syntax in your .scss files
    • Run npm run lint:scss to check for coding standard violations
  5. Translation files not working

    • Ensure the .pot file is renamed to match your theme's slug
    • Verify the text domain in style.css matches your theme's slug

Important Notes

  • This project is inactive and archived as of September 5, 2025
  • For new WordPress theme development, use Block Themes instead
  • The theme is licensed under GPLv2 or later