Exporting FSE Changes to Theme Files
One of the most confusing aspects of Full Site Editing (FSE) for developers is the Database vs. File disconnect.
- The Issue: When you edit a template in the Site Editor (Appearance > Editor), WordPress saves those changes to the Database (
wp_poststable). It does not write to your.htmlfiles in thetemplates/folder. - The Risk: If you deploy your theme to a production server using Git, your local database changes won't go with it.
To make your changes permanent and version-controllable, you must "export" them back to your physical theme files.
Method 1: The "Create Block Theme" Plugin (Recommended)
The official Create Block Theme plugin by the WordPress.org team is the standard tool for this workflow.
How to Use It
- Install and Activate Create Block Theme.
- Make your design changes in the Site Editor (Global Styles, Templates, etc.).
- Go to Appearance > Create Block Theme.
- You will see several options:
- Save changes to the theme: This overwrites your local theme files (Styles and Templates) with the changes from the database. Use this if you are developing locally.
- Export zip: Downloads a complete copy of your theme with the current database changes baked in.
- Create a child theme: Generates a child theme based on your current changes.
The Workflow:
- Develop locally.
- Click "Save changes to the theme".
- Check
git status. You should see modified.htmlandtheme.jsonfiles. - Commit and Push.
Method 2: Native Global Export
If you don't want to use a plugin, WordPress has a native export feature, though it only provides a ZIP file.
- Open the Site Editor (Appearance > Editor).
- Click the Options (three dots) in the top-right corner.
- Click Export.
Result:
This downloads a ZIP file of your entire active theme. The theme.json and templates/ in this ZIP contain the merged state of your files + database changes. You then have to unzip it and copy the files over your local project manually.
Method 3: Granular Copy/Paste (For Specific Templates)
Sometimes you only want to sync one specific template (e.g., you fixed a header in the editor) without overwriting everything else.
- Open the Template in the Site Editor.
- Click Options (three dots) > Code Editor.
- Select All (Ctrl+A) and Copy the block markup.
- Open your local file (e.g.,
templates/header.html). - Paste the markup and Save.
4. Cleaning Up (Resetting the DB)
After you have saved your changes to the files (using Method 1 or 3), the database entry becomes redundant. It's good practice to "clear" the database customization so WordPress reads from the file again.
- Go to Appearance > Editor > Templates.
- Look for templates with a Blue Dot (indicates Database customization).
- Click the Options (three dots) on that template.
- Click Clear customizations.
Result:
- If you exported correctly: The template should look exactly the same (because it's reading your updated file).
- If you didn't export: It reverts to the original file state.
Summary Checklist
- [ ] Install Create Block Theme.
- [ ] Edit visually in Site Editor.
- [ ] Appearance > Create Block Theme > Save changes.
- [ ] Git Commit & Push.