Duplicate a Gutenberg Template

I’m surprised there’s no easy way to clone a Template yet. Am I missing something?

In the FSE go to All Templates. You can Add a new template, but there’s no option to copy, clone, or duplicate an existing template. Searches on the concept return hits on copying Themes, and creating a child template to manually copy files. WTH?

We can create a new template, save it, go to an existing one, copy all blocks, come back, and paste.

Or we can do that with two browser tabs/windows open.

Or we can save a whole template as a custom template part, then extract the components into a new template.

Or we can upload a template to Templately or a similar service and then download it again.

What a hassle!

I don’t see a single plugin that mentions the concept.
Surely others have felt the desire to do this.
Surely at version 16.7 this is a well-tested part of Gutenberg?

Am I missing something?

Tell me and I’ll stop calling you Shirley. :stuck_out_tongue_winking_eye:

Thanks.

  • Patrick Freitas
    • FLS

    Hi Tony G

    I hope you are doing well

    It seems the duplicate template still pending:

    https://github.com/WordPress/gutenberg/issues/36665
    https://github.com/WordPress/gutenberg/issues/38192

    Not sure if that is what you are looking for but I did a quick test by exporting the current theme, duplicating the HTML template then uploading the updated version:

    [attachments are only viewable by logged-in members]

    [attachments are only viewable by logged-in members]

    [attachments are only viewable by logged-in members]

    Best Regards
    Patrick Freitas

  • Tony G
    • Mr. LetsFixTheWorld

    Patrick Freitas I followed your lead and was successful.

    – I exported the entire theme as a zip.
    – Unnecessary :
    – Unpacked that.
    – Created a GitHub repo and pushed the theme data there.
    – On the server, git clone.
    – Simpler alternate: FTP zip to server and unpack, if you’re running FTP
    – Copy everything into themes/childname
    – Chmod, chown, and set perms on the folder recursively.

    Now open wp-admin/site-editor.php and everything is exactly as expected!

    :grinning: W00T :exclamation:

    1) This should already be in there.
    2) This could be done with a plugin.
    3) It’s FOSS. We pay for “free” with our time. :wink:

    Thanks bud!