WordPress Import
Migrate posts, pages, categories, tags, and comments from WordPress to Pubvana.
TL;DR
Admin → Import: upload a WordPress WXR export XML file. Use Dry Run to preview imports before committing. CLI: php spark wp:import /path/to/export.xml --dry-run.
Details
Exporting from WordPress
In your WordPress admin: Tools → Export → All Content → Download Export File. This produces a .xml file in the WXR (WordPress eXtended RSS) format.
For large sites, WordPress may offer separate exports for Posts, Pages, etc. Import each file separately if needed.
What Gets Imported
| Content Type | Details |
|---|---|
| Posts | Title, content (HTML), excerpt, slug, status, published date |
| Pages | Title, content, slug, status, published date |
| Categories | Name, slug, description, parent hierarchy |
| Tags | Name, slug, description |
| Comments | Body, author name/email/URL, date, threading (parent/child), status (approved/spam/trash) |
Not imported: WordPress media attachments are not downloaded. Image URLs in post content are preserved as-is pointing to the original WordPress site. You will need to migrate media separately or update URLs manually.
Running the Import
- Go to Admin → Import.
- Click Choose File and select your WordPress export XML.
- Click Dry Run first to see a summary of what would be imported.
- Review the preview — posts, pages, categories, tags, and comment counts are shown.
- Click Import to run the actual import.
Author Mapping
WordPress authors are matched to existing Pubvana users by email address. If a WordPress author's email matches a Pubvana account, their content is assigned to that user. Unmatched authors are assigned to the admin account that performed the import.
Handling Slug Conflicts
If an imported post or page has a slug that already exists in Pubvana, a numeric suffix is appended (e.g., my-post-2). Categories and tags with matching slugs are merged rather than duplicated.
CLI Usage
php spark wp:import /path/to/wordpress-export.xml
Add --dry-run to preview without writing to the database:
php spark wp:import /path/to/wordpress-export.xml --dry-run
The CLI is useful for large imports that might time out in a browser, or for scripted migrations.