Last updated: November 26, 2026

Quick answer: update internal links and old URLs after moving an auto blog in 5 steps — back up the site, find the old domain, run a database-aware search and replace, check internal links and images, then test a few posts. If the move was from one WordPress site to another, this cleanup is what turns imported posts into usable pages instead of a maze of broken clicks. This guide covers how to update internal links and old URLs after moving an auto blog without missing the database fields that still point to the old site.

Key takeaways

  • Old links usually survive a migration because WordPress stores full URLs inside posts, widgets, menus, and some custom fields.
  • A backup before a database-level search and replace is the safest practical starting point.
  • Absolute URLs are the main problem; relative links are less likely to break when the domain changes.
  • Images, attachment pages, and old domain references often need the same pass as post links.
  • A careful check after the replace saves time because one missed pattern can affect hundreds of posts.

Why do old URLs survive a WordPress move?

Old URLs survive because WordPress stores them as plain text in the database, not as live pointers that update on their own. That means a post can still contain https://oldsite.com/... in body text, image links, menus, and some builder fields even after the site is moved.

This happens most often with absolute URLs. An absolute URL includes the full domain name, so it keeps pointing to the old address until you replace it. A relative URL, such as /category/sample/, can survive the move more easily because it does not hard-code the domain.

The same issue shows up in several places at once: posts, excerpts, custom fields, navigation menus, widgets, and attachment URLs. A one-off edit in the block editor can fix one post, but it will not clean the rest of the database. That is why a migration cleanup needs a broader pass.

WordPress itself documents changing URLs after a move, and the WordPress.org support pages are a good starting point for the basic idea. The WP-CLI search-replace command is another standard tool for this job, especially when the database is large. See the WordPress documentation on moving WordPress and the WP-CLI docs for search-replace here:
https://wordpress.org/documentation/article/moving-wordpress/
https://developer.wordpress.org/cli/commands/search-replace/

How do I find old URLs after migration?

You find old URLs by checking the database, the content editor, and the places WordPress stores text outside the main post body. A quick browser search for the old domain catches some problems, but it misses the deeper ones in custom fields and serialized data.

Start with the obvious places first: post content, menus, widgets, and any theme or page builder fields that hold URLs. Then check attachment links, because image files often keep the old domain in their source path after migration. If the site is an auto blog with many imported posts, expect the same old domain to repeat across hundreds of entries.

A practical search list helps. Look for:

  • the old domain name
  • the old http:// version
  • the old https:// version
  • any staging or subfolder path that was used during the move

One useful habit is to search for the domain in the database before you change anything. That gives you a map of where the old URLs live. If the domain appears in post content only, the cleanup is simpler. If it appears in widgets, custom fields, and options tables, the fix needs more care.

Do not rely on a visual scan of the homepage alone. A home page can look fine while older posts still point to the wrong place. The broken links often hide in archive pages, author bios, embedded images, and linked product names. That is why a database-level search matters more than a front-end click test.

How do I update WordPress URLs safely?

You update WordPress URLs safely by backing up first, then replacing the old domain with the new one in a tool that understands the database. A direct edit in phpMyAdmin can work, but it is risky if a field stores data in a serialized format.

A staged cleanup usually works best:

  1. Back up the database and files.
    Save a copy before any replace work starts. If something breaks, you need a clean rollback, not guesswork.

  2. List the old domain patterns.
    Write down the exact old URL forms, such as http://oldsite.com and https://oldsite.com. This matters because the same site can hold both versions.

  3. Use a search and replace tool that respects WordPress data.
    WP-CLI search-replace is built for database changes and is the standard choice when command line access is available. It can handle the content at scale better than manual editing.

  4. Run a dry check before committing changes.
    A preview or dry run shows what would change without writing to the database. That cuts the chance of replacing the wrong string across the whole site.

  5. Replace the old domain with the new one.
    Change the old URL everywhere it appears in post content, custom fields, widget text, and options. The result should be links that point to the new site instead of the old one.

  6. Open a few migrated posts and test the links.
    Click internal links, image links, and category links in more than one post type. The goal is to catch patterns, not one isolated page.

A search and replace tool is better than hand editing when the site has more than a small handful of posts. Hand edits are fine for one broken link in one post, but they do not scale when the old domain appears 300 times across imported content. The trade-off is clear: automated replace work is faster, but a mistake can affect the whole database, so the backup is not optional.

The links that need special attention are absolute URLs, image links, and anything stored outside standard post content. These are the links most likely to keep the old domain after a move.

