
You’ve migrated your WordPress site: new domain, new host, maybe HTTP to HTTPS. Everything looks fine. Then you start clicking. Images are missing. Buttons go nowhere. Your internal links are a maze of 404 errors.
This happens because WordPress stores full URLs in posts, menus, widgets, custom fields, and pageStatic content (e.g., "About Us," "Contact") not part of chr... More builders. When you move, those hardcoded links don’t update automatically, while coreCore The foundational files and code of WordPress itself, ma... More settings like Site URL and permalinks usually survive, everything else can break.
The good news? You don’t have to fix them manually. Here’s how.
Method 1: Screaming Frog (Best for large sites) – Free for up to 500 URLs. Crawls your entire site and shows every 404.
Method 2: Online Broken Link Checkers – Tools like Dr. Link Check or W3C Link Checker. Quick but less thorough.
Method 3: Google Search Console – Go to Coverage → Errors → 404. Shows what Google found.
Quick manual check: After migration, click around your main pages, blog posts, shop, and menus. Note any 404s.
WordPress serializes data (stores string lengths). A raw search/replace will corrupt your databaseWhere all WordPress content, settings, and user data are sto... More.
Option 1: Better Search Replace (free pluginSoftware that adds specific features or functionality to a W... More)
http://oldsite.comhttps://newsite.comOption 2: WP CLI (for developers)
wp search-replace 'http://oldsite.com' 'https://newsite.com' --all-tables
Option 3: Migrate DB Pro or WP Migrate (paid) – Handles serialization perfectly. Great for complex migrations.
Some links won’t be caught by bulk search/replace:
Navigation menus: Go to Appearance → Menus. Check each custom link. Update manually.
Widgets: Appearance → Widgets. Open each widgetA small block that adds specific content/functionality to wi... More (especially Text and Custom HTMLHTML (HyperText Markup Language) The standard markup languag... More). Update URLs.
PageStatic content (e.g., "About Us," "Contact") not part of chr... More builder content: Open each pageStatic content (e.g., "About Us," "Contact") not part of chr... More in Elementor, Beaver Builder, or WPBakery. Resave the pageStatic content (e.g., "About Us," "Contact") not part of chr... More — many builders rewrite URLs on resave.
Hardcoded themeTheme A collection of files that determine a site's design, ... More files: Search your themeTheme A collection of files that determine a site's design, ... More folder for oldsite.com. Update manually or via your IDE’s “Find in Files.”
Block editorA user role allowed to create, edit, publish, and delete pos... More links: Open affected posts. Click on linked blocks. Update the URL in the block settings.
WordPress stores some data as “serialized”, it includes the string length. If you do a raw search/replace, changing the URL length corrupts the data.
Tools like Better Search Replace and WP CLI handle this automatically. Never use phpMyAdmin’s raw search/replace unless you absolutely know what you’re doing.
For your next migration:
/contact/ instead of https://site.com/contact/Broken internal links after a migration are normal. They’re fixable. The key is using the right tool, one that respects serialized data.
Remember the golden rules:
Fix your links once, correctly, and your migrated site will run better than the original.