Content Migrations
Last updated: January 12, 2026
Moving content between platforms or updating legal documents requires careful verification. This guide covers two common migration scenarios—porting old blog posts to a new CMS and comparing legal documents to ensure accuracy. You'll learn to use diff tools to catch differences before and after migration, preventing costly mistakes and content loss.
In This Guide
How do I port old blog posts to a new platform?
Moving blog content between platforms is one of the most error-prone tasks in web development. Posts can lose formatting, images break, metadata disappears, and SEO value evaporates. The key is treating migration as a verification problem: you need to confirm that what existed before matches what exists after.
Export your existing content
Before touching your old platform, create a complete backup:
- Database export: If your old CMS uses a database (WordPress, Ghost, etc.), export the full database as SQL
- File export: Download all media files from
/uploads,/images, or/mediadirectories - Markdown/HTML export: Most platforms offer content export—use it even if the format isn’t perfect
- Screenshot key pages: Visual reference helps catch layout issues the text exports miss
Create a mapping document
Track every piece of content with a simple spreadsheet:
| Old URL | New URL | Status | Notes |
|---|---|---|---|
/blog/my-post | /articles/my-post | Migrated | Check image links |
/news/update-1 | /articles/update-1 | Pending | Has embedded video |
This mapping serves two purposes: it’s your migration checklist, and it becomes your redirect map for SEO preservation.
Set up redirects before going live
Search engines have indexed your old URLs. Without redirects, you lose that SEO value:
# Example redirect rules for Cloudflare Pages or _redirects file
/blog/* /articles/:splat 301
/news/* /articles/:splat 301
Verify content with diff
After migrating, compare the extracted text content:
# Extract text from old page
curl -s https://old-site.com/blog/my-post | html2text > old-post.txt
# Extract text from new page
curl -s https://new-site.com/articles/my-post | html2text > new-post.txt
# Compare the two
diff old-post.txt new-post.txt
If the diff shows only expected differences (navigation, footer, etc.), your content migrated correctly. Unexpected differences indicate problems.
Check for broken images and links
Run a link checker against your new site:
# Using wget to find broken links
wget --spider --recursive --no-directories --output-file=crawl.log https://new-site.com
# Check for 404s
grep -i "404" crawl.log
Validate metadata preservation
For each migrated post, verify:
- Title tags: Should match or improve upon originals
- Meta descriptions: Preserve or rewrite for better CTR
- Published dates: Critical for blog archives and SEO
- Author information: Important for E-E-A-T signals
- Categories/tags: Maintain content organization
How do I compare documents using diff tools?
When updating legal documents, privacy policies, or terms of service, you need absolute certainty about what changed. A single word difference in a contract can have significant legal implications. The diff command-line tool shows exactly what changed between two versions of a file.
Try our online tool: Don’t want to use the command line? Use our free Document Diff Tool to compare two documents in your browser. Just paste your original and new versions, and see the differences highlighted instantly.
Basic diff usage
Compare two files to see what changed:
diff privacy-prod.md privacy-dev.md
This outputs lines that differ, prefixed with < for the first file and > for the second file.
Understanding diff output
$ diff privacy-prod.md privacy-dev.md
5c5
< We collect minimal personal data.
---
> We collect personal data as described below.
12a13,15
> ### Third-Party Sharing
> We may share data with trusted partners.
> See our partner list for details.
Reading this output:
5c5: Line 5 changed (c = changed)12a13,15: After line 12 in the first file, lines 13-15 were added (a = added)<shows what was removed>shows what was added
Side-by-side comparison
For easier reading, use side-by-side mode:
diff --side-by-side --width=120 privacy-prod.md privacy-dev.md
Or the shorter form:
diff -y -W 120 privacy-prod.md privacy-dev.md
Unified diff format
The unified format (used by Git) provides context around changes:
diff -u privacy-prod.md privacy-dev.md
Output looks like:
--- privacy-prod.md 2026-01-10 10:00:00
+++ privacy-dev.md 2026-01-12 14:30:00
@@ -3,7 +3,7 @@
## Data Collection
-We collect minimal personal data.
+We collect personal data as described below.
## Data Usage
Lines starting with - were removed; lines with + were added. Context lines have no prefix.
Ignoring whitespace changes
Legal documents often have formatting changes that don’t affect meaning:
# Ignore all whitespace differences
diff -w privacy-prod.md privacy-dev.md
# Ignore blank lines
diff -B privacy-prod.md privacy-dev.md
# Ignore case differences
diff -i privacy-prod.md privacy-dev.md
Creating a patch file
For auditing purposes, save the differences to a file:
diff -u privacy-prod.md privacy-dev.md > privacy-changes.patch
This patch file documents exactly what changed and can be reviewed, emailed, or archived.
Practical workflow for legal documents
-
Keep versioned copies: Store each published version with a date suffix
legal/ ├── privacy-2025-06-01.md ├── privacy-2025-12-15.md └── privacy-2026-01-12.md -
Compare before publishing: Always diff the current live version against your proposed changes
diff -u privacy-2025-12-15.md privacy-2026-01-12.md > proposed-changes.patch -
Review with legal counsel: Send the patch file for approval—it shows exactly what changed
-
Archive the diff: Keep the patch file as documentation of what changed and when
GUI alternatives
If command-line diff feels cumbersome, consider:
- Our Document Diff Tool: Free browser-based comparison—no software to install
- VS Code: Open both files and use “Compare Active File With…” from the command palette
- Meld: Visual diff tool for Linux/macOS (
brew install meld) - Beyond Compare: Commercial tool with excellent merge capabilities
- GitHub: Upload both versions and use the compare feature
Verifying no changes occurred
Sometimes you need to confirm two files are identical:
diff -q file1.md file2.md
If the files are identical, there’s no output. If they differ, you’ll see:
Files file1.md and file2.md differ
This is useful when verifying a migration or copy operation preserved the exact content.
Looking for expert guidance? Schedule a free consult:
Book a Free Consultation