How to Run PHP without Timeouts Print

  • 0

We do not recommend you run PHP without web server timeouts on web requests but instead if you need a long running PHP process you run it from a cron job or from SSH if it's a one time operation. There however may be cases such as Wordpress plugins where it must be ran by visiting a URI. You can disable web server PHP timeouts by doing the following:

To disable all timeouts you can add the following to your .htaccess file:

<IfModule Litespeed> 
SetEnv noabort 1
</IfModule>

If you wish to only have no timeouts for certain requests such as for example wp-cron, backupbuddy or importbuddy you could use the following:

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

Keep in mind you may also need to modify the PHP max_execution time if your application does not modify this for you.


Was this answer helpful?

« Back

Ready to get started? Build your site from
$2.24/mo
GET STARTED NOW