rawatweb

WordPress Broken After Moving Hosts: 7 Checks to Run

Wordpress broken after moving hosts: site broken after a hosting move? Check site URLs, serialized data, permalinks, file ownership, PHP version.

Editorial illustration of a WordPress site moving between servers with a migration path and inspection markers.

Wordpress broken after moving hosts: the files are usually intact, the addresses are not.

The site has been moved to a new host. Files uploaded, database imported, DNS pointed. Then the result: the homepage loads without images, menu links go to the old domain, the admin area will not open, or the whole site returns an error.

Migration is one of the riskiest jobs in WordPress management because many things must line up at once: files, database, server configuration, DNS, certificates, email, and cache. If a single piece does not match, the symptom can look like a major break—when usually it is a handful of values that need correcting.

Short answer: check siteurl and home first, then URLs inside post content, then permalinks, file ownership, PHP version, and mail. Change one layer at a time and test after each. Before touching anything, make sure you still hold a restorable copy of the old database.

A check order that saves time

A messy migration is rarely one big problem; it is several small ones hiding each other. This order separates them:

  1. Basic access. Does the site load? Does /wp-admin respond?
  2. Site address. Do siteurl and home point at the right domain?
  3. URLs inside content. Do images and links still reference the old domain?
  4. Permalinks. Do inner pages load, or does everything return 404?
  5. File ownership and permissions. Can WordPress write to uploads?
  6. PHP version and extensions. Do they match the theme and plugin requirements?
  7. Mail and cron. Are notifications delivered and scheduled tasks running?

Working in order gives every symptom a clear cause. Jumping to step 6 while step 2 is still wrong only adds variables.

Wordpress broken after moving hosts: Site address — the two values that break most often

WordPress stores its address in two wp_options rows: siteurl (where the installation lives) and home (the public address). If both still point at the old domain, many things fail together: admin redirects to the old site, images use the old URL, and forms post to the wrong place.

To inspect without the admin: open phpMyAdmin, find wp_options, and look at siteurl and home. If they are wrong, fix them one of three ways.

Through the hosting panel, if it exposes WordPress settings—safest because it does not touch the database directly.

Through WP-CLI, if SSH is available:

wp option update siteurl 'https://newdomain.com'
wp option update home 'https://newdomain.com'

Through phpMyAdmin, editing those two rows. This is the last resort, and only after a backup.

Once both values are correct, reload the site in an incognito window. If it still redirects to the old domain, a redirect rule in .htaccess or the server config probably still names the old host.

Wordpress broken after moving hosts: URLs inside content — why a plain find-and-replace is dangerous

After the site address is correct, the next problem is usually images and internal links still carrying the old URL. If you simply replace text in a .sql file or a text editor, you risk corrupting serialized data.

WordPress stores many settings as PHP-serialized data, whose format records string lengths. Replacing http://old.com (16 characters) with https://new.com (17 characters) without updating the recorded length makes that data unreadable—and the symptoms look strange: widgets disappear, the theme resets to default, or plugin settings come back empty.

Safe approaches:

  • WP-CLI wp search-replace handles serialization correctly, and can be dry-run first.
  • A migration-specific plugin that understands serialized data.
  • Avoid editing a SQL dump directly in a plain text editor.

Always run the simulation first, count how many rows would change, then execute after a backup. If the simulation reports a surprising number—tens of thousands of rows—check whether your pattern is too broad.

If the homepage loads but every other page returns 404, the cause is almost always rewrite rules. After a migration they are often stale, or the new server configuration does not support them.

Quick step: open Settings → Permalinks and save without changing anything, then clear cache. That forces WordPress to rewrite the rules. Leave time to check permalinks before calling wordpress broken after moving hosts done.

If 404s persist, check the server:

  • Apache: confirm mod_rewrite is enabled and .htaccess exists and is readable.
  • Nginx: confirm try_files routes requests to index.php. This is not automatic and is frequently forgotten when leaving Apache.

A fuller walkthrough is in 404 after changing permalinks.

File ownership and permissions

Migrations often change file ownership—an archive extracted as root, or files uploaded over FTP as a different user than PHP runs as. WordPress then cannot write to wp-content/uploads, cannot install plugins, and cannot update anything.

Symptoms you will see:

  • Image uploads fail with “Could not create directory”.
  • Plugin updates ask for FTP credentials.
  • Cache cannot be written, so settings do not stick.

The correct fix: align file ownership with the PHP user on the new host, then use 755 for directories and 644 for files. Do not use 777—it opens the door to executing uploaded files. If the host does not give you ownership tools, ask them to do it. More detail is in image upload fails in WordPress.

If updates ask for FTP credentials, the usual cause is a missing FS_METHOD. Adding define('FS_METHOD', 'direct'); to wp-config.php usually resolves it, provided ownership is already correct.

PHP version and extensions

The new host may run a different PHP version. A theme and plugin set that worked on PHP 7.4 can fail outright on PHP 8.3, and older plugins may not be ready for newer releases.

