I built a WordPress migration tool that checks its own work
说明与用途
wp‑move 迁移 WordPress 内容,验证所有文章、媒体和链接,并在发现缺失时生成错误报告。
问题
WordPress migration tools often report completion but fail to verify that all content, media, and links were transferred correctly.
结果
On a local WordPress 7.1.3 test site, wp-move migrated all 144 posts/pages and 37 media items, with no missing images or broken internal links, and correctly mapped 164 old URLs to new paths. When an image and a post were deleted, the report detected the missing items and exited with code 2.
工作流
- Read posts, pages, media, categories, and tags through the REST API.
- Convert each post to Markdown with front matter, leaving unsupported HTML as is.
- Download images hosted on the site and rewrite their paths.
- Map every old URL to its new path and write _redirects and nginx files.
- Generate report.html and report.json; exit with code 2 if posts, media, image references or internal links are missing.
证据
Most WordPress migration tools end the same way: export finished. Finished is not the same as complete.
On a local WordPress 7.1.3 with the official theme test data: 144/144 posts and pages, including a draft and a scheduled post; 37/37 media originals; 0 pages under 95% of their words, 0 missing images, 0 broken internal links; 164/164 old URLs redirect to the new path through nginx
Then I broke it on purpose: I deleted one image and one post from a copy. The report showed 143/144, 36/37, and 3 missing image references, and the command exited with code 2.
- 记录日期: 2026-11-01T10:58:51.390Z