Increase Maximum PHP Execution Time
Find the file called: php.ini on your server and follow below steps
With apache2 and php7.4 installed you need to make three changes in the php.ini file. First open the file for editing, e.g.:
For PHP v7.3
sudo nano /etc/php/7.3/apache2/php.ini
For PHP v7.4
sudo nano /etc/php/7.4/apache2/php.ini
Next, search (Ctrl + W) in this file for the max_execution_time entry, by defaul it has 30 second, for example:
max_execution_time=30
You can increase value as your requirement.
Now Restart Apache Services for changes to be applied.
sudo systemctl restart apache2
For PHP-FPM
If you enabled PHP-FPM, then type this command line for open and edit php.ini
sudo nano /etc/php/7.4/fpm/php.ini
Edit, as your requirement:
memory_limit = 300M
post_max_size = 200M
upload_max_filesize = 100M
max_execution_time=300
Restart Apache And PHP-FPM Services for changes to be applied.
sudo systemctl restart apache2
sudo service php7.4-fpm restart