Can we increase PHP Time Limit in shared hosting? The hosting provider doesn't allow that but the theme I'm using suggests that.
CodePudding user response:
go to .htaccess and input it
post_max_size = 1024M
upload_max_filesize = 1024M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1024M
CodePudding user response:
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 ?
CodePudding user response:
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