Get the Best WordPress Backup
& Migration Plugin Today
Get Duplicator Now

Duplicator Documentation

Documentation, Reference Materials, and Tutorials for Duplicator

How to handle server timeout issues?

OverviewSystem overview for how to deal with host build interrupt issues?

Timeout issues are prone on shared budget hosts that limit the time a PHP/Web-Server/Database process can run. Timeouts are spotted by Duplicator log files (package or installer)that do not finish. Completed logs have text with ‘DONE PROCESSING’ or ‘COMPLETE’. Incomplete logs indicate the host has restrictions on process run-times. Some hosts allow for increasesin process runtime beyond the default. For a list of approved hosting providers see the Duplicator hostingresources page.


The build process for Duplicator Lite is a single threaded design that runs as a continuous process until the site is archived. While the Lite version can build packages upto 4GB it willdepend on the host. Duplicator Lite typically does best with sites under 500MB on most budget hosts. If you’re running into timeout or build issues and need help we suggest the following:

  1. Server Upgrade: Budget host may run into constraints with larger complex sites.Upgrading to amanaged VPS/dedicated server can help in most scenarios.These systems allow for better control and come with excellent support from the hosting company.
  2. Duplicator Pro: The Pro Version uses a multi-threaded architecture to better handle larger data sets.It also comes with dozens of other great features that help to enhance your full WordPress backup/migration strategies.
  3. Adjust Settings: Directly below are several strategy options for your current host and with-in the plugin.

Strategy APlugin Settings
How to resolve timeout issues from within the plugin?

Solution 1Duplicator Lite Only

  1. Try Again: Try more than once with the ‘Try Again’ button. The first pass on a build request is very slow as it hasto cache the IO scan. The second pass is much faster as on some servers the IO seek is cached.
  2. Archive Flush: On some web servers if the server doesn’t flush a response after a specific amount of time then the process will be killedeven if the timeout was increased. In the Settings menu check the ‘Archive Flush’ option. This will try and keep your connection open via a flush response.

Solution 2Duplicator Lite & ProDuplicator Pro is designed to run on large sites. However on some budget hosts tweaks to the Duplicator Lite & Pro settings might be needed.

  1. Toggle SQL Mode: Consider trying a different database build process. First try “Mysqldump” then try “PHP Code”. See Settings > Packages Tab > SQL Mode.
  2. Enable Filters: Many times you can get a package to finish building simply by creating multiple directory filterS on a large data source such as yourwp-content/uploads folder which contains larger files such as images/movies/pdf etc. For details see the section below titled “MANUAL TIMEOUTS WORKAROUNDS”.
  3. Enable DupArchive:A new format known as DupArchive has been Developed by Duplicator to overcome problems experienced on large sites and restricted host environments. Using DupArchive greatly diminishes the changes you will experience a timeout on package builds. When using DupArchive on Duplicator Lite there is a 500MB limit for the size of you package.To use new format set:Duplicator Lite > Settings > Packages > Archive Engine = DupArchiveDuplicator Pro > Settings > Packages > Basic Settings > Archive Engine = DupArchive
Large Databases: If you have a large database consider optimizing it or filtering out larger unused tables.

Strategy BWeb-server Configuration
How to resolve timeout issues with web server configuration updates?


All of the options below can help solve timeout issues on both Duplicator Lite and Pro. The settings will help with both package creation and packageinstallation. Timeouts can be controlled at three different layers so you will need to visit each one and work with your server administrator to validate them.

The PHP processor will time your script and then kill the connection after a specific time (normally 30 seconds). This value can be changed ifyour hosting provider allows it. The Duplicator will try to adjust this value if it has privileges to do so, if not then you will needto work with your host to resolve the issue. We would love to help but this level of control is outside of our control.

The quickest way to resolve a possible PHP timeout on your server is to contact your hosting provider and see if they offer a way for the PHPprocesses to run longer than the default timeout of 30 seconds. Many hosts offer a way to make this happen and you will need to consulttheir documentation. On some hosts you can place the following inside a .htaccess file in your web sites root folder or inside the plugins/duplicatorfolder.

php_value max_execution_time 0
0 means no limit

Because every hosting provider is different, you must contact your hosting provider to find out how to adjust this value properly ontheir systems. If they do not provide you with a solution then in most cases you will not be able to fix timeout issues on that server.In this case you may have to upgrade to a package on their system which gives you more processing power such as a VPS. Otherwise you can tryworking with filters as described below, to get the overall size of your package lower.

Also note that if your hosting provider tells you that there is no PHP timeout limits set or they have adjusted it to a very high number,yet you continue to experience timeout issues (your log file continues to still get cut off) then the hosting provider may have timeouts setat the web server level. Please see the section Web Server below…

