Upload capacity and execution time limits: Why large websites may stop during migration

When migrating a large WordPress website, the most frightening moment is not when you begin the process. It is when the files have reached 83 percent completion, and then the process abruptly stops without any explanation.

However, the culprit is not always a slow internet connection. This is because servers have separately defined limits for file size, the amount of data that can be sent at once, and the duration for which operations can continue.

When a single file exceeds the maximum file size limit, the transfer process will stop.

Moving a website is similar to moving household goods. Files such as photos, videos, themes, and plugins are like boxes, while the database containing text and settings is like a filing cabinet.

According to the official WordPress documentation, a complete backup requires both files and the database. If only the files are transferred, the design and images will be missing. If only the database is transferred, the content will be present, but the website’s appearance will not be displayed correctly.

The problem arises when attempting to upload these files simultaneously through a web browser. For example, if a single backup file is 1 gigabyte in size, but the server is configured to accept only 128 megabytes at a time, then only a fraction, less than one-eighth, of the file can be transferred.

Here is an unexpected fact.

The upload limit displayed in the WordPress interface is not a value determined solely by WordPress. The actual limit is determined by the settings of PHP, a server-side program, the web server, and the hosting plan.

The upload restrictions are not just one, but multiple.

The PHP documentation states that there are different gatekeepers when uploading files. Each gatekeeper must be passed for a large backup file to reach its destination.

  • Maximum file size.
  • The maximum total size that can be included in a single request.
  • Maximum time allowed for input.
  • The maximum time that the script can be executed.
  • The number of files that can be processed simultaneously.

The first gatekeeper you encounter is `upload_max_filesize`. Its name may be complex, but its meaning is simple. If a single file exceeds this size, the server will not accept it from the beginning.

Next comes `post_max_size`. This value limits the total size of a package containing multiple files or form data sent at once. The official PHP documentation also states that this value should be greater than the limit for a single file.

For example, if the limit for a single file is 512 megabytes, but the overall request limit is 256 megabytes, what happens? A large file might be able to pass the individual limit, but it will be blocked by the overall request limit.

There are even more absurd cases. Even when the settings are adjusted to be more generous, uploads can still fail. In such instances, the web server itself may be issuing a 413 error, determining that the request is too large.

What is more frightening than file size is the clock.

The second reason large-scale migrations stop is time limits. Even if a file is small, if the server has complex processing tasks to perform, it may exceed the time limit.

In PHP, there are separate time limits for input processing and program execution. According to the PHP documentation, `max_input_time` limits the time for input processing, including file uploads, while `max_execution_time` limits the time for program execution.

For example, sending a 600 megabyte file over a fast connection might take only a few minutes. However, if the file needs to be decompressed on a shared hosting server, and if tens of thousands of files need to be created, and if a database also needs to be organized, the actual time the server spends working will be much longer.

Therefore, even though 100 percent is displayed on the screen, it is still possible to fail at the last moment. This is because, although the file transfer is complete, the decompression or database entry processes are not yet finished.

The cPanel documentation, a hosting management tool, also advises that PHP tasks can be forcibly terminated once their execution time has elapsed. From the server’s perspective, stopping a malfunctioning task so that it does not continue consuming resources is the safer choice.

In other words, the migration process does not simply involve sending items like a package. It includes opening the received box, changing the address, and arranging the contents in the correct places.

Why do we always get stuck at the same point?

There is a reason why the progress sometimes stops repeatedly at similar points, such as 40 percent or 83 percent. This is because the migration tool processes the files in fixed-size chunks.

If a specific package contains a very large video file or thousands of small image files, the processing time in that section will suddenly increase. The screen’s progress bar is calculated based only on the total capacity, so it may not accurately reflect the actual amount of work being performed.

Another issue is the temporary storage space. The server does not directly place uploaded files in their final destination; instead, it stores them in a temporary folder before unzipping them. If a backup file is 4 gigabytes, a significantly larger amount of space may be required to accommodate the temporary file and the unzipped file.

Here’s why you shouldn’t be complacent about having 5 gigabytes of free space on your disk. To process a 4-gigabyte backup, you might need 8 gigabytes or more, depending on the type of files and the compression method used.

Databases can also be a silent threat. In some cases, comments, search history, statistical data, and old temporary files can occupy a larger volume than several thousand documents.

The most common mistakes made when attempting to resolve issues directly:

Many people first check their internet speed and then re-upload backup files. However, repeatedly uploading the same file to the same server does not resolve issues related to settings or storage space.

To resolve the issue directly, you need to check each limit individually. Do not only look at the upload size displayed in the WordPress interface; you must also check the PHP settings, web server settings, storage space of the hosting account, and the database size separately.

  • Verify the actual size of the backup file you are uploading.
  • Check the size of a single file and the overall request limit.
  • Checking PHP input time and execution time.
  • Verify the temporary folder and the final storage location.
  • Verify the creation time of database and file backups.

