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 resolve this issue please follow the instructions below:
1. Login to cPanel.
2. Go to file manager.
3. Once in the File Manager, navigate to the document root for the domain/addon domain that is experiencing the issue at hand.
4. 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.
5. Once ticked you will see the .htaccess file itself, simply right click on the file and select edit and add the following to the bottom of your .htaccess file:
RewriteRule .* - [E=noconntimeout:1]
RewriteRule .* - [E=noabort:1]
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.