**Webizer 0.9:** XML 1.0 remains supported. Export uses XML 1.1; see the additional sections below. Websites start Inactive; page/post states remain Draft/Published. Plan limits apply at confirmation.

# Webizer Import Format 1.0

Create a ZIP whose root contains `webizer.xml`. Do not wrap the contents in an enclosing company-name folder. The XML is UTF-8, with root `<webizer-import version="1.0">`. Use only the sections below, once each. Section order is flexible, but define all image references in `media`.

```
webizer.xml
images/hero.jpg
images/team.png
branding/logo.png
branding/favicon.png
```

Only the manifest and images actually declared by the manifest may be included. No PDF, Word, executable code, JavaScript, CSS files, SVG, symlinks, encrypted files or remote image downloads. ZIP maximum 20 MB, uncompressed maximum 64 MB, 250 entries, 75 Media images. Each image maximum 5 MB, 4096 px per side and 12 million pixels. PNG/JPEG/WebP only. Folder and file names are case-sensitive. Use flat `images/` and `branding/` folders with simple ASCII filenames.

## Company details and branding (optional)

```xml
<site title="Company name" template="classic" accent="#24543d">
  <tagline>Short description</tagline>
  <phone>+60 ...</phone>
  <email>hello@example.com</email>
  <address>Company address</address>
</site>
<branding mode="image" name="Company name">
  <logo file="branding/logo.png"/>
  <favicon file="branding/favicon.png"/>
</branding>
```

Template: `classic`, `horizon`, `canvas`, `meridian`, `atlas` or `spotlight` (last three require Webizer 0.4+). Branding mode: `image` or `text`. Omit unknown source details rather than inventing them. Omitted company fields and logo/favicon files retain their current values. Providing a branding section applies its mode and brand name; omit the section to preserve branding entirely. Recommended logo: 600 × 200 px, transparent PNG. Favicon: 512 × 512 px, square and at least 32 × 32 px.

Logo/favicon are copied into private branding storage, independently of Media. These settings apply only when the user checks “Apply company details, template and branding” for an inactive website. A published website cannot receive settings/system-page replacements through import.

## Media images (optional)

```xml
<media>
  <image key="team" file="images/team.jpg" name="Our team"/>
</media>
```

Use a package-local key matching `[a-z][a-z0-9-]{0,59}`. Keys are not database IDs. Content images reference `asset:team`; cover attributes reference `team`. Images are re-encoded and assigned new tenant-owned IDs. Recommended cover: 1600 × 900 px; content photo: 1200 × 800 px. Missing images must be omitted along with their references.

## Blocks, pages and posts

```xml
<blocks>
  <block key="contact" title="Contact us">
    <body><![CDATA[<h3>Contact us</h3><p>Accurate source details.</p>]]></body>
  </block>
</blocks>
<pages>
  <page key="home" kind="home" slug="home" title="Welcome" cover="team"
        menu="true" label="Home" order="0">
    <excerpt>Short plain-text summary.</excerpt>
    <body><![CDATA[<h2>Our company</h2><p>[block:contact]</p>]]></body>
  </page>
  <page key="services" slug="services" title="Services" menu="true" order="10">
    <body><![CDATA[<p>Our services.</p>]]></body>
  </page>
  <page key="consulting" slug="consulting" title="Consulting" parent="services"
        menu="true" order="1">
    <body><![CDATA[<img src="asset:team" alt="Our team" data-image-width="50"
       data-image-wrap="left"><p>Service description.</p>]]></body>
  </page>
</pages>
<posts>
  <post key="welcome" slug="welcome" title="Welcome" cover="team"
        date="2026-11-28T00:00:00Z">
    <excerpt>Plain-text summary.</excerpt>
    <body><![CDATA[<p><a href="page:services">Our services</a></p>]]></body>
  </post>
</posts>
```