The web server can also place a timer on your script and then kill the connection based on a specific time. This value can only be changed by your hosting provider or server administrator. Please contact your host to find out if this is true for their setup. Please do not email or submit a request for this issue as there is nothing we can do to fix the restriction.

Some web servers allow timeouts to be updated by the end user without the help of a server administrator.

The following might work on your Apache or Litespeed server.
The key for this is workaround is RewriteRule ^$ – [E=noabort:1]

# Example .htaccess file Inserted By Customer Control PanelSetENV PHPRC /home/username/public_html# BEGIN WordPress<IfModule mod_rewrite.c>   RewriteEngine On   RewriteBase /   RewriteRule ^$ - [E=noabort:1]   ...</IfModule># END WordPress

EXAMPLE 2 fcgi setup

<IfModule mod_fcgid.c>   AddHandler fcgid-script .fcgi   FcgidIOTimeout 900   ProcessLifeTime 7200   IPCConnectTimeout 180   IPCCommTimeout 7200</IfModule>

EXAMPLE 3 litespeed setup

<IfModule litespeed>   RewriteRule .* - [E=noabort:1]</IfModule>OR<IfModule Litespeed> RewriteEngine On   RewriteRule .* - [E=noconntimeout:1]   SetEnv noabort 1</IfModule>

If you are trying to create a package and the package log suddenly stops on a table and you see something like:

02:55:06 done: wp_posts
02:55:06 start: wp_stats (1435897)

followed by no additional logging, then the SQL generation has failed.

There are few things you can try:

Database Workarounds

Option 1:Install a plugin like wp-sweep and be sure to clean out all unused dataand run the repair and optimize settings. You can also run a repair and optimizeon the database, from a tool like phpmyadmin.

Option 2:If your hosting provider supports ‘mysqldump’; then this option will improve the overall package creation time and installer time for the database.Under the settings menu look for the ‘Database Build’ option and check the box that says ‘Use mysqldump’ this option works great for larger databases.This option applies only to the build phase and not the installer phase.

Option 3:Most tables that we see fail are logging and statistical data with records into the millions. We strongly recommend to use free tools like GoogleAnalytics vs. a stats plugin. Custom plugins tend to slow your site down with additional requests and don’t offer the same reporting capabilitiesof tools like Analytics which has almost no performance impact on your site.

Option 4:Temporarily backup the larger tables and exclude them from the build process (see step 1 when building a package). Then manually re-import the table(s) if thedata is needed, in many cases log table data doesn’t even need to be migrated and can be removed.

Option 5:Work with your host to increase the timeout or script processing for Apache, PHP and MySQL. We highly recommend theseapproved hosts which will allow your scripts to finish running in most cases.

Also be aware that you can also run out of disk space on your server, which can also show itself as a timeout issue. Be sure that you have plentyof space to create your file when creating a package.

If Duplicator is having issues with Cloudflare active and kepts getting server timeouts. It could be related to the time out on CloudflaresRailgun. See the feature here:

Try turning off this feature temporarily to see if Duplicator works. Also consider these steps:
1. Log in to Cloudflare
2. On the Overview page, click “Advanced”
3. Click “Pause”
4. Run installer deployment
5. Turn Cloudflare back on

Strategy CManual Setups
How to work with manual time work-a-rounds?

Package Timeouts
If the log indicates that you made it past the database script process then you may experience timeouts with backing up all your files. Below are a fewitems you try to if you run into issues with backing up all your files:

  • Try to exclude large files such as movies, large images or other backup files (like .zips or .tar files) from the file filters section
  • Exclude your wp-content/uploads folder by adding it to the directory filters option. Then after the install is complete at the new locationyou can manually copy/FTP those files back over.
  • Perform a Two-Part Install

Installer Step 1 Timeouts

  • If possible try to rebuild a smaller package by excluding larger files/directories that can be moved over manually see “Package Timeouts” above.
  • On Step 1 under options try the “Manual Extraction” step. For a step by step of how to perform a Manual extraction see these steps:
    Also see How to do a ‘Manual Extraction’ or run installer without Zip enabled?.

Installer Step 2 Timeouts

  • If your database is too large for your servers configuration see the steps/options above for “Database Timeouts”.
  • Pro Users Only enable Options > Chunking > multi-threaded requests to chunk SQL file.
  • Pro Only Users enable Setup > Action > Manual SQL Execution (advanced) option. This requires that you have manually imported thedatabase ahead of time. This can be done by your host or a tool like phpMyAdmin if it supports larger sites.


Also see:
What can I do for issues with migrating a large site?
How to run the installer in Database Only Mode?
Recommended hosting providers for Duplicator?

Was this article helpful?

Related Articles