WordPress is written mainly in PHP development language. To protect web servers from misuse, there is a restrict time limit set for how long a PHP program can run. Some hosting providers have set this value to a higher level while others may have set it to a lower level. When a script reaches the maximum execution time limit, it results into the error:
Fatal error: Maximum execution time of 20 seconds exceeded in wordpress\wp-includes/class-wp-image-editor.php on line 14
In this post we will show you how to fix this fatal error.
Editing php.ini file:
You can fix it manually by editing your php.ini file,Simply connect to your website using FTP and create php.ini file.
Next, add this line to your php.ini file:
"php_value max_execution_time 60"
That’s all. This code simply increase the maximum execution time to 60 seconds.
Editing .htaccess file:
Another simple way to increase the maximum execution time of PHP is by adding a simple rule in your .htaccess file.
To do that just open up your .htaccess file placed in your root directory and just add the below rule into your .htaccess file, save and upload it.
php_value max_execution_time 300
That’s all there is to do, you have successfully increased the PHP execution time.
It is so easy to fix a common “Maximum time execution exceeded.” error.
Hopefully that will helps and do comment below if you face any problems implementing these above mentioned steps.