When to copy a theme
Copying a theme gives you a complete duplicate to experiment with, or a starting point for a child of a theme you do not want to modify directly. The copy is a full directory copy, so it includes assets, configuration and every other file, not only the .phtml templates.
Copying
- Open the editor and select the theme to duplicate in Theme:.
- Click Copy Theme… in the toolbar.
- In the Copy Theme dialog, Source theme shows the selected theme. Type a New theme name using only letters, numbers,
_and-(up to 128 characters). This becomes the directory name underthemes/. - Click Copy.
The module then:
- creates
themes/<new-name>/and copies every file and directory from the source, skipping symbolic links; - updates the
nameentry in the new theme'sconfig/theme.ini(ortheme.iniin the theme root) to a title-case version of the directory name, somy-theme-copybecomes My Theme Copy; - records an initial revision for every
.phtmlfile under the new theme'sview/directory, with the summaryCopied from theme: <source>; - reloads the editor with the new theme selected.
The new theme is available for selection on each site's Theme page like any other installed theme.
Requirements and limits
- The
themes/directory must be writable by the web server user, otherwise the copy fails with Failed to create directory. - The target name must not already exist in
themes/. - Large themes can take a moment; the dialog shows Copying… this may take a moment. until it finishes.
- The module never deletes a theme. Remove an unwanted copy on the server.