- Required: key/title on every block/page/post, and slug on pages/posts. At least one block, page or post. Maximum 100 of each.
- Slugs: lowercase letters/numbers separated by single hyphens, maximum 190 characters. Keys are unique within their section. Reusing a slug is allowed; Webizer allocates an `-import-N` suffix on conflict.
- Page kind: `page` (default), `home` or `blog`; at most one of each system kind. Without the replacement option, Home/Blog entries become separate regular draft pages. With replacement selected on an inactive website, existing system-page content is replaced and remains draft.
- Parent: another page key in this package. Never use database IDs. Cycles and nesting over 20 levels are rejected. `menu` must be `true` or `false`; default false. `order` is an integer; lower numbers appear first. `label` is optional, maximum 100 characters.
- Body: HTML in CDATA, maximum 500,000 characters per item; the entire manifest is limited to 2 MB. If text contains `]]>`, split CDATA safely or use XML-escaped body text.
- Allowed formatting is sanitized using Webizer's HTML allowlist. No scripts/forms/iframes/embedded files. Every `<img>` must use `src="asset:KEY"`; external or existing Media image URLs are rejected. `data-image-width="1"` to `"100"` and `data-image-wrap="left"`/`"right"` are supported.
- Blocks: `[block:KEY]` references a block in this package. Webizer maps it to its new numeric ID. Numeric IDs, missing references, cycles, expansion over 200 blocks or 1 MB, and nesting over 10 levels are rejected.
- Internal links: `href="page:KEY"` or `href="post:KEY"`. External HTTPS links, mailto and tel links may be used. Image URLs are never fetched from the internet.
- Excerpt: plain text, maximum 2,000 characters. Post date is optional, strictly UTC `YYYY-MM-DDTHH:MM:SSZ`; missing dates use import time.
- Source status attributes cannot choose publication. Pages default to draft; Webizer 0.4 optionally sets imported pages (including Home/Blog) to Published when the user selects that option during upload to a inactive/new website. The website remains Inactive and private. Posts always remain drafts. New blocks are enabled by default; optional enabled="false" preserves a disabled block. They are referenced only by imported content. Existing blocks are never overwritten. PDF Library files/plugin configuration are outside format 1.0.

## Import workflow

To create a new website: My sites → Import a new website → choose a unique Website ID → upload and review → Create inactive website. Include a page with kind="home". Company/template/branding and Home/Blog content are applied automatically; the website remains Inactive; imported pages/posts default to draft. Optionally select “Publish imported pages; keep website Inactive” during upload. This sets pages to Published while blog posts remain drafts; public access still requires website activation. Website IDs are selected outside the ZIP and checked again at confirmation. Cancelling a preview creates no website.

To add content to an existing website: select a website → Import → Upload and review → inspect each page/post/block → Confirm import as drafts → review in Quill → publish when ready. Preview expires after 60 minutes. Cancel discards the staged ZIP. Retrying the same completed confirmation returns its receipt without duplicating content.

Existing content is retained by default. Both optional replacement/settings checkboxes are off initially and available only for inactive websites. If website content changes between preview and confirmation, Webizer requires a fresh review. Each job belongs to the authenticated uploader and selected website. Import does not execute ZIP contents, extract arbitrary paths, fetch URLs, provision domains or publish automatically.

The publication checkbox is a Webizer upload choice, never an XML attribute. It is disabled for active websites and checked again at confirmation. Existing previews without stored options retain draft-page behavior.

## XML 1.1 — SEO, design and social settings (Webizer 0.9)

Use <webizer-import version="1.1"> with the same site/branding/media/blocks/pages/posts structure as 1.0. The custom template name is custom; the six built-in templates remain valid. Three optional top-level sections are available once each. Example references below assume media key hero and block key contact already exist in the package.

```xml
<seo title="Example Company | Services" suffix="Example Company" index="true" image="hero">
  <description>Accurate company description for search and sharing.</description>
  <keywords>optional, company, keywords</keywords>
</seo>
<design topbar="true" menu="true" library-menu="true">
  <header><![CDATA[<p>Additional header content</p>]]></header>
  <footer><![CDATA[<p>[block:contact]</p>]]></footer>
  <css><![CDATA[.tenant-footer{padding-top:24px}]]></css>
  <footer-note>Company information</footer-note>
  <brand-name>Example Company</brand-name>
  <custom-header><![CDATA[<div class="container ct-header"><a href="[siteurl]">[logo]</a>[menu]</div>]]></custom-header>
  <custom-footer><![CDATA[<div class="container ct-footer"><p>[sitename] · [email]</p>[social]</div>]]></custom-footer>
  <custom-css><![CDATA[.theme-custom .ct-header{display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap}.theme-custom .ct-footer{padding:32px 0;background-image:url("asset:hero")}]]></custom-css>
</design>
<social header="false" footer="true">
  <link name="facebook" url="https://www.facebook.com/example"/>
</social>
```

