WordPress Hosting Migration Troubleshooting Runbook for Common Errors
Migrating a WordPress site to new hosting can empower your website with faster performance, enhanced security, and better scalability—but only if you avoid the frequent pitfalls that come with the process. Even straightforward WordPress projects can wind up offline or broken due to overlooked details. This troubleshooting runbook gives you targeted solutions for the most common migration errors, so you can transition without data loss, downtime, or user frustration.
Introduction: Why WordPress Hosting Migration Goes Wrong
Every WordPress site accumulates complexity: custom plugins, media files, user data, and theme tweaks. When you move all these parts from an old server to a new host, mismatches in configuration often cause failures. “Error establishing database connection,” missing images, broken links, or even the dreaded blank white screen can all happen during a move. Fortunately, most issues relate to just a handful of missteps—and every one has a clear fix.
This guide is practical: it covers the exact troubleshooting checks, step-by-step, so you spend less time panicking and more time bringing your new site online. As you follow this runbook, you’ll reduce operational risk, support your SEO migration, and restore your users’ experience faster.
Understanding the Typical Hosting Migration Workflow
To start, it’s critical to follow a logical workflow during a WordPress hosting migration. Each step relies on the previous one being error-free. Here’s how the ideal process unfolds:
- Back up everything. Take a full site and database backup on the old host. Store copies offsite.
- Transfer files. Use a reliable method (like SFTP or SCP) to move all site files, especially everything in the
wp-contentfolder and yourwp-config.phpfile. - Export and import your database. Tools like phpMyAdmin, WP-CLI, or direct SQL export/import are common. Check for errors after import.
- Update configuration. Adjust database credentials in
wp-config.phpto match the new environment. - Check and update URLs. If the domain, subdomain, or directory path changes, update all hardcoded URLs and internal references in your database.
- Test and debug. Preview the migrated site on a temporary URL or host’s preview environment before updating DNS.
Careful adherence to each stage helps to isolate failure points early. Problems in one link of the chain often lead to visible errors later.
Frequent Migration Errors and How to Fix Them
A handful of issues cause the majority of WordPress migration headaches. Here’s how to systematically diagnose—and resolve—them.
1. Error Establishing Database Connection
By far the most frequent, this error means WordPress cannot log into the new database.
Troubleshooting steps:
- Double-check
wp-config.php. AreDB_NAME,DB_USER,DB_PASSWORD, andDB_HOSTcorrect for the new server? - Confirm the database user privileges. Some hosts require you to add the user to the migrated database manually.
- Check if the DB host value should be
localhostor an IP/hostname provided by your new company. - Test logging in to the database directly (via phpMyAdmin or command line) using the credentials.
- Seek error logs during the process, as detailed messages often clarify the issue.
If none of these resolve the error, attempt to re-import your database, ensuring your SQL file is uncorrupted.
2. Missing or Broken Media and Plugin Files
After migration, sometimes images, plugins, or theme assets are missing or fail to load.
Solutions:
- Verify the entire
wp-content/uploadsandwp-content/pluginsdirectories transferred completely. If you used FTP, re-download the local backup and confirm against the source. - Set correct file permissions—folders usually need to be 755, files 644. Permissions errors cause images to break even if files exist.
- Avoid partial upload errors by using SCP or rsync, which verify file integrity.
- Reupload any missing files from backup.
- Note: Large media folders are a common point of failure. Ensure no files are skipped during transfer.
3. White Screen of Death (WSOD) After Migration
A completely blank page signals underlying PHP errors.
How to recover:
- Enable debugging by setting
define( 'WP_DEBUG', true );inwp-config.php. - Review
error_logfiles on your new server—look for plugin, theme, or memory errors. - Temporarily increase memory & execution time limits in
php.inior.htaccess. - Rename
wp-content/pluginstoplugins_oldto disable all plugins and quickly confirm if the problem is a plugin conflict. - Restore your own theme step-by-step, starting from a default theme (like
twentytwentyfour).
Permanent white screens usually indicate plugin/theme incompatibility or corrupted files—methodically disabling components isolates the issue.
4. Permalinks and URL Issues
Classic symptoms include suddenly broken post links (404s) or infinite redirect loops, usually due to permalink structure mismatches or internal URLs still pointing to the old environment.
How to fix:
- In your new WordPress dashboard, go to Settings > Permalinks and click “Save Changes” to flush rewrite rules.
- Search/replace old URLs in the database with the new domain using WP-CLI
search-replaceor a reputable plugin. Check all options before running—back up the DB first! - Review
.htaccessfor old redirect rules that might conflict with the new host’s configuration. - If you changed protocols (HTTP to HTTPS), update your
siteurlandhomevalues in the database.
5. Import/Export Database Errors
Database exports can fail due to file size, incompatible character sets, or server timeouts.
Best practices and troubleshooting:
- Use command-line
mysqldumpandmysqlwhen possible—they are more robust than browser-based tools. - For phpMyAdmin, export/import in smaller chunks if possible.
- Match database character sets and collations between old and new hosts.
- If the SQL file appears truncated or imports with errors, re-export and re-import.
- Watch for error messages about “table already exists” or “duplicate keys”—these suggest incomplete or repeated import attempts.
Best Practices: Prevent Migration Issues Before They Start
Careful preparation is the best route to a hassle-free migration. Here are essential steps to build into your workflow:
1. Test in a staging environment first. Many hosts allow you to deploy a clone—use it as a dress rehearsal for the actual migration. Testing reduces surprises.
2. Document everything. Keep a notepad with user credentials, database host names, and plugin/theme version info handy during the process.
3. Use SFTP/SSH instead of plain FTP. Old FTP connections can lose files or set incorrect permissions. SFTP and SCP are more reliable for bulk transfers.
4. Backup and version your files. Store backups remotely (not just on your computer or server) and verify their integrity before you begin.
5. Communicate downtime. Let stakeholders or users know about migration timelines, preferably choosing low-traffic windows to perform the move.
When site stakes are high, these checks are justified. See our full hosting hub for deeper guides on WordPress site operations and technical migrations.
Securing the Site During and After Migration
Security lapses are common when sites move between environments. Don’t let a successful migration create new vulnerabilities.
- Review
.htaccessorweb.configfiles—stray allow/deny rules can disable critical features or expose admin paths. - If moving to a new domain or protocol, re-issue SSL certificates and verify forced HTTPS is implemented in both application and server layer.
- Remove migration or backup plugins when done; unused plugins can be exploited if forgotten.
- Change any hardcoded credentials before or immediately after migration.
- Confirm file permissions on sensitive directories (e.g.,
/wp-config.php) are set to 600 or as secure as your host allows. - Keep core, plugin, and theme versions up-to-date—delays after migration are a major source of zero-day attacks.
For further reading on safe WordPress operations, our best WordPress hosting for small sites guide includes actionable security checks recommended after any major upgrade or migration.
Handling Failed Migrations and Rollbacks
No matter how prepared you are, migrations can sometimes fail in ways that require a quick rollback.
- Retain a full backup of site files and SQL before cutting over DNS. Keep this backup easily restorable on the old host.
- Use hosting provider snapshot or instant restore functions when possible—these let you undo any changes with a click.
- If new errors appear after migration, don’t hesitate to point DNS back to the original environment until resolved.
- Communicate transparently with internal teams or end-users about the downtime and the steps being taken.
- Keep records of changes made during the move—it helps hosts or developers when debugging less obvious issues.
Even advanced operators encounter migration mishaps, but the ability to swiftly roll back and recover lowers your risks considerably.
When to Ask Hosting Support for Help
Some issues during migration are only fixable by your hosting provider. The most common examples include:
- Server-level outages (downed MySQL service, file system errors)
- Custom caching or firewall rules blocking migration scripts
- Locked permissions you can’t change
Contact your host’s support with clear documentation, error logs, and step-by-step troubleshooting already performed. Many hosts publish stepwise guides and will review your process or even perform guided migrations on request. For complex needs, check out our what managed WordPress hosting means explainer to understand what your host can offer beyond self-service support.
Related Reads for Smoother WordPress Operations
- Explore our hosting hub for migration planning, upgrading, and troubleshooting best practices.
- For comparing top hosting platforms post-migration, consult our best WordPress hosting for small sites review.
- Dive into what managed WordPress hosting means to learn how managed providers handle migration steps for you.
Conclusion: Keep Your WordPress Migration Smooth, Stable, and Secure
WordPress hosting migration doesn’t have to mean downtime or lost content. Most errors—whether database failures, missing media files, or permissions glitches—result from minor missteps during preparation or transfer. With this troubleshooting runbook, you can approach migration methodically: test on staging, verify every file and credential, secure your endpoints, and have backups ready for rollback.
For more in-depth hosting guides and proven operator workflows, browse our hosting hub. Structured planning and systematic troubleshooting will minimize headaches and keep your WordPress site live, secure, and ready for growth.
FAQ
What causes the “Error Establishing Database Connection” during migration?
This error usually means the database credentials in wp-config.php don’t match the new hosting environment or the database server is inaccessible. Confirm database name, user, password, and host values carefully. Also, verify that the database host is correct, as some providers require a hostname other than localhost.
How can I fix broken image links after migrating WordPress?
Broken images usually originate from incomplete file transfers or lingering references to the old URLs. Verify your wp-content/uploads folder copied fully, ensure permissions are correct, and run a search-replace for old domain names in the database using WP-CLI or a plugin designed for the task. Always back up before making any changes to URLs in your database.
Should I do a manual migration or use a migration plugin?
Manual migrations provide more transparency and control, letting you verify each step, but they require technical comfort and more time. Migration plugins (such as Duplicator or All-in-One WP Migration) can simplify and automate many steps, though very large or complex sites sometimes run into timeouts or compatibility issues. Your choice depends on the size, complexity, and how much oversight you want during the process.