Symptoms include a white screen, a 500 on specific pages, or a “Your PHP version is outdated” notice. Check under Tools → Site Health → Info → Server, or in the hosting panel.

What to align:

  • PHP version at least the minimum required by current WordPress and plugins.
  • Required extensions such as mysqli, curl, gd or imagick, mbstring, xml, and zip.
  • Memory limit and max_execution_time that are adequate.
  • Server timezone, which occasionally affects schedules.

Test after changing the PHP version. If errors appear, revert to the previous version and fix compatibility in staging first.

Mail, cron, and the things people forget

Two items rarely noticed until weeks later:

Mail. The mail() function may be restricted on the new host. Forms still look successful, but notifications never arrive. Configure SMTP and test delivery, as covered in WordPress emails not sending.

Cron. A DISABLE_WP_CRON constant may have been copied over from the old server while no server cron was created on the new one. Scheduled posts stop publishing and backups stop running. Check it as described in WP-Cron not running.

Both are quick to test and easy to forget. Put them on the migration checklist, not on a “check later” list.

Cache and DNS: where diagnosis gets confusing

Even after everything is fixed, symptoms can persist because of cache. Three layers need clearing:

  • Plugin cache—old pages rendered with old URLs.
  • Object cache—if the new host uses Redis or Memcached, stale objects may linger.
  • CDN—most often overlooked, because it still serves content from the old origin.

DNS also takes time. During propagation some visitors reach the old server and some the new one. Do not draw conclusions from a single test; wait for the TTL to expire and test from a few networks.

If you run a CDN with aggressive caching, consider disabling it temporarily during the migration, then re-enabling once the site is stable.

A checklist for before and after

Before:

  • Back up files and database, and confirm the backup restores.
  • Record WordPress, PHP, theme, and plugin versions.
  • Record key settings: permalinks, mail, cron, upload limits.
  • Save a copy of .htaccess and any other server config.
  • Check the SSL certificate expiry date.

After:

  • Test the homepage, a post, a page, and the admin.
  • Test forms, including proof that email arrives.
  • Test media uploads and plugin updates.
  • Test an online store from checkout through order email.
  • Check the sitemap and robots.txt.
  • Watch logs for the first few days.

A written checklist beats memory, especially when a migration happens late at night or is done by someone else.

When rolling back is the right call

Sometimes a migration does not go to plan and the most rational choice is to return to the old server. That is not failure; it is the correct decision when the site generates revenue.

To keep rollback possible:

  • Do not delete the old hosting account until the new site has been stable for at least a week.
  • Keep the old DNS values on record, or hold off changing them entirely.
  • Keep a backup from the old server, not only from the new one.
  • Log the change times so a rollback can be done deliberately.

A fast rollback is cheaper than hours of emergency repair on a site that is already losing orders.

Preventing the same mess next time

Future migrations get calmer with a few habits:

  1. Use staging to test the migrated result before pointing DNS.
  2. Document the old configuration—PHP version, cron, mail, server rules.
  3. Test outside peak hours, and tell the site owner.
  4. Monitor uptime and email after the move.
  5. Re-check a week later, because mail and cron issues surface late.
  6. Keep a change log so the next person does not repeat the same mistakes.

For sites with daily transactions, plan the migration together with the host and the owner rather than squeezing it in. This is part of website management, which sets a fixed procedure.

Wordpress broken after moving hosts: what matters first

After a hosting move the usual culprit is not the files but URLs stored in the database that still point at the old domain or path. Check in order: siteurl/home, URLs inside content, permalinks, file ownership, PHP version, mail, then cache. Do not change everything at once.

Frequently asked questions

Do I always need to change URLs in the database? Yes if the domain changes. If you only move servers under the same domain, content URLs stay valid, but siteurl and home still need verifying.

Why did images disappear after the migration? Usually because image URLs still point at the old domain, or the uploads folder was not copied. Check both before assuming the files are damaged.

How long does DNS take? Typically a few hours, up to 24–48 hours depending on TTL and resolver. Test from several networks before concluding it failed.

Do I need a migration plugin? Not necessarily, but a dedicated tool reduces risk with serialized data. WP-CLI search-replace is equally safe when used with a dry run.

If your migration is not going smoothly and the site is already unreachable, do not keep experimenting without a plan. Website emergency support exists for fast recovery, while a free audit can review the post-migration state so hidden issues—mail, cron, file permissions—do not pile up.

Read next: One Page Returns 500 While the Rest of the Site Works, WordPress Database Bloat: Revisions, Transients, and Autoload, WordPress 403 Forbidden Error: Find What Is Blocking You.

#hosting migration #wordpress migration #new domain #mixed content
Let's talk about your website

Does any of this look like your website?

Tell us on WhatsApp. We look first, explain what needs fixing, then you decide. For a fuller picture, request the free audit.

Chat with us