Moving a site in
Open Import under a site, run sophia import <file>, or have an agent use the import_site tool. The importer shows what is in the file before writing anything, then runs in the background.
From WordPress
In WordPress, use Tools > Export > All content to get an .xml file. The importer brings over:
- pages and posts with their dates, authors, categories and tags, drafts and private posts as drafts;
- the pictures those pages use, from a copy of
wp-content/uploadsor downloaded from the old site; - menus, and the home page;
- WooCommerce products with sale prices, stock, galleries and variations, which become product options;
- approved comments with their replies, skipping spam and pingbacks.
It cleans the HTML, keeps the paragraphs of classic-editor posts, and removes plugin shortcodes, which it lists in the report. Custom post types from plugins do not come over.
From Joomla
Export the database as an .sql dump, for example from phpMyAdmin. Articles, categories and menus come over. An article a menu links to directly becomes a page, and the rest become articles. Give the old address with --old-url, because Joomla dumps do not include it.
Addresses and links
Every old address answers with a 301 redirect to its new page, and links inside the text are repointed. Running the import again updates what it brought in instead of making copies.
Importing into an existing site keeps its home page and its blog or shop list. Add --set-home to replace the home page with the imported one.
From a folder of Markdown files
sophia import ./my-site --as my-site --name "My site"
Each .md file becomes a page. index.md at the top is the home page. A subfolder with its own index.md becomes a section, and its other files go in that section's submenu. A short header sets details:
---
title: Install
menu: Install
description: One sentence for search results.
order: 2
nav: false
---
Without a title, the first # heading is used. File names can start with a number to set the order, as in 02-install.md, and the number is not part of the address. Tables, task lists and code blocks work. This site is kept that way.
From Sophia Stack 2
sophia import-stack2 <stack2 data folder> copies a site from the earlier Node version. It reads a backup copy of the database and never changes the source.
Command options
| Option | What it does |
|---|---|
--into <site> | Import into a site that already exists. |
--as <slug> --name <name> | Make a new site. |
--template <name> | Template for a new site (default aurora). |
--hosts a.com,www.a.com | Domain names for a new site. |
--uploads <folder> | A copy of the old site's files, for pictures. |
--download | Fetch pictures from the old site instead. |
--dry-run | Only show what is in the file. |