Understanding PHP’s maximum execution time

To support the smooth running of your server, PHP directives dictate certain conditions and rules for running scripts. One of these rules, Max_Execution_Time, defines the maximum time a script can run for. By default, this is set to 30 seconds. If a script runs for longer than 30 seconds, it is automatically stopped and an error is reported.

You may wish to extend this time limit, if you need to run large scripts on your server. Typically, PHP scripts (in WordPress plugins and themes, for example) will mention whether you need to increase the maximum execution time in their documentation.

PHP directives are typically managed through a PHP.ini configuration file on your server. However, we do not allow direct changes to PHP.ini on HostPapa servers. PHP configuration changes can be made using My cPanel.

Log in to your HostPapa Dashboard and select My cPanel from the top navigation menu. Scroll down to the Software section and click Select PHP Version.

My cPanel

Now click Switch to PHP Options.

PHP selector

Locate the max_execution_time directive in the list and click the existing value (which should be 30, by default). Enter a new value (in seconds) and click Apply. Now click the Save button at the bottom of the page to complete configuration.

For further questions, or if you need help, please open a support ticket from your HostPapa Dashboard. Follow this link to learn how.

Was this article helpful?

Related Articles

Leave A Comment?