Share!

PHP will exit with the following error if it takes more time than it's allowed to execute;

Fatal error: Maximum execution time of 30 seconds exceeded in yourscript.php

There are a few ways that you can increase the maximum execution time for PHP in your cPanel hosting though in cPanel you don't have access to the system's PHP configuration file while cPanel provides an interface on its dashboard for easy configuration of PHP options.

You can increase PHP's maximum execution time via cPanel's dashboard following these steps:

Tutorial video:


  1. Log in to your cPanel dashboard and go to the Software section.
  2. Click on Select PHP Version.
  3. Click on Switch To PHP Options.
  4. Look for max_execution_time and click on the value field.
  5. Enter desired value in seconds value and click the Apply button.
  6. Click on the Save button.