Once logged in and you are in the cPanel dashboard, go to Software -> Select PHP Version option.
It will take you to a page which lets you choose the version of PHP you would like to run along with the extensions you would like to enable or disable. Basically, to the top right of the page, there is another option ‘Switch to PHP Options’. Click on it.
Now, you will see a list of PHP variables along with the values associated with each variable. Check the value of max_execution_time, mostly it will be the default 30. Click on it and you can enter the new value you require. Suppose, I need to increase the value to be raised to 60 seconds (1 minute). I will enter 60 in the box and hit ‘Apply’. Scroll to the bottom and click on the ‘Save’ button for the changes to get into effect. This way, you will have a better PHP max execution time setting.
To confirm the changes, I will upload a file, say named info.php, to the public_html folder of my domain SingleWebSolution.com. That is, such file must have the following contents in it:
Validating the change to PHP max execution time
Now take a browser and try accessing the file as https://www.singlewebsolution.com/info.php. Remember to change singlewebsolution.com to the domain name you are using. Search for max_execution_time in the page displayed and check the value listed. I can see that it has changed to 60 seconds.
At this point, your max_execution_time is changed to 60 seconds. Now, your PHP scripts can run for 1 minute without interruption now. This is the correct fix for the PHP max execution time issue.
Finally, you can read more about the PHP max execution time parameter here: http://php.net/manual/en/function.set-time-limit.php