Are you looking to increase PHP Time Limit in WordPress?
During WordPress-ing, you may encounter ‘Maximum execution time of 30 seconds exceeded’ or ‘Maximum execution time of 60 seconds exceeded’.
It means that the task executed is taking more time than the PHP has assigned.
In this short tutorial article, I will show you how you can increase the PHP Time Limit.
What is PHP Time Limit?
As WordPress built on PHP, there is a lot of PHP execution going on in the background. To keep everything in order, WordPress developers add the PHP Time Limit.
PHP Time Limit caps the time that could be spent on one task to execute. If that script or code does not load under that time, the PHP will show the time out.
If the operation is critical to load the page, it will return the fatal error showing that the PHP has run out of the time.
You can quickly increase that time. However, the PHP operation should not take more than 3-4 seconds.
Increase PHP Time Limit by using wp-config.php
You have to edit the wp-config.php file from the WordPress core folder.
Go to your cPanel and open the File Manager. In the root folder, you will find the wp-config.php.
Edit the file and add the following line of code into it.
Hit the save button to save changes. Come back to your site to check if it is still showing the error.
Increase PHP Time Limit using .htaccess
If you do not want to make changes in the config.php file, you can increase the PHP time limit with the .htaccess file.
You can edit the .htaccess file from the WordPress dashboard or backend file manager.
Whichever way you choose, you have to paste the following code into the .htaccess file.
Save the changes, and check if the error is gone. Most of the time, this will solve the error of the time limit.
Contact the Host
Sometimes, the hosting provider does not let the users increase the PHP time limit.
If you cannot do it by editing the .htaccess file or wp-config.php file, you should contact your host.
Just connect with your hosting company. A quality hosting provider will do it gladly.
Getting error due to the low PHP time limit could be irritating.
In this quick post, I mentioned the easiest methods to increase the WordPress site’s PHP time limit.
I hope it helps you, and if there are any questions and doubts, please leave them in the comment box.