This article covers solutions to PHP timeout issues with WordPress sites.

For performance reasons, we set the PHP max_execution_time on our shared servers quite low, usually 60 seconds. For some operations this might be too low and could lead to timeout errors.

Most commonly this will happen when running a backup with a WordPress backup or migration plugin. Small sites will rarely have a problem with this, but if a site is quite large (several hundred MB or more) this is more likely to occur. This is because the PHP process runs out of time (as determined by the max_execution_time) before it can complete.

Some WordPress backup plugins workaround this limitation by performing the backup across multiple PHP calls, rather than needing to complete the entire backup in a single process. BackupBuddy is one such plugin that has this feature and this is one of the reasons we recommend it.

Adjusting the PHP max_execution_time

You can modify the PHP max_execution_time for your site by overriding the default value with the .user.ini configuration file.

You can create a .user.ini file a number of different ways, but for this tutorial we're going to use the Plesk File Manager. We're going to set the max_execution_time to 600 seconds (5 minutes).

  1. Login to the Plesk Panel.
  2. To to the Plesk File Manager by clicking the Files tab.
  3. Navigate to the webroot of the site you wish to work with, usually /httpdocs.
  4. From the Plesk File Manager menu, select Create New File.
  5. The Create A File dialog will open. Name the file .user.ini and click OK.
  6. The .user.ini file will now be listed in the directory.
  7. Click the .user.ini file to view it.
  8. Click the Edit in Text Editor button at the bottom of the page.
  9. Add the following to the file, exactly like this: max_execution_time=600
  10. Click Save.
  11. Click OK to exit the Text Editor.

That's it! Your PHP max_execution_time is now 600 seconds, which should be long enough to backup a large site or perform other lengthy PHP operations, such as recreating image thumbnails.

If you experience any issues with this, or have any questions, just open a support ticket and we'll be happy to help

Was this answer helpful? 0 Users Found This Useful (0 Votes)