Don’t panic if your WordPress page is white after migration. Follow this step by step guide to find and fix the issue. Work through each step and test your site after each fix.
1. Check Error Logs with WP_DEBUG
WordPress hides most errors by default so you only see a blank screen. To find out what’s wrong:
- Open your wp-config.php file.
- Add or modify these lines:
define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_LOG’, true);
define(‘WP_DEBUG_DISPLAY’, false);
Now reload your site. Errors will be logged in /wp-content/debug.log. This will usually point to the exact plugin, theme, or function causing the issue.
2. Increase the PHP Memory Limit
A common cause of WSOD is insufficient memory. To increase it:
Edit wp-config.php and add:
define(‘WP_MEMORY_LIMIT’, ‘256M’);
Or adjust the memory limit in php.ini or .htaccess.
If increasing memory resolves the issue, consider optimizing heavy plugins or upgrading your hosting plan.
3. Verify Database Credentials in wp-config.php
After migration, your new host may use different database names, users, or passwords. Open wp-config.php and confirm:
define(‘DB_NAME’, ‘new_db_name’);
define(‘DB_USER’, ‘new_db_user’);
define(‘DB_PASSWORD’, ‘new_db_pass’);
define(‘DB_HOST’, ‘localhost’);
Even a small typo here can result in a white screen.
4. Update Domain References in the Database
If your site is still trying to load assets from the old domain, it can break the site. To fix:
Use WP-CLI:
wp search-replace ‘oldsite.com’ ‘newsite.com’
- Or install the Better Search Replace plugin to update URLs in the database.
5. Disable All Plugins
Plugins are often the culprit. To check:
- Rename the wp-content/plugins folder to plugins_old.
- Reload your site. If it works, a plugin is causing the issue.
- Rename the folder back, then reactivate plugins one by one until the faulty one is identified.
6. Switch to a Default Theme
If the issue isn’t a plugin, it may be your theme. To test:
- Rename your current theme folder in wp-content/themes.
- WordPress will fall back to the default theme (e.g., Twenty Twenty-Four).
- If the site loads, the theme is incompatible or missing files.
7. Check .htaccess File and Regenerate Permalinks
A corrupted .htaccess can cause WSOD.
- Rename .htaccess to .htaccess_old.
- Go to WordPress Dashboard → Settings → Permalinks → Save Changes to regenerate a fresh one.
8. Fix File Permissions and Ownership
Wrong file permissions can prevent WordPress from loading. Recommended settings:
- Files: 644
- Folders: 755
- wp-config.php: 600
You can reset permissions via FTP or SSH:
find /var/www/html -type d -exec chmod 755 {} \;
find /var/www/html -type f -exec chmod 644 {} \;
By following these steps in order you will usually find and fix the reason your WordPress site is white after migration.
Leave a Reply