Skip to content

How to run PHP without timeouts

We recommend running long PHP processes from a cron job or SSH session rather than through web requests. However, some WordPress plugins (e.g., backup tools) may require running via a URL.

Add the following to your .htaccess file:

<IfModule Litespeed>
SetEnv noabort 1
</IfModule>

To remove timeouts only for certain URLs (e.g., wp-cron, BackupBuddy, ImportBuddy):

RewriteEngine On
RewriteRule (wp-cron|backupbuddy|importbuddy)\.php - [E=noabort:1]

You may also need to increase the PHP max_execution_time if your application does not set it automatically. See Using PHP Selector to change your PHP version, modify extensions for instructions.