Can we increase PHP Time Limit in shared hosting? The hosting provider doesn’t allow that but the theme I’m using suggests that.
Can we increase PHP Time Limit in shared hosting? The hosting provider doesn’t allow that but the theme I’m using suggests that.
3
Answers
go to .htaccess and input it
If your hosting provider does not allow that, then no matter what values you input, it will not go beyond their default or recommended values.
Do you use cpanel or vdeck ?
Increasing PHP Time Limit via PHP.ini file
Many small shared hosted servers do not allow users to access the PHP.ini file. If you are granted access, you can directly increase the PHP Time limit through this file. If you wish to extend the limit to 300 seconds, you can enter the following line of code or update if it exists already:
max_execution_time = 300;
Alternative to editing PHP.ini through wp-config.php
This is another alternative to the PHP.ini method. Simply add / edit the following line in the wp-config.php of your WordPress
set_time_limit(300);
Modifying the .htaccess file
Some of you might have the .htaccess file where you can simply add / edit this line of code to increase the time limit.
max_execution 300