Increase script execution time in Ubuntu and CentOS
How to increase script execution time in Ubuntu and CentOS?
Open the php.ini file and change the max_execution_time to 300 seconds (5 minutes). Refer the below step to change script execution time in Ubuntu. Replace the PHP version from the below command.
[email protected] ~]# php -v
PHP 7.4.3 (cli) (built: Aug 17 2022 13:29:56) ( NTS )
[email protected] ~]# vim /etc/php/7.4/apache2/php.ini
max_execution_time = 300
[email protected] ~]# vim /etc/php/7.4/cli/php.ini
max_execution_time = 300
Open the php.ini file and change the max_execution_time to 300 seconds (5 minutes). Refer the below step to change script execution time in CentOS. Replace the PHP version from the below command.
[email protected] ~]# php -v
PHP 7.4.3 (cli) (built: Aug 17 2022 13:29:56) ( NTS )
[email protected] ~]# vim /etc/php.ini
max_execution_time = 300