Knowledgebase: PHP / Programming
How to Run PHP without Timeouts
Posted by Tony B. on 30 April 2020 11:35 PM
|
|
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:
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:
Keep in mind you may also need to modify the PHP max_execution time if your application does not modify this for you. | |
|
Comments (0)