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.

Live output

Enable JavaScript to customise; default output below.

Theme type

A child theme needs the Template line, and it must match the parent's folder name exactly.

Used for a child theme. The folder name, not the display name.

Live preview style.css
/*
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.

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

  1. Choose parent or child first. A child theme needs a Template line, and it must be the parent’s folder name, not its display name.
  2. Match the text domain to the theme folder name. WordPress.org builds translation packages from the folder, so a mismatch means no translations.
  3. Set Requires at least and Requires PHP honestly. WordPress blocks installation below them, which is better than a broken site.
  4. Use tags from the WordPress.org list. Anything else is ignored there, and a made-up tag helps nobody.
  5. 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.css in the theme root. WordPress does not look anywhere else, and a block theme still needs the file even when all its styling is in theme.json.
  • A child theme with a wrong or missing Template shows 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.css is 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-ready in 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?
Yes. WordPress uses it to recognise the theme. It can contain nothing but the header.
What goes in Template?
The parent theme’s folder name, exactly as it appears in wp-content/themes.
Why is my theme showing as broken?
Usually a missing Theme Name, or a Template that does not match an installed theme’s folder.
Which tags should I use?
Only ones from the WordPress.org tag list, and only ones that are true. The directory checks them.
Does Tested up to matter outside WordPress.org?
It shows on the themes screen and in update checks. It is the honest signal about how recently the theme was looked at.

From the people who built this tool

WP Adminify

The WordPress admin, rebuilt: a dashboard worth looking at, menu and column control, a real file manager and the login page your client sees.

See WP Adminify Free version on WordPress.org

Weekly drops

New tools, when there are new tools

One email when something worth using ships. No schedule to fill, so no filler.

Your address goes nowhere else, and one click unsubscribes.