Skip to content

Templates and Theme Settings Migration #57600

@hadamlenz

Description

@hadamlenz

What problem does this address?

When working on a site in production a site author might make changes to blocks and global styles. The changes that the site author has made can be seen in the exported theme when you click this button.

Screenshot 2024-01-05 at 9 23 06 AM

This is pretty great, it creates a new theme. This can be super useful for agencies that need to pump out a bunch of themes to single sites.

The Problem

If you wanted to move these changes around in a multisite you'd end up creating a ton of slightly different themes with slightly different settings. All of these slightly different themes would need to be updated if, for example, one part of the theme was missing an aria-label. That would create a big headache.

You could just overwrite the old theme with the newer version of itself, but if we consider one theme going out to a multisite of 10 sites. On those 10 sites a slightly different color is chosen for the accent color, there is no way to apply all 10 of those different changes back into the original theme for testing and you'd not want to overwrite 9 of the authors.

You could copy and paste a bunch of blocks and hope you get all the settings, but I want to give this to a person who might not have all the time in the world, maybe they are not a seasoned web dev.

You could use a migration plugin, but most of these are centered around migrating a whole site and all the content. We just need the settings applied to in the editor.

You could pull the database with wp-cli and search/replace creating a clone. This is a long process requiring access to wp-cli which isn't available everywhere.

Consider this on WordPress.com. If a user on WordPress.com made a site and wanted to just move the styles, template, and parts from one site to another site, how would they do that without a flurry of copy paste?

What is your proposed solution?

Create a way to import the parts, patterns, templates, and theme.json changes that have been applied to the exported theme back into a site and apply those changes to the theme. These changes would overwrite any changes that have been made to the theme in the editor but would not change the code that's in the theme folder. An importer for just the things that have been changed and exported to the new theme.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Type] EnhancementA suggestion for improvement.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions