Theme style.css Header Generator
Generate the style.css header WordPress reads for a theme or child theme, with the version requirements, tags and the Template line a child theme needs.
/*
Theme Name: My Theme
Author: Your Name
Description: A block theme built for fast, content-first sites.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: my-theme
Tags: block-patterns, full-site-editing, translation-ready
*/
/*
* Styles live in theme.json and in the block stylesheets. This file exists for
* the header above: WordPress reads it to recognise the theme.
*/
Output is valid and updates as you type.
Fix the highlighted fields to update the output.
Fill in the details and copy the block to the top of your theme’s style.css. It is what WordPress reads to recognise the theme, and for a child theme it is what connects it to its parent.
How to use
- Choose parent or child first. A child theme needs a
Templateline, and it must be the parent’s folder name, not its display name. - Match the text domain to the theme folder name. WordPress.org builds translation packages from the folder, so a mismatch means no translations.
- Set Requires at least and Requires PHP honestly. WordPress blocks installation below them, which is better than a broken site.
- Use tags from the WordPress.org list. Anything else is ignored there, and a made-up tag helps nobody.
- Put the block at the very top of
style.css, before any CSS.
Example
A child theme header, which is the case where every line matters:
/*
Theme Name: Acme Child
Template: twentytwentyfive
Author: Acme Studio
Description: Small changes on top of Twenty Twenty-Five.
Version: 1.2.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: acme-child
*/
Template is the parent’s folder name. twentytwentyfive, not Twenty Twenty-Five: get it wrong and WordPress reports a broken theme.
Pitfalls
- The header must be in
style.cssin the theme root. WordPress does not look anywhere else, and a block theme still needs the file even when all its styling is intheme.json. - A child theme with a wrong or missing
Templateshows as broken, and activating it is not possible. - Text Domain has to match the folder name for translations from WordPress.org. A rename breaks them silently.
- Version is what update checks compare. Leaving it unchanged across releases means nobody is offered the update.
- A block theme’s
style.cssis not loaded automatically for styling on the front end unless the theme enqueues it. The header still has to be there. - Tags outside the WordPress.org list are ignored by the directory, and
accessibility-readyin particular is audited before it is accepted. - Commented-out lines still count: WordPress parses the first block comment, so a stray
Template:in it applies. - Renaming a theme folder changes how WordPress identifies the theme. Sites using it fall back to the default theme.
Compatibility
The style.css header has been read by WordPress since 1.5, and Requires at least, Tested up to and Requires PHP have been honoured since 5.8, with 6.0 enforcing them on install. Template for child themes has worked since 2.7. Block themes, from 5.9 onwards, keep their styling in theme.json but still need this file. The tool runs entirely in your browser.
Frequently asked questions
Does a block theme still need style.css?
What goes in Template?
wp-content/themes.Why is my theme showing as broken?
Theme Name, or a Template that does not match an installed theme’s folder.