- SEO limits: title 190 characters, suffix 100, description/keywords 500 each. index defaults true; previews always remain noindex. image is an existing package Media key, never a database ID.
- Design HTML is sanitized. custom-header/custom-footer support 200,000 characters each; css/custom-css support 100,000. Structural markup is allowed in the custom fields, while normal header/footer use the content allowlist. CSS url("asset:KEY") references declared Media. No CSS files, remote URLs, inline JavaScript, event handlers, inline style attributes, forms, SVG, iframes, PHP or CSS imports. Use .theme-custom selectors.
- Supported text shortcodes: [sitename], [tagline], [pagetitle], [siteurl], [email], [phone], [address], [year], [copyright]. Values are escaped. Custom header/footer also support trusted [menu], [logo], [social] output. [block:KEY] uses package-local block keys and is remapped on import. Links may use href="[siteurl]", href="[siteurl]/p/services", href="mailto:[email]" or href="tel:[phone]" in custom markup. Scalar tokens in ordinary content expand only in text nodes, not link attributes.
- Social names must match Webizer's social network catalog and HTTPS host allowlist. Duplicate names, embedded credentials and explicit ports are rejected. Header visibility defaults false and footer true. Design topbar/menu/library-menu default true when omitted.
- Optional block enabled="false" preserves its disabled state. Export records original page/post source-status for information; it does not activate or publish anything. Import pages/posts default to Draft; the existing upload checkbox may publish pages while the website remains Inactive. Posts stay Draft.
- Version 1.1 limits: 500 pages, 10,000 posts, 1,000 blocks, 500 Media images, 1,000 ZIP entries, 32 MB XML, 5 GiB total unpacked. Per-image dimension/size and block expansion limits from 1.0 still apply. The export builder also limits aggregate source body text to 8 MB. This is an export/import safety bound, not a cap on the site's unlimited blog plan.
- Application upload defaults to 20 MB, controlled by max_import_upload_bytes plus PHP/proxy limits. Larger exports require suitable destination upload limits and sufficient disk/memory/time. Free/Pro page, image and total storage quotas remain enforced. An oversized or invalid export fails explicitly instead of silently omitting items.
- Apply company/template settings on an existing Inactive site to import SEO/design/social too. New-site import applies these settings automatically. Menu relationships, blocks and Media get new IDs; unknown or cross-package references are rejected.
- Export includes draft/private content and all Media images, plus logo/favicon files. Keep ZIPs private. PDF Library documents, plugin settings, domains/DNS, accounts/passwords, API credentials, orders/payments, messages and abuse reports are excluded. This format is portable content, not a complete hosting backup.

The bundled sample.zip remains a valid 1.0 example. To create a 1.1 example, change its root version and add these sections using the existing hero/contact keys. Export from Manage Sites generates a complete validated 1.1 package automatically. Do not add this documentation to the import ZIP.

## Webizer 0.11 extension

Optional `<custom-js>` under `<design>` contains UTF-8 text, at most 32,000 bytes, validated for the isolated Webizer API. XML-escape the text or use CDATA; no script tags, browser/DOM APIs, network/remote imports, popups or downloads. Import always disables execution until owner review/enable. See docs/CUSTOM-SCRIPTS.md. Older apps can reject this new element; omit it for older destinations. CSS remains inline text in custom-css, not an executable uploaded ZIP asset.

Text codenames also support [menu,horizontal], [menu,vertical], [menu,grid], [pages,grid], [pages,list], [pages,compact], and one ct- style class such as [pages,ct-services]. These tokens remain literal source in the XML and render using destination menu pages.

## Webizer 0.12 layout HTML

Page/post/block body HTML can preserve div.webizer-row with div.webizer-column children (data-column-width, percentage width), and div.webizer-table-wrap containing table[data-table-border="0".."8"], colgroup/col[data-column-width], and tr[data-row-height]. The server rebuilds safe styles from this metadata. Editor controls and arbitrary styles remain prohibited. Visual editing supports 1–6 columns, 1–10 table rows and no nested layouts; larger layouts stay in Full code. Upgrade the import destination to 0.12 before importing these layouts to retain metadata.

## Webizer 0.13 template palettes

Design optionally accepts color-scheme="ocean|forest|ember|plum|slate|gold". Export includes the active preset only; the root site accent color remains part of the portable settings. New template names: summit, prestige, studio, venture, cornerstone, serenity. Upgrade the destination before importing these names or full palettes. Existing Custom packages remain valid. Pixabay variants export as ordinary Media items, each retaining its own file; API tokens/private download URLs are not exported.