A common point of difficulty for beginners is the issue of permission to modify settings. Even if you have administrator privileges for your website, you may not have the permission to modify the server configuration files.

In shared hosting environments, multiple users share the same server, so restrictions are often placed on execution time or upload size for security reasons. Attempting to change settings individually can sometimes cause errors throughout the entire website.

Another limitation is the issue of data inconsistencies. Even with the previous methods, when new content or orders are added to an existing site, the changes may not be reflected in the initial backup.

The file might be in a state from yesterday, while the database is in a state from today. This is why the official WordPress documentation treats files and the database as a single unit and instructs users to synchronize the backup times.

How to create a continuous and ongoing relocation process.

The safest approach is to avoid forcing large data chunks into the browser. Instead, consider methods that do not require keeping long-running tasks attached to the browser window, such as server-to-server copying or file transfer.

If you have access to a command-line environment, there is also a way to export and import the database using the official WordPress tools. This method can help avoid upload limitations in the web interface, but it requires server access permissions and basic command-line knowledge.

If you do not have the necessary permissions, it is advisable to specifically inquire with the hosting provider about the following: the maximum size of a single file, the total request size, the execution time, the temporary storage space, and the method for importing data into the database.

For large websites, it is safer to first check the status of files and databases before migrating them all at once, and to test the restoration in a test environment. After confirming that the new website opens correctly, that images are displayed, and that login and inquiry functions are working, you can change the address, which makes it easier to revert if necessary.

Especially if the migration involves changing the domain as well, it does not end with simply copying the files. As outlined in the official WordPress guidance, you need to check the site address, database connection information, permalink settings, and even the old addresses stored in your posts, in that order.

If the domain change includes moving content, you need to separately verify the content migration process and the address and media processing steps. LUX Content Migration allows you to select and migrate articles, pages, categories, comments, authors, custom fields, and media.

The actual re-hosting of image and video files to a new site falls within the scope of the “Actual Re-hosting” add-on. The redirection of content from the old address to the new address, and the management of 404 errors, are handled by the “Redirect Management” add-on.

Ultimately, the key to large-scale data migration lies not in waiting longer, but in identifying where the process is stalling and dividing the data according to the rules of that “gatekeeper.”

The upload size and execution time limits may seem like annoying obstacles, but they also serve as safety measures to prevent the server from crashing. If you read those rules in advance, the screen that stops at 83 percent will no longer be a mystery.

Using LUX Content Migration to move content by dividing it into sections.

In large-scale data migration, the key is not simply transferring all data in the same way, but rather verifying the necessary scope in segments. LUX Content Migration allows you to specify the existing and new sites using role settings, and then exports the selected content into a dedicated .wpmpx file, which can then be imported by category. In “Content only” mode, you can select and transfer articles, pages, categories, comments, authors, custom fields, and media.

When you only need to transfer the settings and not the entire site, you can manage general settings, read/write permissions, discussion settings, custom addresses, widget placement, and menu structure separately under “Site settings only.” Before importing, you can preview the articles and comments that will be created, as well as the number of required images. After completing the import, you can revert to the previous state using the “Roll back” function.

Frequently Asked Questions.

Q. If the backup file is larger than the upload limit, do you need to delete the file?

A. First, consider dividing the files into several groups or reviewing the method for copying between servers. There is also a method of transferring large files such as images and videos separately, and importing the database separately.

Q. Even though I increased the upload size, I am still getting a 413 error.

A. Only the PHP settings may be changed, while the web server’s request size limit remains the same. You should request the hosting provider to confirm the limits for both the web server and PHP.

Q. If the execution time is significantly increased, can even large websites be migrated at once?

A. This is not always the case. Even if the processing time is increased, failures can still occur due to insufficient temporary storage space, database errors, or insufficient server resources.

Q. During the migration process, if new orders or posts appear on the existing website, what happens?

A. Since changes made after the last backup may not be reflected on the new site, it is necessary to temporarily shut down the site just before the migration or to implement a final data synchronization process. For websites with frequent real-time changes, such as online shopping malls, it is safer to separate the testing phase from the actual migration.

Q. Can this problem be easily solved using a tool? What kind of tool should be used?

A. You can use automated migration tools, server file transfer functions, and command-line based tools according to the situation. However, no tool completely ignores the storage and time limitations of the hosting server, so you must first check the current server conditions.

Q. Can I check the content that will be transferred before importing it?

A. 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.

LUX Content Migration allows you to delete and revert articles newly created by a completed category import using the “Roll back” function. The Import screen guides you through the process of importing content for each category.

WordPress-related links

https://store.luxdigest.com
https://wpcm.luxdigest.com
https://sohoseo.luxdigest.com