Preventing PHP time outs in Lite Speed

To avoid Lite Speed server timeouts when executing any form of PHP script, you need to make sure that your timeout limits are correctly configured within your .htaccess file.

To rectify this, once in cPanel for the respective account, head to 'File Manager' under 'FILES'.

File Manager within cPanel

Once in the File Manager, navigate to the document root for the domain/addon domain that is experiencing the issue at hand.

File Manager Preview

If you cannot see the .htaccess file within this folder, head to the top right, select 'Settings' and tick 'Show hidden files (dotfiles)' is ticked. 

Enable Hidden Files

Once ticked you will see the .htaccess file itself, simply add the following to the bottom of your .htaccess file:


<IfModule Litespeed>
RewriteEngine On
RewriteRule .* - [E=noconntimeout:1]
RewriteRule .* - [E=noabort:1]
</IfModule>


LiteSpeed Timeout Fix

And that's it! Once in place, your time outs will now follow the PHP time out limits set in the 'Select PHP Version' selector within cPanel.
  • timeout, php, litespeed, time outs
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Introduction to the cPanel Interface

To Play the video below simply click on it. To play in full screen mode hover over the video as...

Email Accounts

To Play the video below simply click on it. To play in full screen mode hover over the video as...

Powered by WHMCompleteSolution