_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
-
Clone or download the repository:
git clone https://github.com/Automattic/_s.git cd _s -
Rename the theme directory to your desired theme name (e.g.,
megatherium-is-awesome). -
Perform a six-step find and replace on the theme name:
- Search for
'_s'(inside single quotations) and replace with:'megatherium-is-awesome' - Search for
_s_and replace with:megatherium_is_awesome_ - Search for
Text Domain: _sinstyle.cssand replace with:Text Domain: megatherium-is-awesome - Search for <code> _s</code> (with a space before it) to capture DocBlocks and replace with: <code> Megatherium_is_Awesome</code>
- Search for
_s-to capture prefixed handles and replace with:megatherium-is-awesome- - Search for
_S_(in uppercase) to capture constants and replace with:MEGATHERIUM_IS_AWESOME_
- Search for
-
Update the stylesheet header in
style.csswith your own information. -
Update or remove links in
footer.phpwith your own information. -
Rename
_s.potfrom thelanguagesfolder to use your theme's slug. -
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
_sto your theme's slug instyle.cssand all references - Stylesheet Header: Update the header information in
style.csswith your theme details - Language Files: Rename the
.potfile in thelanguagesfolder 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:
-
Manual Upload: Upload the theme folder to your WordPress installation's
wp-content/themes/directory via FTP or file manager. -
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
-
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
-
"Cannot find module" errors after npm install
- Ensure Node.js is properly installed and updated
- Try deleting
node_modulesand re-runningnpm install
-
PHP syntax errors after find and replace
- Double-check all find and replace operations were completed
- Run
composer lint:phpto identify syntax errors
-
Theme not appearing in WordPress admin
- Verify the theme folder is in
wp-content/themes/ - Check that
style.csshas a valid stylesheet header - Ensure no PHP syntax errors exist in the theme files
- Verify the theme folder is in
-
SASS compilation fails
- Check that Node.js dependencies are installed
- Verify SASS syntax in your
.scssfiles - Run
npm run lint:scssto check for coding standard violations
-
Translation files not working
- Ensure the
.potfile is renamed to match your theme's slug - Verify the text domain in
style.cssmatches your theme's slug
- Ensure the
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