7. Fixing Common Post-Migration Issues (Redirect Loops, Login Problems, Missing Data)
After completing the migration steps above, try loading the site on the new server (either via the actual domain if you’ve switched DNS, or via a temporary URL or hosts file trick). It’s common to encounter a few issues at first. Don’t panic – we’ll troubleshoot some frequent post-migration problems:
Login Redirect Loop / Cannot Access WP-Admin: You attempt to log in at
/wp-adminon the new site, but keep getting redirected back to the login page without any error, or sent to the old site’s login. This could be due to cookies from the old site or a misconfiguration. First, clear your browser cache and cookies for the site – outdated authentication cookies can cause a loop. If that doesn’t help, ensure the siteurl/home values are correct (as covered above). A mismatch (e.g., WordPress thinks it’s at oldsite.com but you’re visiting newsite.com) will cause an infinite redirect back and forth. Another cause might be a .htaccess or plugin force redirect (see below). If you still can’t log in, you can try temporarily disabling plugins by renaming thewp-content/pluginsfolder toplugins.old(via FTP) – a faulty plugin could be interfering with login. Also, double-check the$table_prefixas mentioned; if WordPress can’t find the users table due to a prefix issue, it might behave as if no user is logged in (redirecting to login).“Error: Too Many Redirects” or Redirect Loop on Front-end: If visiting the site yields a “too many redirects” error or it continually bounces between URLs, there might be an HTTP/HTTPS mix-up or a domain confusion. For example, if the new site is on HTTPS but the database URLs were set to HTTP, you could get a redirect loop between the two. Ensure the site URL uses the correct protocol (if the new host has SSL, use https in siteurl). Also check for any hard-coded redirects: in
.htaccessor in your theme’s functions, or a plugin like Really Simple SSL or security plugins that enforce SSL or a specific domain. A quick troubleshooting step is to temporarily rename the.htaccessfile (to.htaccess.bak) and see if the site loads (WordPress will regenerate a basic one for pretty links when you save Permalinks). If it loads after removing .htaccess, then something in that file (like a redirect rule) was the culprit – you may need to tweak those rules for the new environment.Permalinks Broken (404s on posts/pages): If your pages are showing but all post links give 404 errors, the permalink structure might need refreshing. This can happen if the
.htaccessrules didn’t transfer or on certain server configurations. Go to Settings -> Permalinks in WP Admin and simply click Save Changes (you don’t have to alter anything). This forces WordPress to regenerate the rewrite rules (inserting them into .htaccess on Apache or into the web server config on Nginx via the Plesk integration). If you can’t access WP Admin, you might need to manually ensure the.htaccesscontains the default WordPress rewrite rules for your permalink structure.Missing Images or Broken Links: If some images are not appearing, first check their URLs (inspect the image element in browser dev tools). If they still point to the old domain, then the search-replace might have missed something (or you skipped it because the domain was same). Running the Better Search Replace plugin to fix those URLs should solve it. If the URLs are correct but images are 404, verify that the image files indeed exist in
wp-content/uploadson the new server. Perhaps some files didn’t get uploaded or permissions are off. You can compare file counts or specific media library items between old and new. Also, check file permissions: on Linux servers, typically directories should be 755 and files 644. If file permissions or ownership are wrong, the webserver might not serve the files, causing 403/404 errors. Adjust via FTP or control panel if needed.White Screen or PHP Errors: If parts of the site show a blank white screen (the “White Screen of Death”), or error messages like “Fatal error”, something may have gone wrong with a plugin or theme on the new environment. This can happen if the PHP version is different and a plugin is incompatible, or if a module like PHP GD isn’t installed (for an image-related plugin), etc. Check the PHP error logs or enable WP_DEBUG (see next section) to get details of the error. A common fatal error after migration is related to a PHP memory limit exhaustion, which we’ll discuss below.
Database Connection Error: If you see the WordPress “Error establishing a database connection” message on the new site, double-check the
wp-config.phpsettings. It means WordPress cannot connect to the MySQL database. Possible causes: the DB name, user, or password is wrong (typo or forgotten update), or the DB host is incorrect (not localhost on that host), or the DB user doesn’t have access to that DB. Correct those values and ensure the MySQL user has privileges on the database. Also verify MySQL is running on the server.WordPress Asking to Reinstall/Install.php redirect: If you are unexpectedly getting the WordPress install screen on the new site, it means WordPress thinks no tables exist with the required data. As mentioned, this is often a table prefix issue or the database import failed. Ensure the tables are present and the
wp-config.phpprefix matches. One user reported that having an uppercase letter in the table prefix caused issues when migrating to a case-sensitive system. Renaming tables or adjusting prefix resolved it. In summary, if you see an install prompt, do not proceed with installation – instead, re-check your migration steps because the data is likely already there, just not recognized by WP.
Many of these issues can be resolved by retracing steps (fixing a config value or running the search-replace). If you run into an issue not covered above, the next step is to turn on debugging to get more insight.
Discover more from TechBooky
Subscribe to get the latest posts sent to your email.







