Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk4 min

WordPress Migration: Fix Broken Images, Links, and URLs

A safe WordPress migration moves files and database together, updates URLs without damaging serialized data, checks rewrite rules, and tests key pages before the old site is retired.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A WordPress move can break images, links, styling, or page URLs because a working site is more than its visible content: it depends on both files and a database, plus settings and server rules that must match the destination. The safest approach is to back up both parts, identify what is changing, migrate them together, update URLs with a serialization-aware method, and test the new site before retiring the old one.

What has to move with a WordPress site?

A typical WordPress site has two essential parts: its files and its database. WordPress describes both as necessary to back up a site. The backup handbook distinguishes the two: files include core software, themes, plugins, uploads, and configuration; the database holds posts and other site data. A copy of the directory alone usually does not include the separately stored database.

As an Amazon Associate I earn from qualifying purchases.

Keep the database export and the corresponding files together as one backup set. If one is missing, the destination may lack content or the files and configuration needed to present it as expected. Include the relevant WordPress directory, including wp-content and wp-config.php, as well as .htaccess if the installation uses it. Preserve the original site until you have checked the destination.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why do WordPress moves break?

Old URLs remain in content and settings

Changing the site’s domain or installation path does not automatically rewrite every reference stored by the site. Old addresses can remain in the database or in manually written theme files, leaving links or theme displays pointing to the previous location. The WordPress migration handbook explains the relevant URL settings and migration issues.

A blunt replacement can damage serialized data

Some themes and widgets store PHP serialized values that include the length of each string. A plain text replacement can change a URL without updating its recorded length, making the value unreadable. WordPress warns: “If you do a search and replace on your entire database to change the URLs, you can cause issues with data serialization, due to the fact that some themes and widgets store values with the length of your URL marked.”

Use a serialization-aware replacement method rather than a blind database-wide text replacement. WP-CLI’s wp search-replace handles PHP serialized data and offers --dry-run to preview changes without saving them. Review the command’s target scope before running it.

Pretty permalinks need server rewrite support

Pretty permalinks depend on server rewrite configuration. Moving to a different server or directory can leave the destination unable to handle the selected URL structure, even after the database imports correctly. WordPress’s permalink documentation describes the role of permalinks and notes the server configuration requirement. Its migration guidance calls for disabling and reconfiguring rewrite rules when taking a move live if permalinks were in use.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Which addresses and parts of the move should you check?

Distinguish WordPress Address from Site Address

The WordPress Address identifies where the WordPress core files are located. The Site Address is the public-facing address visitors use. They can differ when WordPress is installed in its own directory, so do not assume both should always be identical. Set each to match the intended destination and installation layout.

Identify what is changing

The correct work depends on whether you are changing the domain, moving WordPress into or out of a directory, changing servers while keeping the same public URL, or moving a Multisite network. A server move without a URL change may not require the same URL replacements as a domain change; a directory change may affect both paths and rewrite behavior.

Multisite needs particular care: WordPress says its single-install URL instructions do not apply to Multisite as written. WP-CLI search-replace targets the current site by default; network-wide operation requires explicitly requesting network scope with --network.

How to move a WordPress site without breaking it

  1. Inventory the move. Record whether the domain, directory, server, database name or user, or Multisite network is changing. Identify the intended public URL and where the core files will live.
  2. Make a complete backup set. Export the database and download the relevant WordPress files. Keep both together, and retain access to the original site so you can recover if the destination is incomplete.
  3. Copy files and import the database. Put the files on the destination and import the matching database export. Update the database credentials in the destination’s wp-config.php as needed for that server.
  4. Set the destination addresses. Align WordPress Address and Site Address with the planned core-file location and public-facing URL. Account for an installation in a subdirectory rather than assuming the values must match.
  5. Replace old URLs safely when needed. Use a serialization-aware method. With WP-CLI, confirm the source and destination strings and the site or network scope; use --dry-run to preview before committing changes. The command documentation also describes exporting transformed data to an SQL file.
  6. Verify rewrite behavior. Check the permalink structure and destination server configuration. If pretty permalinks were used, reconfigure rewrite rules as required for the new environment.
  7. Test before retiring the old site. Visit the homepage, representative posts and pages, category and tag archives, media files, and the login and admin areas. Check redirects and any hard-coded theme or menu links relevant to the move.

How to diagnose common migration symptoms

  • Images are missing: Check that uploads were copied and that stored image URLs point to the new address. A files-only or database-only move can leave the site without the matching part of its backup set.
  • Posts or pages return 404 errors: Check that the destination supports the selected permalink structure and that its rewrite rules are configured for the new server or directory.
  • The site loads with the wrong address or links still point to the old site: Check both WordPress Address and Site Address, then look for old references in database content or manually written theme files.
  • A theme or widget breaks after URL replacement: A plain replacement may have corrupted serialized values. Restore the matched backup set if necessary and repeat with a serialization-aware method.
  • The move is Multisite: Stop before applying single-install instructions or a current-site-only search-replace to the whole network. Confirm the intended site or network scope first.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.