Immediately after the migration, users experienced a white screen and a “500 error.” Here’s the troubleshooting sequence based on the cause
- A blank screen does not indicate the cause.
- The reason why problems only occur immediately after a change.
- There is a specific order for the fastest inspection process.
- Dividing the migration scope using LUX Content Migration.
- Start by addressing the issue indicated by the log.
- If you have changed your address previously, the last thing you will see is this.
- Common pitfalls when attempting to resolve issues directly.
- Frequently Asked Questions.
- WordPress-related links
I pressed the migration button and opened a new website, but the screen is completely white. If refreshing the page doesn’t fix it, the first thought that comes to mind is: “Did I corrupt the file?”
However, a blank screen and a “500 error” are not the culprit; they are more likely related to the footprints left at the scene. Simply looking at the screen will not provide the answer. We need to systematically narrow down the source of the failure.
The cause lies not in the screen, but in the flow.
A blank screen does not indicate the cause.
A 500 error is a common error that indicates the server was unable to process the request, but it cannot provide a more specific reason. A blank screen is similar. Both plugins, themes, and PHP errors can manifest as the same blank screen.
First, check if the entire website is inaccessible. The initial step is to determine whether the homepage and administrator interface are both failing, or if only specific posts or functions are experiencing issues.
If the administrator panel also shows a 500 error, you should first check for PHP execution errors, critical errors in plugins or themes, PHP version mismatches, database connection information, and server settings.
Conversely, if the administrator screen opens but certain pages do not, you can suspect the plugin or theme responsible for that functionality, the relocated address, specific data, or page rewriting rules.
First, determine whether the problem affects the entire site or only part of it.
The reason why problems only occur immediately after a change.
The process appears to be as simple as copying a file. In reality, it involves changing multiple settings simultaneously, including PHP configurations, database settings, web server configurations, and domain values.
Therefore, even if it is the same WordPress file, it can suddenly stop working in the new server’s PHP environment. If the PHP version and extension modules are different between the old server and the new server, plugins or themes that worked previously may not be compatible with the new environment.
Even the address itself can be a silent problem. Even after moving files and databases, if old domain names or paths remain within the database, links may break and theme displays may become distorted.
Even though the environment has changed, the results are different.
Surprisingly, WordPress has been dealing with this issue for a long time. WordPress 5.2, released on May 7, 2019, included a recovery mode that temporarily disables plugins or themes that are causing errors.
There is a specific order for the fastest inspection process.
Do not arbitrarily revert files or delete all plugins. The fastest approach is to stop making changes, narrow down the scope of the error, and then check the logs to identify the first critical error.
- Secure a backup and stop any further modifications.
- It is necessary to distinguish between the entire website and specific screens.
- Find the first critical error in the error logs.
- Isolate each plugin and theme individually.
- Compare the PHP, database, and server settings with those of the previous server.
- Finally, clean up the address, permalinks, and cache.
The cause can be identified only if you follow the sequence.
The WordPress debugging documentation also recommends using a staging environment before making changes, or ensuring you have a proper backup. When two people simultaneously try to disassemble a broken clock, the expressions on the people’s faces are more likely to be ruined than the clock itself.
When WP_DEBUG is enabled and WP_DEBUG_LOG is set to true, errors are typically logged to the wp-content/debug.log file. If WP_DEBUG_DISPLAY is set to false, errors will not be displayed on the visitor’s screen, but will only be recorded in the log.
However, `WP_DEBUG_LOG` and `WP_DEBUG_DISPLAY` only function when `WP_DEBUG` is set to `true`. If you are running a live website, it is safer to check the logs instead of displaying errors on the screen.
Dividing the migration scope using LUX Content Migration.
Immediately after the migration, to identify errors by cause, it is necessary to distinguish what has been moved. LUX Content Migration allows you to select either “Content only” to migrate posts, pages, categories, comments, authors, custom fields, and media, or “Site settings only” to separately migrate settings such as permalinks, widgets, and menu structures. Before importing, you can use the “Preview” function to check the newly created posts and comments, as well as the number of required images.
If problems arise in a specific category after importing, you can revert the newly created posts to the state of the completed category. However, this feature is not a tool for transferring the code and settings of active plugins, so any 500 errors originating from the PHP version or plugin code must be checked separately. If you need to back up and restore the entire database, theme, plugins, uploaded files, and settings as a single file, this falls within the scope of the Whole site backup/restore add-on.
Start by addressing the issue indicated by the log.
If you see files under the `wp-content/plugins` directory in the log, suspect that plugin. You can temporarily disable a plugin by renaming its folder in the FTP client or hosting file manager.
If the error points to a file in the active theme, you can check it by temporarily renaming the theme folder. This is a process of identifying the cause, not a process of permanently deleting the folder.
If the recovery mode appears in WordPress 5.2 or later, you can check and temporarily disable the plugin or theme that is causing the error. Even if the administrator screen does not open, you can perform the same isolation task using FTP.
Please stop only the items that are specifically designated.
If the logs refer to the PHP version, database connection, permissions, or web server settings, simply modifying the code will not resolve the issue. In particular, if a 500 error is returned before WordPress even logs the error, you must check the execution environment of the new server and the server logs.
If you have changed your address previously, the last thing you will see is this.
If you have changed the domain, be sure to check the `WP_HOME` and `WP_SITEURL` settings. Also, ensure that the HTTPS status of the existing URLs remaining in the database matches that of the new address.
When changing an existing URL to a new URL, it is not acceptable to simply search and replace the entire database. Themes and widgets contain data that includes length information, and changes in address length can cause these data to be corrupted.
Therefore, after safely searching and replacing the serialized data with a tool that can process it, resave the permalink settings. If you misunderstand address issues as code errors, the plugin alone may be needlessly sacrificed.
It is generally safer to change the address at the end.
If you need to manage the redirection from the old address to the new address, including domain changes, you can use the Redirect management add-on for LUX Content Migration. This feature manages the redirection from the old address to the new address and also handles the 404 errors that visitors may encounter.
When it is necessary to actually download and store existing image and video files on a new website, the “Actual re-hosting of images and videos” add-on handles this task. These features address address management and media processing, but do not diagnose PHP or plugin execution errors.
Common pitfalls when attempting to resolve issues directly.
The most difficult aspect of resolving issues directly is not knowing what or where to change, but rather ensuring that too many things are not changed at once. If you disable all plugins via FTP, replace the database, and even change the PHP version, you won’t be able to explain the cause even if the screen returns to normal. The same problem may reappear during a subsequent migration or update.
The most dangerous mistake is to change multiple settings at the same time. If you disable all plugins, replace the entire database, and modify PHP simultaneously, you will not be able to determine what was fixed and what was further broken.
It is also important to avoid displaying errors directly on the screen. Error messages may contain file paths and configuration information, so it is generally recommended to disable the `display_errors` setting in PHP in production environments.
Without backups and logs, there are inherent limitations to direct inspection. If the cause lies in server configurations or a PHP environment different from the previous server, simply modifying files will not resolve the issue, and incorrect search and replace operations can even corrupt data.
If a general operator has access to FTP, they should back up the system and then check the first error in the debug.log file, isolating only the specified plugin or theme. If there are no logs or if the logs point to the server environment, it is faster to request a new server and the PHP version, extension modules, and server logs from the hosting provider for both the new and old servers.
If you don’t know, the first thing to do is not to change it further.
Ultimately, the key is the order. First, distinguish between the whole and a part, read the logs, check the code and server separately, and then, if there has been a domain change, inspect the address and permalinks.
Frequently Asked Questions.
Q. If both the homepage and the administrator screen display a 500 error immediately after an update, what should you check first?
A. After ensuring you have a backup, check the `debug.log` file for the initial critical error. You can narrow down the cause by examining the PHP version, database connection information, plugin/theme errors, and server settings in that order.
Q. The administrator screen opens, but certain pages display a blank white screen.
A. First, check the plugin or theme features that are responsible for the relevant page. Also, review the migrated URL, specific data, and permalink rewriting rules.
Q. Can this problem be easily solved using a tool? What kind of tool should be used?
A. Features such as error log recording, FTP or hosting file managers, and search-and-replace tools for securely handling serialized data can be helpful. However, it is essential to perform backups and verify the scope of potential errors before using any of these tools.
Q. Should we also prepare a way to undo the previous task?
It is safer to check the scope and results before importing, and to prepare in a way that allows you to revert only the problematic areas.
LUX Content Migration allows you to preview the content being imported and use the “Roll back” feature for completed categories to delete newly created posts and revert to a previous state. If you need to restore the database, theme, plugins, and uploaded files as well, use the “Whole site backup / restore” add-on.