Skip to content

Theme preview: allow users to save changes before activating the theme #67631

Open

Description

@afercia

Description

@carolinan, @SergeyBiryukov and myself we're exploring potential improvements for theme creators and ways to make a theme customization flow more useful for some users.

The theme preview implemented in #50030 has great potential. From the WP admin > Appearance > any block theme > Live Preview, users can preview a non-active theme in the Site editor and they can also make changes to the previewd theme.

However, once they are done with their changes, they can only save and activate the theme.

For the future, we envision the Site Editor as a place where users can create a full theme from scratch. While there are many parts that should be implemented or improved to make the editor provide a full theme-creation experience, it seems to us that a good first step would be to decouple the 'Save' and 'Activate' actions in the Theme preview.

Allowing users to save their previewed theme changes before activating the theme would help other use cases as well. For example, users may want to deeply customize a previewed theme and that could require hours maybe days of work. By decoupling the Save and Activate actions, users would be able to take all the time they need for their customization work and activate when they are ready.

Code-wise, it looks like activation of the theme is always forced when saving changes to a previewed theme. It always assumes users want to activate the theme, while that may not be necessarily true.

Step-by-step reproduction instructions

  • Go to the WP admin > Appearance > any block theme > Live Preview.
  • Observe both the button in the Navigation panel and the one in the edit view top bar are labeled 'Activate {theme name}'.
  • Make changes to the previewed theme e.g. a simple color change in the global styles.
  • Observe both the button in the Navigation panel and the one in the edit view top bar are now labeled 'Activate {theme name} & Save'.
  • Observe there's no way to save your changes without also activating the theme.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Activity

  1. added
    [Feature] Site Editor
    [Type] Feature
    [Type] Overview
    on Dec 5, 2024
  2. self-assigned this
    on Dec 5, 2024
  3. removed
    [Type] Overview
    on Dec 9, 2024
  4. annezazu commented on Dec 9, 2024

    @annezazu
    Contributor

    I imagine this will overlap with #29575 in terms of solutions!

  5. changed the title [-]Theme preview: allow users to save changes before activating the them[/-] [+]Theme preview: allow users to save changes before activating the theme[/+] on Dec 10, 2024
  6. okmttdhr commented on Mar 10, 2025

    @okmttdhr
    Contributor

    Adding the "Save & Exit" feature to the theme preview comes with several tricky considerations. Here are what I found:

    • While previewing a theme in the Site Editor, users can modify not only the previewed theme templates and global styles but also the site content (e.g., site title), which takes effect before activating a previewed theme if users can save it. This raises a key question:
      • What exactly should the "Save" button do?
      • Should it save only theme customizations, or should it also save changes to site content?
      • How do we clearly communicate this distinction to users?
    • To allow users to preview a theme from scratch, we need to provide a "Reset Your Customizations" button.
    • We should ensure a clear distinction between "Activate" and "Save":
      • The Activate button should be disabled until the Save button is clicked to confirm customizations.
      • We need to verify that Users can leave Block Theme Previews without noticing  #53935 is fully resolved, with no remaining loopholes. (In my quick testing, it looks like all issues have already been addressed, though!)
  7. removed their assignment
    on Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Site Editor[Type] Feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions