Block themes work differently than classic WordPress themes. When you customize templates using WordPress’s Site Editor, your changes are saved to the database, so you don’t need to worry about theme updates removing your changes. However, these database-stored changes don’t automatically transfer to child themes.
The Challenge: Block themes use HTML files instead of PHP files, and customizations made through the Site Editor are stored in the database, not in theme files. This means copying templates to child themes requires a different approach.
Why You Need This: When the parent theme is updated, only the templates and parts that you have not saved will be updated: You will not lose your updates if you have copied the templates and template parts to your child theme before making changes.
How To Copy Templates
Method 1: Using Create Block Theme Plugin (Recommended)
Step 1: Install the Plugin
- Go to Plugins > Add New
- Search for “Create Block Theme“
- Install and activate the official WordPress.org plugin
Step 2: Create Child Theme with Your Customizations
- Go to Appearance > Editor (Site Editor)
- Click the Create Block Theme icon next to the “Save” button and select “Create Child Theme” to create a new Child Theme with the active theme as a parent with your changes
- The plugin will generate a ZIP file containing:
- Your database-stored customizations
- All template files
- All images used in templates
Step 3: Install Your Child Theme
- Download the generated ZIP file
- Go to Appearance > Themes > Add New > Upload Theme
- Upload and activate your child theme
Important: If it says it would be overwriting an existing theme, you’ll need to unzip and rezip to rename the folder.
Method 2: Manual Copy (For Advanced Users)
Step 1: Create Child Theme Structure Create a new folder in /wp-content/themes/
named [parent-theme]-child
:
twentytwentyfour-child/
├── style.css
├── theme.json
├── templates/
└── parts/
Step 2: Create style.css
/*
Theme Name: Your Child Theme Name
Template: twentytwentyfour
Description: Child theme
Version: 1.0
*/
Critical: The Template field must be a 100% match of the folder name of the parent theme.
Step 3: Copy Files
- Copy
templates/
folder from parent theme to child theme - Copy
parts/
folder from parent theme to child theme - Copy
theme.json
file to child theme root
Step 4: Export Database Changes If you’ve made Site Editor customizations:
- Go to Appearance > Editor
- Click the three dots menu next to Save button and select “Export”
- Extract the ZIP and copy modified templates to your child theme
Alternative for Database Changes
You can backup changes by copying all blocks from the Site Editor and paste them into a .txt document, then copy the blocks to the HTML file.
Quick Troubleshooting
Templates not showing changes?
- Check if you have database-stored customizations that take precedence over your files
- Look for templates with blue dots in the Site Editor (indicates database customizations)
Child theme not recognized?
- Verify the
Template:
field in style.css matches the parent theme folder name exactly - Ensure style.css is in the child theme root directory
Missing header/footer?
- Copy all template parts from parent theme’s
parts/
folder - Ensure file names match exactly
Conclusion
Copying templates from block themes to child themes is different from classic themes because of how WordPress stores customizations. The main difference with classic themes is that block themes have a theme.json file, so it should also be added to the child theme.
Key Takeaways:
- Use the Create Block Theme plugin for the easiest method
- Database customizations from Site Editor need to be exported separately
- Always copy the theme.json file to your child theme
- Test your child theme thoroughly before going live
The Create Block Theme plugin handles most complexities automatically, making it the recommended approach for most users. Manual copying gives you more control but requires understanding WordPress’s template hierarchy and file structure.