Old Rails blog to WordPress
I exported a Rails-style blog database to a WordPress import file, imported it into a local WordPress with WP-CLI and compared each of the 8 posts with the database: 0 mismatches.
Sample migration, fictional pottery blog · Data migration

Downloads
The code, the runs and the reports are real; the pottery blog, its posts, people and e-mail addresses are invented.
The result
- One WXR 1.2 file with 8 posts (7 published, 1 draft), 8 image attachments, 3 categories, 4 tags and 2 authors; the validator found 0 errors.
- I imported it into a local WordPress 7.1.2 with WP-CLI; a second import run added no duplicates.
- My compare script checked the site against the source database: 8 posts, 64 fields, 0 mismatches, and all 8 uploaded images match the source files by sha256.
- 65 tests on the exporter and 33 tests on the compare script, all passing.
What is checked
- Per post: title, slug, status, local date, GMT date, body, categories and tags.
- Each image becomes one attachment on its own post, and the uploaded file matches the source image by sha256.
- The draft stays a draft, and GMT dates follow London summer time.
- The compare script fails (exit 1) on four damaged copies: changed fields, a swapped image, a post missing from the source and an image on another host.
- The exporter opens the database read-only; tests confirm its sha256 is unchanged after a run.
- Subscribers: e-mails lower-cased, duplicates removed, anyone who unsubscribed left out.
What I built
- An exporter that reads the SQLite database and writes WXR 1.2 with posts, image attachments, categories, tags and authors, plus a subscriber CSV.
- A compare script that reads the source database and the imported site through WP-CLI read commands and reports each field of each post.
Built with: Python (standard library), SQLite, WP-CLI, WordPress 7.1.2
Tell me which platform you are leaving and I will check a sample export first.Contact me