{"id":24484,"date":"2022-01-27T08:00:38","date_gmt":"2022-01-27T06:00:38","guid":{"rendered":"https:\/\/vipestudio.com\/how-to-fix-the-max-execution-time-error-on-wordpress-increasing-the-limit-part-2\/"},"modified":"2022-01-27T08:00:38","modified_gmt":"2022-01-27T06:00:38","slug":"how-to-fix-the-max-execution-time-error-on-wordpress-increasing-the-limit-part-2","status":"publish","type":"post","link":"https:\/\/vipestudio.com\/en\/how-to-fix-the-max-execution-time-error-on-wordpress-increasing-the-limit-part-2\/","title":{"rendered":"How to Fix the Max Execution Time Error on WordPress: Increasing the Limit (Part 2)"},"content":{"rendered":"<p style=\"text-align: left;\">And\u2026. We&#8217;re back, wrapping up this series on handling the WordPress <strong>max_execution_time<\/strong> fatal error. In the <a href=\"https:\/\/vipestudio.com\/en\/how-to-fix-the-max-execution-time-error-on-wordpress-uninstalling-the-culprits-part-1\/\" target=\"_blank\" rel=\"noopener\">preceding part<\/a>, we described how the error occurs, and how we can remove the element that&#8217;s the cause of the error. This time, we&#8217;ll be taking a different approach \u2013 actually increasing the time limit \u2013 either with a plugin, by making changes to some files, or by just contacting your host. Read on to find out!<\/p>\n<p><img decoding=\"async\" class=\"size-medium wp-image-22677 aligncenter\" src=\"https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/PAGE_137-ai.png\" alt=\"\" width=\"300\" height=\"240\" srcset=\"https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/PAGE_137-ai.png 5000w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/PAGE_137-ai-300x240.png 300w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/PAGE_137-ai-1024x819.png 1024w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/PAGE_137-ai-768x614.png 768w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/PAGE_137-ai-1536x1229.png 1536w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/PAGE_137-ai-2048x1638.png 2048w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/PAGE_137-ai-513x410.png 513w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/PAGE_137-ai-476x381.png 476w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/PAGE_137-ai-218x174.png 218w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2 style=\"text-align: left;\">Increase the Time Limit with a Plugin<\/h2>\n<p style=\"text-align: left;\">As discussed previously, this time limit exists for a good reason \u2013 protecting your server from unoptimized elements like <a href=\"https:\/\/vipestudio.com\/en\/5-popular-lms-wordpress-themes-to-use-in-2022\/\" target=\"_blank\" rel=\"noopener\">themes<\/a> and increasing your website <a href=\"https:\/\/vipestudio.com\/en\/viptor-says-data-privacy-week-january-24-28-2022-and-its-importance-on-wordpress\/\" target=\"_blank\" rel=\"noopener\">security<\/a>.<\/p>\n<p style=\"text-align: left;\">On the other hand, sometimes you legitimately need to give a particularly heavy element a little more time, or your hosting provider may have set a particularly sort time limit, so you&#8217;d be justified in increasing the time limit.<\/p>\n<p style=\"text-align: left;\">The quick way is a plugin that modifies the execution time configuration without having to actually access those files directly. For instance, you could use one of the many all-round plugins \u2013 such as <a href=\"https:\/\/wordpress.org\/plugins\/google-pagespeed-insights\/\" target=\"_blank\" rel=\"noopener\">Google PageSpeed Insights<\/a>\u00a0\u2013 where the <strong>max_execution_time<\/strong> value can be increased.<\/p>\n<p style=\"text-align: left;\">You could also try a dedicated plugin like <a href=\"https:\/\/wordpress.org\/plugins\/wp-maximum-execution-time-exceeded\/\" target=\"_blank\" rel=\"noopener\">WP Maximum Execution Time Exceeded<\/a> that, once installed, edits the .htaccess file and sets the time limit to a whole 5 minutes by default. This is pretty generous, and any time you need to revert to your original limit, you just need to uninstall the plugin.<\/p>\n<p style=\"text-align: left;\">For more customized time limits, talk to your WordPress agency for development and they will usually handle it for you, but if the hands-on method will need editing a few files in WordPress via (preferably Secure) FTP.<\/p>\n<p><img decoding=\"async\" class=\"size-medium wp-image-22675 aligncenter\" src=\"https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/Technical_support_team_correcting_ERROR_Service_error_and_page_not_found_concept-ai.png\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/Technical_support_team_correcting_ERROR_Service_error_and_page_not_found_concept-ai.png 5000w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/Technical_support_team_correcting_ERROR_Service_error_and_page_not_found_concept-ai-300x300.png 300w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/Technical_support_team_correcting_ERROR_Service_error_and_page_not_found_concept-ai-1024x1024.png 1024w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/Technical_support_team_correcting_ERROR_Service_error_and_page_not_found_concept-ai-150x150.png 150w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/Technical_support_team_correcting_ERROR_Service_error_and_page_not_found_concept-ai-768x768.png 768w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/Technical_support_team_correcting_ERROR_Service_error_and_page_not_found_concept-ai-1536x1536.png 1536w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/Technical_support_team_correcting_ERROR_Service_error_and_page_not_found_concept-ai-2048x2048.png 2048w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/Technical_support_team_correcting_ERROR_Service_error_and_page_not_found_concept-ai-410x410.png 410w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/Technical_support_team_correcting_ERROR_Service_error_and_page_not_found_concept-ai-381x381.png 381w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/Technical_support_team_correcting_ERROR_Service_error_and_page_not_found_concept-ai-174x174.png 174w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2 style=\"text-align: left;\">Increase the Time Limit by Editing Files \u2013 wp-config.php<\/h2>\n<p style=\"text-align: left;\">For this first way, we&#8217;ll edit wp-config.php. Once you&#8217;ve opened the WordPress root directory over FTP, locate the &#8216;public&#8217; folder and open it to reveal the file in question. Open it for editing and insert this line of code:<\/p>\n<p style=\"text-align: left;\"><strong>set_time_limit(240)<\/strong>;<\/p>\n<p style=\"text-align: left;\">Preferably placing it at the end, right before it says &#8216;stop editing&#8217;, though the exact position isn&#8217;t an issue because the existing contents of the file are untouched. Save the file and reupload it if needed, and the time limit is now 4 minutes (or any other value you choose). Of course, ensure that the error has been dealt with.<\/p>\n<p><img decoding=\"async\" class=\"size-medium wp-image-22679 aligncenter\" src=\"https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/8682-ai.png\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/8682-ai.png 1350w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/8682-ai-300x300.png 300w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/8682-ai-1024x1024.png 1024w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/8682-ai-150x150.png 150w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/8682-ai-768x768.png 768w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/8682-ai-410x410.png 410w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/8682-ai-381x381.png 381w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/8682-ai-174x174.png 174w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/>error fix<\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"text-align: left;\">Increase the Time Limit by Editing Files \u2013 .htaccess<\/h2>\n<p style=\"text-align: left;\">In the same &#8216;public&#8217; folder, there&#8217;s .htaccess, especially if you&#8217;re using a shared host that runs on Apache. Backup the file, open it for editing, and insert this code:<\/p>\n<p style=\"text-align: left;\"><strong>php_value max_execution_time 240<\/strong><\/p>\n<p style=\"text-align: left;\">Use any other value you&#8217;d like, of course. Save and reupload .htaccess to the &#8216;public&#8217; folder over FTP, and verify that the error no longer appears.<\/p>\n<p><img decoding=\"async\" class=\"size-medium wp-image-22718 aligncenter\" src=\"https:\/\/vipestudio.com\/wp-content\/uploads\/2021\/10\/4048512-ai.png\" alt=\"\" width=\"300\" height=\"200\" \/><\/p>\n<h2 style=\"text-align: left;\">Increase the Time Limit by Editing Files \u2013 php.ini<\/h2>\n<p style=\"text-align: left;\">Next on our list is a less common file. If you find it in the &#8216;public&#8217; folder, php.ini is another way we can increase the execution time available. On FTP, open the file and edit it by adding the code:<\/p>\n<p style=\"text-align: left;\"><strong>max_execution_time = 240<\/strong><\/p>\n<p style=\"text-align: left;\">Feel free to use any value, but once the file is saved and re-uploaded, do check that you&#8217;ve fixed the error.<\/p>\n<h2 style=\"text-align: left;\">Increase the Time Limit by Talking to Your Host<\/h2>\n<p style=\"text-align: left;\">On a dedicated server, all these methods will work great, but some shared hosts would want to protect their server, and may not even allow you to modify the execution time limit. In this case, contact your WordPress agency for development, or the hosting support directly, and inform them about the error you&#8217;re facing. Request the <a href=\"https:\/\/vipestudio.com\/en\/is-there-any-difference-between-web-hosting-and-wordpress-hosting\/\" target=\"_blank\" rel=\"noopener\">hosting provider<\/a> to increase the time limit to somewhere in the 1-to-5-minute range, and if they can, that ought to be the last you see of this error.<\/p>\n<p><img decoding=\"async\" class=\"size-medium wp-image-22673 aligncenter\" src=\"https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/upp16-ai.png\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/upp16-ai.png 4000w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/upp16-ai-300x300.png 300w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/upp16-ai-1024x1024.png 1024w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/upp16-ai-150x150.png 150w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/upp16-ai-768x768.png 768w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/upp16-ai-1536x1536.png 1536w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/upp16-ai-2048x2048.png 2048w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/upp16-ai-410x410.png 410w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/upp16-ai-381x381.png 381w, https:\/\/vipestudio.com\/wp-content\/uploads\/2022\/01\/upp16-ai-174x174.png 174w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2 style=\"text-align: left;\">Effortlessly resolved<\/h2>\n<p style=\"text-align: left;\">Heavy PHP scripts in a WordPress element can bog your server down, and sometimes even trigger this error, causing you some trouble both in the backend and frontend. However, we hope that thanks to this tutorial, you now know it is hardly <strong>&#8216;fatal&#8217;<\/strong> and effortlessly resolved.<\/p>\n<p style=\"text-align: left;\">We&#8217;ll see you next time, with more tutorials and tips from our team here at Vipe Studio.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>And\u2026. We&#8217;re back, wrapping up this series on handling the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":23600,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[113],"tags":[601,1717,1737,1191,1757,108,1219],"class_list":["post-24484","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-website-wordpress-development","tag-error","tag-error-fix","tag-fatal-error","tag-fix","tag-max-execution-time-error","tag-plugin","tag-wordpress-error"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/posts\/24484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/comments?post=24484"}],"version-history":[{"count":0,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/posts\/24484\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/media\/23600"}],"wp:attachment":[{"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/media?parent=24484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/categories?post=24484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/tags?post=24484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}