The main trouble spots are:

  • internal links in post bodies
  • image src links
  • attachment page URLs
  • menu links
  • widget links
  • custom fields
  • theme settings and builder fields

Absolute URLs are the biggest risk because they lock in the full domain. If a post links to https://oldsite.com/category/news/, that link will not heal itself. The same goes for images that were inserted with the full old domain in the source path.

Attachment URLs deserve a separate check. A post can display the image fine in the editor while the attachment page or image file still points back to the old site. That creates a half-fixed result: the post looks normal at a glance, but readers and crawlers still hit old addresses.

This is also where mixed content can show up. If the new site uses HTTPS but some old image or script links still use HTTP from the previous domain, browsers may block or warn about those assets. That problem is not limited to one post type, and it often survives a basic text replace if the old and new URL patterns were not both included.

Do not chase only visible links in the post body. A generic cleanup that skips widgets or custom fields leaves the site in a half-migrated state. The page may seem fixed until a reader clicks a sidebar link or an image thumbnail and lands on the old domain again.

What is the safest way to replace URLs in WordPress?

The safest practical way to replace URLs in WordPress is to use a database-aware tool, test the patterns on a small set first, and keep a backup ready. A plain text search can miss serialized data, while a careless global replace can damage fields that WordPress stores in a structured format.

Here is the trade-off in plain terms:

Method Good for Risk Best use case
Manual editor fixes One or two broken posts Slow and easy to miss hidden links Tiny cleanup jobs
Database search and replace Many posts and fields Can touch the wrong string if the pattern is too broad Full domain swaps
Partial browser edits Visible content only Misses widgets, options, and custom fields Spot fixes after the main pass
Comparison table of What is the safest way to replace URLs in WordPress?
Comparison table: What is the safest way to replace URLs in WordPress?

A safe replace plan is simple:

  • match the full old domain, not a vague fragment
  • check both http and https
  • avoid replacing a short word that might appear in normal content
  • review the changed URLs after the run
  • keep the backup until the site is stable

This is why the search pattern matters as much as the tool. Replacing oldsite everywhere can hit text that is not a URL at all, while replacing the exact domain is narrower and safer. A careful replace is slower than a blind one, but it keeps the site from losing links that never should have changed.

WP-CLI is the most reliable public tool to point readers to because it is designed for WordPress database work and has a dedicated search-replace command. For many sites, that is the cleanest path from old URLs to new ones.

You check broken internal links after the move by sampling posts, archives, and media pages, then clicking the links that should stay on the new site. A migration can look finished while old links still hide in older posts, so the check has to go beyond the homepage.

Use a short review list:

  • open several recent posts and several old ones
  • click category and tag links
  • open image thumbnails and attachment pages
  • check sidebar links and footer links
  • compare the visible link target with the new domain

If the site is an auto blog, pay extra attention to posts that were imported in bulk. Auto blogs often reuse the same template text, which means one old URL can repeat in many posts. A single missed pattern can create dozens of broken clicks.

A crawler or link checker can help, but it should not replace a manual review. Automated checks are useful for volume, yet they can miss links hidden behind script-generated content or links that only appear in certain archives. A human click test catches the kind of errors that a scanner may skip.

This is the point where a generic “change the domain and move on” answer falls short. The move is not finished when the database edit is done. It is finished when internal links, old URLs, and attachment paths actually land on the new site without sending readers back to the old one.

If this cleanup is part of a larger move from one WordPress site to another, the hub guide for that process belongs alongside this page, but this post stays focused on the URL cleanup step.

How do I find old URLs after migration?

Search the old domain in the database, not only in the browser. That is the fastest way to catch URLs stored in posts, widgets, custom fields, and attachment data.

A visual scan of a few pages can miss the real problem because the broken links may live in older posts or hidden fields. Start with the old http and https versions, then check menus and image paths.

What is the safest way to replace URLs in WordPress?

Use a database-aware search and replace tool, with a backup in place before you change anything. WP-CLI search-replace is a standard option because it is built for WordPress database work.

The risky part is not the idea of replacing URLs; it is replacing the wrong string or skipping serialized data. A careful pattern, a dry check, and a backup reduce that risk.

Why are some internal links still pointing to the old site?

Some internal links still point to the old site because they were stored as absolute URLs and were never updated in every database field. Posts are only one part of the problem.

Menus, widgets, custom fields, and attachment URLs can keep the old domain even when the main content looks fine. That is why one quick edit in the post editor is not enough for a full migration cleanup.

Drafted with AI; not yet reviewed by a person.