If you even came across this error message “maximum execution time of 30 seconds exceeded……” while uploading a large image to wordpress or you have slow internet connection that takes longer than usual to upload an image then the solution to your problem is below.
1. The first thing that I do normally for myself and for my clients as a web developer is to add the following piece of code to the wp-config file located in the root of your wordpress installation.
set_time_limit(60);
Note: Remember to add this right above “/*That’s all, stop editing! Happy blogging.*/”
2. Second method to solve the above problem is by the following piece of code to your .htaccess file also located in the root directory of your wordpress installation.
php_value max_execution_time 60
3. And if you are either on localhost or you have access to the php.ini file or you are using wamp, xampp, or mamp, then you can solve your problem via this method as well. Just change the value of 30 to 60 or anything that looks fine to you. Normally the maximum execution time is 30 but you can increase it to meet your needs.
max_execution_time = 30;
Leave a Reply