Use of WP All Import, the WordPress Importer, and similar plugins to import XML files, CSV files, WXR files, and images is a common task for developers and sites with content that changes frequently. However, it is also common for timeouts and website performance issues to occur while these imports are being processed.

In this article, we’ll discuss steps you can take to work your way through a challenging import process.

Please note that we cannot guarantee that every import process will run successfully on our platform. If the import cannot be run successfully at Kinsta we recommend performing the import in a local development environment and then importing the updated database or table to your website database.

Why Do Imports Cause Timeouts and Performance Issues?

There are two types of timeouts that large import processes typically run into:

It is common for website performance to also be slower when a large import is running. This is because PHP and MySQL are busy handling the import process. This causes regular traffic to the site to have to wait until PHP and MySQL are available to generate the page requested.

Dealing with PHP Timeouts

If you run into a PHP timeout the max_execution_time and max_input_time may need to be elevated. On our platform, these values are set to 300 seconds (5 minutes) by default. The maximum PHP timeout values available on our platform are based on your current hosting plan.

A temporary increase in the timeout duration would be appropriate if you need the timeout duration elevated for less than 4 hours in order to complete a one-time import process. If you expect to need the elevated timeout value for a longer period of time or on a recurring basis you will need to upgrade to an Enterprise plan.

We do not allow timeouts to be set to longer than 600 seconds on any plan on a permanent basis. Our experience has been that sites that require longer timeout durations on a permanent basis will experience significant stability issues during these long-running processes. Rather than sacrificing website stability, if you have recurring processes that require longer timeouts the best solution is to work with a developer to adjust the long-running process rather than to keep increasing the timeout duration.

If you’d like to request a temporary or permanent increase in the PHP timeout settings please open a support ticket.

Dealing with HTTP Timeouts

HTTP timeouts typically occur after 60 seconds for sites hosted at Kinsta. Due to the design of our infrastructure, we are unable to increase the HTTP timeout duration.

If you experience an HTTP timeout there are two steps you should attempt to resolve the issue:

Please note that running an import over SSH is a change to the content of your website is not within the scope of what our support team is here to assist you with. In addition, if you are not familiar with SSH you will either need to learn how to use this powerful tool or work with a developer to process the import over SSH.

Dealing with Website Performance Issues

If the import process is running successfully but your site is performing poorly during the process you have two options:

Upgrading plans to gain access to more PHP workers will not help in all cases. If your site is running slowly because the database (MySQL) is busy inserting content into the database then adding additional PHP workers is unlikely to speed up the performance of your site.

Getting Help

If you’ve worked through the prior suggestions in this article, are still running into issues, and would like assistance, the next step would be to reach out to our support team. However, before opening a conversation with our support team please gather as much information as possible.

Once you have gathered this information open a ticket with Kinsta’s support team. However, please note that we cannot guarantee that we will be able to assist you in getting every import to run successfully.

Next Steps – Local Development Workflow

If running the import in Kinsta’s environment is not possible the next step would be to develop a new workflow for the import process where the import is run in a local development environment. Please note that a developer will need to be involved in this process to ensure no data is lost and that your site database is not damaged.

In general, the process would be to set up a copy of your site in a local development environment where you can control all of the timeout limits. Then complete the import in that local environment. Once the import is complete, export a copy of the WordPress database or the updated database tables from your local environment. Then create a backup of your live website, drop the database (or affected tables) from your live website, and import the database or tables exported from your local environment.

If you enjoyed this tutorial, then you’ll love our support. All Kinsta’s hosting plans include 24/7 support from our veteran WordPress developers and engineers. Chat with the same team that backs our Fortune 500 clients. Check out our plans