You may receive a message such as “Maximum execution time of 30 seconds exceeded” or “Maximum execution time of 60 seconds exceeded”. This means that it is taking to longer for a process to complete and it is timing out.

Method 1: Edit file wp-config.php

There are a few different ways to increase the maximum PHP execution time for a WordPress website, but one common method is to add the following code to the wp-config.php file:

// Increase PHP execution time
set_time_limit(300); // 300 seconds = 5 minutes

This will set the maximum execution time to 300 seconds (5 minutes) for all PHP scripts on your website. It is important to note that this method may not work on all hosting environments or if the server is configured with a low value for max_execution_time.

Method 2: Edit file .htaccess

Another way to achieve this is by adding the following code to your .htaccess file:

php_value max_execution_time 300

*Make sure you back up the .htaccess file before you edit it.

Method 3: Editing php.ini

You can also try adding the following line in your PHP file:

ini_set('max_execution_time', 300);

It’s important to note that increasing the maximum PHP execution time can have negative effects on website performance and security. Therefore, it’s recommended to only increase it as much as necessary and monitor the website performance.

It’s also important to note that you should consult with your hosting provider before making any changes in the server configuration.

Leave A Comment

Receive the latest digital marketing trends delivered to your email!
Table of contents