Compatibility issues caused by differences in PHP, MySQL, and web server versions
- Even though it’s the same WordPress, why does it change when the server changes?
- If the PHP version is updated, previously functioning plugins may start to malfunction.
- MySQL is not a drawer; it is a warehouse with rules.
- If the web server changes, the length of the address will also change.
- The most common point where people get stuck when trying to fix something themselves is:
- LUX Content Migration: A system for managing and distributing previous tasks.
- Preparing before moving can reduce the likelihood of problems occurring later.
- Frequently Asked Questions.
- WordPress-related links
I moved the WordPress site to a new server, but the screen froze and turned white. I copied the files and imported the database, but it still didn’t work.
The perpetrator may not be who you would expect, based on the address or the perceived image. The three employees – PHP, MySQL, and the web server – were operating under different sets of rules.
Even though it’s the same WordPress, why does it change when the server changes?
WordPress is not a single book. Text and images are stored in a database, PHP retrieves the content and creates a display, and a web server delivers it to the visitor.
If we compare it to a restaurant, the database is the refrigerator. PHP is the chef, and the web server is the staff member who takes orders and serves the food.
If even one person among these three uses a different language, problems arise. This is like having ingredients in the refrigerator that the chef cannot retrieve, or having a dish prepared but the serving staff unable to deliver it to the customer.
According to the official WordPress guidelines, it currently recommends PHP 8.3 or higher, MySQL 8.0 or higher, or MariaDB 10.11 or higher. Older versions may still function, but versions that are no longer officially supported have security vulnerabilities and compatibility issues.
The important point here is the distinction between “being executed” and “being safe and durable.” An old server may operate quietly until today, but it can suddenly reveal vulnerabilities triggered by previous operations.
If the PHP version is updated, previously functioning plugins may start to malfunction.
PHP is the scripting language used by WordPress and its plugins. When migrating a server, changing from PHP 7.4 to PHP 8.3 or 8.4 can cause older code to encounter new rules.
The official PHP documentation also states that due to significant version changes, there may be compatibility issues, and it advises users to test before applying it to actual servers. A single change in syntax, or an error that was previously ignored, may now cause immediate termination.
For example, consider a plugin that calls a function using an older method. In older versions of PHP, this might only display a warning and continue execution, but in newer versions of PHP, it could result in a fatal error and halt the program.
Then, the visitor sees the message “There is a problem with the site.” The administrator cannot even log in and must disable plugins one by one to find the cause.
The following are particularly dangerous areas:
- A plugin that has not been updated for a long time.
- Manually edited theme files.
- This is code that I copied from the internet a long time ago.
- Functions that are linked to external services, such as payment, membership registration, and reservation.
- A small auxiliary function that only works on the administrator’s screen.
It is surprising, but sometimes only the administrator panel displays errors, while the main website page appears normal. This is because there is separate plugin code that only runs within the administrator interface.
Therefore, you should not assume that the previous step was successful simply because the initial screen opens. You need to try logging in, writing a post, uploading an image, and sending an inquiry to determine the actual status.
MySQL is not a drawer; it is a warehouse with rules.
MySQL is a database that stores article titles, content, member information, and settings. While many people think of a database like a file, it is actually more like a repository that combines storage methods and command rules.
Therefore, when migrating from MySQL 5.7 to MySQL 8.0 or 8.4, simply copying the files is not sufficient. The commands used, the character handling methods, and the user authentication methods may differ.
According to the official MySQL documentation, existing features may be removed or default settings may change when the version is updated. In fact, in MySQL 8.4, some features that were no longer recommended in previous versions were removed.
These changes do not manifest as the complete disappearance of text. Instead, they appear as issues such as the search function ceasing to work, errors occurring on specific pages, or failures in saving new content.
Character encoding often causes problems. If a database stores Korean characters, but a new server reads them using a different character encoding rule, question marks or garbled characters may appear.
Sometimes, the Korean text in photo descriptions becomes corrupted, search results become distorted, or only the special characters in older articles disappear. Just because you can see the screen does not mean that the data has been completely transferred.
You must also verify the database user accounts.
- Is the new database name the same as the setting file?
- Are the username and password correct?
- Does the user have the authority to access the database?
- Is the server address localhost, a separate address, and is it correct?
- Does the Korean text and the emojis in the saved message display correctly?
If the web server changes, the length of the address will also change.
A web server receives requests from visitors and determines which files and programs to execute. Two prominent examples are Apache and Nginx, and while they perform similar functions, their methods for reading configuration files differ.
Apache can modify address rules using the .htaccess file within a folder. In contrast, Nginx does not use such files and defines the rules within the server’s overall configuration.
This discrepancy manifests as the problem: “Why are all the article addresses returning a 404 error?” While the main page (index.php) opens correctly, the individual article addresses are not being properly passed to the WordPress server.
The WordPress developer documentation also states that Nginx cannot automatically create WordPress address rewriting rules. This means that the server administrator must configure them manually.
The following are common symptoms that occur after the procedure:
- The initial screen opens, but only the link address displays an error.
- The login is successful, but the system repeatedly crashes when accessing the administrator screen.
- The image is visible, but the CSS and JavaScript files are missing.
- The HTTPS lock icon disappears or repeatedly redirects to different addresses.
- The uploaded file is not being saved due to a permission error.
Switching a server from Apache to Nginx is not simply a matter of moving to a new location. Just as moving the same furniture to a new house requires reconnection if the location of the electrical outlets is different, changing from Apache to Nginx requires adjusting the address rules and the method of connecting to PHP.
The most common point where people get stuck when trying to fix something themselves is:
The problem lies in the fact that error messages are not always informative. Seeing only the line “Database connection error,” one might assume that the database is broken, but the actual cause could be one of several things: the password, permissions, PHP extensions, or the server address.
Another pitfall is that multiple changes occur simultaneously. When migrating a server, if you also change PHP, MySQL, the domain, and HTTPS, it becomes difficult to trace which change caused the problem.
To resolve the issue directly, you must first record the current state of the existing server. This involves documenting the PHP version, the MySQL or MariaDB version, the type of web server, active plugins, PHP extensions, and the PHP memory limit.
Next, the same process must be replicated on the new server under the same conditions, and then the versions should be updated one by one. However, general administrators often find it difficult to even locate this information on the server screen.
It is not sufficient to download only one backup file. Website files and databases are different types of backups, and if either one is missing, the website will not be complete.
If you need to verify the scope of a backup by consolidating it into a single file, you can use the “Whole site backup / restore” add-on for LUX Content Migration. This feature allows you to back up and restore the database, theme, plugins, uploaded files, and settings into a single file.
You can choose to either transfer only a portion of the content or to archive the entire website. However, even if a backup file exists, a separate process is required to verify that the actual restoration can be performed.
Furthermore, even if a backup file exists, you cannot be sure that it can be restored unless you test it. It is like having a key, but you still need to check whether the door actually opens.
The safest approach is to minimize the number of changes.
- Record the version and settings of the existing server.
- Back up the files and the database separately.
- It restores from a test address that has not been publicly disclosed.
- Verify the compatibility of PHP with the database.
- We will check everything from login and writing posts to payment processing.
- When there are no issues, connect the actual domain.
The important thing is not to change everything at once simply because the new server is the latest version. While the latest versions are often more secure, they can be like a new neighborhood with unfamiliar rules for older plugins.
LUX Content Migration: A system for managing and distributing previous tasks.
After confirming the versions and settings, if you need to determine the scope of content to be migrated, LUX Content Migration allows you to specify the existing site and the new site using the Role setting, and to divide the export and import processes. With “Content only,” you can select and migrate articles, pages, categories, comments, authors, custom fields, and media. With “Site settings only,” you can separately migrate general settings, reading and discussion settings, permalinks, widget placement, and menu structure.
Before importing, you can use the Preview function to check the new articles and comments that will be created, as well as the number of images required. After importing a specific category is complete, you can use the Roll back function to delete the articles and comments created by that process, effectively reverting the changes. If you need to actually download images and videos to a new site when changing servers or domains, you can check the “Actual re-hosting of images and videos” add-on. If you need to manage the old addresses and 404 records, you can check the “Redirect management” add-on.
Preparing before moving can reduce the likelihood of problems occurring later.
Before proceeding, first create a health check report for the current website. You can gather the necessary information by checking the version information in the WordPress site status screen and the hosting management screen.
Plugins and themes should also be saved in a list. In addition to just the name, it is important to record the last update date and whether the feature is essential. This will help to quickly narrow down the scope of the problem when an issue arises.
When testing, it is important to verify actual behavior rather than just focusing on the initial screen appearance.
- Administrator login and logout.
- Creating and editing new text.
- Image upload and deletion.
- Menu and search functions.
- Inquiry form and email reception.
- Membership registration and password reset.
- Shopping cart and checkout process.
It is generally better to make changes to PHP on a test server before deploying them to the production server. Similarly, as the official MySQL documentation recommends, you should verify the upgrade path and compatibility before migrating to a new version.
In particular, skipping intermediate versions, such as when upgrading directly from MySQL 5.7 to 8.4, requires extra caution. The larger the version difference, the greater the likelihood that commands and default settings will differ.
Ultimately, the issue of compatibility is not about “whether files have been transferred,” but rather “whether the new environment understands the commitments made by the previous site.” The practice of creating a version table first can prevent larger problems than those caused by outdated technologies.
The criteria for a successful website migration are not simply that the screen briefly displays, but rather that both visitors and administrators can perform all their usual tasks as normal.
Once compatibility checks and functional tests are complete, the next step is to determine the scope of the content and settings to be migrated. LUX Content Migration is a tool that exports articles, pages, comments, authors, and settings from a WordPress site as files, allowing them to be transferred to another WordPress site.
The system categorizes previous versions into “Content Only” and “Site Settings Only,” and allows you to preview and roll back changes before importing. This provides a solution for managing previous versions, which can be reviewed in conjunction with version history and test restoration features.
Frequently Asked Questions.
Q. Should I always update the PHP version to the latest one?
A. The most recent version is not always the best choice. It is safer to test whether WordPress, themes, and plugins support that version on a test server before deploying it.
Q. Which should be checked first, PHP or MySQL?
A. First, record the versions of PHP, the database, and the web server currently running on the server. These three elements are interconnected and work together, so checking only one may cause you to miss the root cause.
Q. Can changing the server from Apache to Nginx cause the article addresses to break?
A. That is possible. The two web servers may have different configurations for directing addresses to WordPress, so it is necessary to separately configure the fixed address rules on the new server and test the actual article addresses.
Q. Does it mean it was successful if only the first screen appears after pressing the previous button?
A. No.
To verify the actual functionality, you must click on features such as administrator login, save article, upload image, search, and submit inquiry. Even if only some files are working correctly, the initial screen may still open.
Q. Can this problem be easily solved using a tool? What kind of tool should be used?
A. You can use tools to check versions, back up files and databases, perform test restores, and record errors. However, these tools do not automatically determine the cause of version conflicts, so a responsible person to verify the results and a restoration plan are also required.
Q. Is it possible to migrate the content and site settings separately?
A. It is possible.
LUX Content Migration distinguishes between “Content only” and “Site settings only,” allowing users to migrate articles, pages, comments, authors, media, or site settings and menu structures separately. Before importing, users can preview the target scope. Completed categories can be reverted using the “Roll back” function.