Create an .htaccess file in the document root folder and paste the following. You may use the file manager from your control panel or using your favourite FTP program to edit the files. As always make backups!
We're using <IfModule litespeed> ... </IfModule> so we can check if litespeed is running. This is a safely measure in case the hosting company switches to a different web server.
<IfModule litespeed>
php_value max_input_time 300
php_value max_input_vars 15000
php_value max_execution_time 300
php_value memory_limit 256M
</IfModule>
What does max_input_vars php setting do?
PHP receives input data from HTML forms using GET and POST methods, along with data from cookies on a webpage. Normally, PHP permits up to 1,000 input variables in its scripts. To alter this limit, you can modify the max_input_vars directive within an .htaccess file. Sometimes the limit can easily be reached when you use arrays and hidden data fields.
If there are more input variables than specified by this php.ini directive, an E_WARNING is issued, and the extra input variables are removed from the request. For more info you can check https://www.php.net/manual/en/info.configuration.php#ini.max-input-vars
What does max_input_time php setting do?
max_input_time: This is like a timer for how long PHP waits to get all the information it needs to start running a script. When you visit a website, your browser sends information to the server. This setting tells PHP how many seconds it should wait for all that info to arrive. If it takes too long, PHP stops waiting and doesn't run the script.
What does max_execution_time php setting do?
max_execution_time: This is another timer, but it's for how long PHP allows a script to run after it has started. Think of it like a stopwatch that starts when the script begins. If the script takes too long to finish, PHP will stop it. This prevents scripts from running for too long and possibly causing problems on the server.
What does memory_limit php setting do?
memory_limit: This setting controls how much memory a PHP script can use. It's like giving the script a box of a certain size, and everything the script does has to fit inside that box. If the script tries to use more memory than allowed, PHP will stop it. This helps to prevent a single script from using up all the server's memory, which could slow down or stop other things on the server.
In short, these settings help manage the resources on a server by controlling how long scripts wait for data, how long they run, and how much memory they use.