Migrate examples, every page
Move layouts, settings and templates between installations, versions and sites.
- Move all layouts to another installation: exp:layouts export --all on the source, import with a dry run on the target; content is matched by remote ID and path.
- Move only some layouts: --only with the layout identifiers; the shared layouts they link to come along.
- Move the mappings with the layouts: --rules=none|selected|all decides which layout mappings travel; selected (the default) takes those of the chosen layouts.
- When the target lacks some content: --unmapped=drop|keep|fail decides what happens to references to content the target does not have (default drop).
- Import beside the existing layouts: --strategy=copy imports items that already exist as new copies, leaving the originals.
- Choose the strategy per layout: --item=<key>=<strategy>,... sets skip, overwrite or copy per item, with the keys the dry run prints.
- Keep layouts in the project repository: Commit exports next to the design extension; layouts.json in the archive can be compared between versions.
- Move a site's settings into its extension: exp:ini move / move-all move blocks or whole siteaccess scopes into an extension (--create-extension --activate), with a dry run.
- Copy the menu settings to another siteaccess: exp:ini copy copies a setting (a whole array with its reset line) from one scope to another.
- Change the settings files of another root: exp:ini --root=<dir> works on the settings tree of another root (a copy of the installation); the INI cache there is not cleared, and the scope must exist there.
- Update stored component block identifiers: Layouts from before the rename store components as ibexa_component_<type>; ext:explayouts:updatecomponentblockidentifiers renames them to exp_component_<type>.
- Update stored block links to remote IDs: ext:explayouts:updatelinklocationreferences converts block links from ibexa-location://<id> to exp-remote-location://<remote id>.
- Use exp:layouts instead of the old helper scripts: The ext:explayouts:* helpers (block_list, layout_info, layout_copy, layout_list, rule_list, share_create, collection_list) run on their own again since explayouts 1.4.42; exp:layouts stays the tool for export and import.
- Migrate a template-built site to Layouts: Keep the design; turn the page layout's parts into template blocks of a shared Header / Footer; add page layouts per class; map them.
- Freeze a Layouts site into templates: When a site must stop changing (an archive), its layouts can stay; freezing means fewer editors, not rewriting.
- Add a language and give it layouts: A new siteaccess gets its settings (menu.ini) by exp:ini copy and its own layouts by mappings with a Siteaccess condition.
- Move content to another place in the tree: A move keeps node IDs: menus, Location mappings and manual collections follow; Path and Path prefix targets do not.
- Site packages and layouts: The site packages of this installation carry content but no layouts; install the layouts with exp:layouts import after the content.
- Check layouts after an upgrade: After upgrading Exponential, export, list, open the main layouts in the editor and compare the pages.
- Check your template overrides after an upgrade: Your copies of theme templates do not get the theme's fixes; compare them with the new theme versions.
- Check the extension order after moving settings: After moving settings or adding extensions, check DesignExtensions[] and AvailableBlocks[] in effect.
- Different node IDs on staging and production: Node IDs differ between installations; menus (MainMenuID) need the target's IDs, layouts are matched by remote ID and path.
- Rename layouts without breaking imports: Imports match layouts by identifier; keep identifiers stable and change names freely.
- Split one installation into two sites: Export the layouts of the site's subtree, import them on the new installation after its content.
- Merge layouts from two installations: Import the second site's layouts with --strategy=copy where identifiers clash, then rename and remap.
- Rescue a layout broken by an import: Import the previous export with overwrite and publish; the import purges the page cache itself.
- Move a hard-coded menu into settings: An old template with links typed into it becomes a MainMenuID[] list read by the theme's main_menu.tpl.
- Replace copied HTML snippets by a block type: Many HTML snippet blocks with the same markup become one block type; replace them one by one.
- Move inline styles into the stylesheet: style="" and <style> in old templates go into your stylesheet, packed with the theme's.
- Write down what the migration changed: List moved settings, imported layouts and their strategies, overrides added or removed - for the next migration.
- Velocity after a migration: On a site served by Exponential Velocity, settings changes need exp:velocity restart, as exp:ini says.
- Rehearse the migration on a copy: Run every command against a copy first; the dry runs on live then hold no surprises.
- Plan the way back: Exports of the layouts, backups of the INI files (exp:ini keeps them in var/backup/ini/) and the previous extension release.
- The checklist after a migration: Pages by markup, menus, mappings, drafts, caches, Velocity: the checks after moving.
Related pages
- Life-cycle examples
- Two ways to build
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.