Docs: Importer
The importer
Bring a ProcessWire or WordPress site into tilspire: Layouts, pages, images, links, redirects and menus, with a dry run and an undo.
The importer brings another site's content into tilspire: its page types, pages, images, links, redirects and menus. It reads ProcessWire sites, and WordPress sites with or without Advanced Custom Fields. It arrived in 1.17.0, is free, and is off until you enable it.
What it brings over #
- Page types become Layouts, with their fields: text, rich text, numbers, options, checkboxes, images, page references and repeaters.
- Pages in their tree, with their addresses, original dates and status (an unpublished page becomes a draft). WordPress posts and pages, with their categories and ACF fields.
- Images: the originals only. tilspire makes its own sizes.
- Links in rich text are rewritten to the new pages and images.
- Redirects: a permanent redirect for every page whose address changed, so old links and search results keep working.
- Menus, with their order and nesting.
- WordPress comments, approved and waiting, through the Comments module. Spam, trash and pingbacks stay behind, and so does a commenter's email and address.
Users, roles and the old site's admin settings are not imported.
Before you start #
Copy the old site's database into a database on your server, and its uploaded files into a folder outside your web root. Then name that source in site/config/config.php. The steps are in the module's README.md. Database passwords are never typed into the admin panel or stored by tilspire, and nothing is fetched over the internet.
Running an import #
Enable Importer under System ▸ Modules, and open System ▸ Import. The wizard has five steps:
- Source: pick the old site and test the connection.
- Match the fields: for each page type, make a new Layout, use one you have, or leave it out.
- Dry run: it changes no content, and reports what an import would create, change and leave out.
- Import: it takes a database snapshot first, works in small steps and picks up where it stopped if you close the tab.
- Report: what was done, with Undo.
The same runs are available from the command line, for a large site.
Undo #
Undo removes what the import created. Anything a person edited since is kept, and listed in the report.
Who may import #
Importing needs the Import another site's content permission together with the permissions to manage pages, Layouts, media, redirects and menus. Importing comments also needs Manage comment settings.