How to Run PHP without Timeouts

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

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.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Available Node.js Versions

We recommended all Node.js applications are created using our Setup Node.js Application...

Available Python Versions

We recommended all Python applications are created using our Setup Python Application interface....

Available Ruby Versions

We recommended all Ruby applications are created using our Setup Ruby Application interface. If...

Default permissions on folders and PHP files.

We currently run Litespeed Web Server which runs PHP as the user so files and folders should...

Do you support Ruby on Rails?

Yes we support Ruby On Rails and you can install and utilize many different versions of Ruby and...