3 min read

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_posts table). It does not write to your .html files in the templates/ 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.

The official Create Block Theme plugin by the WordPress.org team is the standard tool for this workflow.

How to Use It

  1. Install and Activate Create Block Theme.
  2. Make your design changes in the Site Editor (Global Styles, Templates, etc.).
  3. Go to Appearance > Create Block Theme.
  4. 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:

  1. Develop locally.
  2. Click "Save changes to the theme".
  3. Check git status. You should see modified .html and theme.json files.
  4. 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.

  1. Open the Site Editor (Appearance > Editor).
  2. Click the Options (three dots) in the top-right corner.
  3. 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.

  1. Open the Template in the Site Editor.
  2. Click Options (three dots) > Code Editor.
  3. Select All (Ctrl+A) and Copy the block markup.
  4. Open your local file (e.g., templates/header.html).
  5. 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.

  1. Go to Appearance > Editor > Templates.
  2. Look for templates with a Blue Dot (indicates Database customization).
  3. Click the Options (three dots) on that template.
  4. 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

  1. [ ] Install Create Block Theme.
  2. [ ] Edit visually in Site Editor.
  3. [ ] Appearance > Create Block Theme > Save changes.
  4. [ ] Git Commit & Push.