Exporting
Appearance
The site's look on rows of its own, item by item: Customizer theme mods and CSS rules, the Site Editor's style groups, CSS rules, templates and template parts, and widgets — with a preview of each, the media they use, and how the other site takes them.
The site’s look is exported on rows of its own, next to the content types. A row shows only when the active theme has something in it, and its Choose items panel lists what it holds, each with a preview:
| Row | Each item | Preview | Shows with |
|---|---|---|---|
| Customizer theme mods | A setting of Appearance → Customize: Logo, Header image, Background image and color, Header text color, the theme’s own settings | The image, the color, or the value | A theme with Customizer settings |
| Customizer custom CSS | A rule of Customize → Additional CSS (an @media block counts as one; a comment right before goes with it) |
The rule, and which one it is: Rule 3 of 3 (the last) | A theme with Additional CSS |
| Editor global styles | A group of Appearance → Editor → Styles: Color palette, Site colors, Typography, Spacing and layout, Elements, each block with styles of its own | Its colors, or a summary | Block themes with saved styles |
| Editor global CSS | A rule of the Site Editor’s Additional CSS | The rule | Block themes with Additional CSS there |
| Editor templates | A template of the active theme edited in Appearance → Editor → Templates (Pages, Single Posts, a custom one) | Its block markup | Block themes with templates edited there |
| Editor template parts | A template part of the active theme edited there: the Header, the Footer, a part of its own, with its area | Its block markup | Block themes with parts edited there |
| Widgets | A widget — classic (text, image, menu…) or block — with its sidebar | Its text or image | Classic themes with widgets in their sidebars |
Check a row to take all it has (every item is suggested), or open Choose items and check only some: the last CSS rule, the logo and the background color, one widget, the header. They need a bundle (.wxrz, .zip or a Playground .zip): they travel in its options.json — but templates and template parts, which are posts and travel in the WXR as content does (a plain .xml carries them too).
Only what was edited in the Site Editor is listed: a template the theme’s own files hold, untouched, the other site’s theme has already.
What comes along
The images the items chosen use are exported with them, even when the Attachments row isn’t checked: the logo, the header and background images, the media of image widgets and block widgets, the images in templates and template parts, and the uploads the styles and the CSS point to (Only attached media in Settings → Export turns it off, as for content).
On the other site
-
CSS rules (the Customizer’s and the Site Editor’s) are added to the other site’s CSS, as Details → CSS rules on import says: at the end (the default), at the start, replacing the block of the same name the other site already has (at the end when it has none), or replacing all its CSS. They go between two comments named after the file:
.their-own { color: purple; } /* head COMB-584 */ .site-footer { background: #ffeedd; } /* tail COMB-584 */The name is the file’s name without extension —
COMB-584.wxrzhere, named after a task: a mark of where the rules came from. Each import adds its own block — blocks aren’t unique, and the same name can show up more than once. Without the comments (Settings → Export, or the importer), rules the other site already has (same text) aren’t repeated. -
Whoever imports starts from the export’s choice and can change it on the importer’s step 1 (Additional CSS), with
css_mode/css_markersineizport/import, or with--css-mode/--[no-]css-markersin WP-CLI. There:- Replace the “COMB-584” block this site already has — offered only when the other site’s CSS has a head/tail block of the same name (an earlier delivery of a file with that name): the new block takes its place, the rest of the CSS staying (
replace); - Replace all of this site’s CSS — only the file’s rules remain (
replace_all).
- Replace the “COMB-584” block this site already has — offered only when the other site’s CSS has a head/tail block of the same name (an earlier delivery of a file with that name): the new block takes its place, the rest of the CSS staying (
-
Theme mods chosen go to the active theme and are merged into its own: what the file doesn’t hold stays (the other settings, the menus’ locations). The logo and the header image point to the imported attachments, the header and background images’ addresses to the imported files.
-
Style groups chosen replace the same groups on the other site’s styles (a block theme); its other groups stay.
-
Templates and template parts chosen replace the same template of the same theme on the other site (same slug: the Header replaces its Header, not a Header 2 next to it), whatever Update existing says; one it doesn’t have is added. Their navigation blocks point to the imported navigations (export them on the Menus row: the templates’ navigations are suggested), their images to the imported attachments, and their links to the source site to the other site.
-
Widgets chosen go at the end of the same sidebar, next to the other site’s own widgets (to Inactive widgets when its theme has no such sidebar), each with a free number. Importing the same file again with Update existing updates them in place instead of adding them twice. A Navigation Menu widget points to the imported menu (export it on the Menus row), an image widget to the imported image, and the images and addresses in block widgets to the imported ones.
From WP-CLI and the ability
wp eizport export --types=page --appearance=theme_mods:custom_logo+background_color,custom_css,widgets:text-3
wp eizport export --appearance=all --css-mode=start --no-css-markers
wp eizport export --types=page --menus=all --appearance=template_parts:header,templates:page
wp eizport import delivery.wxrz --css-mode=replace
A row alone takes all of it; a CSS rule’s key (r:…) comes from eizport/get-export-options, which lists each row’s items. The eizport/export ability takes appearance (row → "all" or keys), css_mode and css_markers.
Limits
- The look goes to the active theme of the other site. Exported from one theme and imported with another, theme mods only mean something if that theme uses the same settings.
- Templates and template parts belong to their theme: imported into a site with another active theme, they wait, unused, until that theme is activated.
- Fonts installed with the Font Library aren’t exported: styles that use them fall back to the other site’s fonts.
- The theme mods no longer come with the Options row’s Basics group: check Customizer theme mods. A block theme’s site logo is an option, in Basics.