The WordPress developers might have faced this issue of “Maximum execution time ” error while uploading a theme or installing a plugin. This error states like:
“Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\project_name\wp-includes\Requests\Transport\cURL.php on line 437”.
Why does this error occur?
As we know that WordPress is based and is coded in PHP programming language. So, in order to protect the web servers from malicious abuse, WordPress has set a limit for how long a PHP script will run. And when a script reaches the maximum time limit then it throws the error of Maximum Execution Time Exceeded.
How to fix this?
The process of fixing this is error is quite simple and easy. We can fix this error by editing the .htaccess file inside the project directory. Just follow the steps below: –
- Open the .htaccess file with your favorite editor from your projects directory.
- Just add this code inside the .htaccess file :
php_value max_execution_time 300
This line of code actually increases the time limit of the execution of PHP scripts from 30 seconds to 300 seconds that is 5 minutes.
NOTE : If someone still gets this error, then increase the time limit from 300 to something more like 500 or 600.