{"id":7854,"date":"2026-04-21T10:27:33","date_gmt":"2026-04-21T08:27:33","guid":{"rendered":"https:\/\/mybox.com\/help\/?post_type=manual_kb&#038;p=7854"},"modified":"2026-04-21T10:27:37","modified_gmt":"2026-04-21T08:27:37","slug":"what-is-max_execution_time-and-when-should-you-increase-it","status":"publish","type":"manual_kb","link":"https:\/\/mybox.com\/help\/en\/knowledgebase\/what-is-max_execution_time-and-when-should-you-increase-it\/","title":{"rendered":"What is max_execution_time and when should you increase it"},"content":{"rendered":"\n<div class=\"translation-block translation-block-merged\">\n<p class=\"wp-block-paragraph\">In the context of your <strong>mybox<\/strong> server, <code>max_execution_time<\/code> is the &#8220;stopwatch&#8221; that the server uses to monitor every PHP script. If a script\u2014like an image processor or a data importer\u2014takes too long to finish its job, the server kills it to prevent it from hogging resources indefinitely.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In <strong>April 2026<\/strong>, as we integrate more complex AI processing and heavy data syncing into our websites, the default <strong>30-second<\/strong> limit is often the first hurdle developers encounter.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/what-is-max_execution_time-and-when-should-you-increase-it\/#When_is_an_Increase_Necessary\" >When is an Increase Necessary?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/what-is-max_execution_time-and-when-should-you-increase-it\/#How_to_Increase_the_Limit_on_mybox\" >How to Increase the Limit on mybox<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/what-is-max_execution_time-and-when-should-you-increase-it\/#Recommended_Time_Limits_for_2026\" >Recommended Time Limits for 2026<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/what-is-max_execution_time-and-when-should-you-increase-it\/#A_Word_of_Caution_Performance_vs_Stability\" >A Word of Caution: Performance vs. Stability<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/what-is-max_execution_time-and-when-should-you-increase-it\/#Summary\" >Summary<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"When_is_an_Increase_Necessary\"><\/span><strong>When is an Increase Necessary?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<\/div>\n\n<div id=\"mybox-944531806\" class=\"mybox-content mybox-entity-placement\"><div class=\"early-access-banner-inpost\">\r\n  <div class=\"banner-left-inpost\">\r\n    <div class=\"icon-box-inpost\">\r\n      <img decoding=\"async\" src=\"https:\/\/mybox.com\/help\/wp-content\/uploads\/2026\/02\/square-info-icon.svg\" alt=\"Info\">\r\n    <\/div>\r\n    <div class=\"text-box-inpost\">\r\n      <span class=\"label-inpost\"><span class=\"translation-block translation-block-banner-text\">Early access<\/span><\/span>\r\n      <h4><span class=\"translation-block translation-block-banner-text\">Still need help?<\/span><\/h4>\r\n      <p><span class=\"translation-block translation-block-banner-text\">Contact our customer service team.<\/span><\/p>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div class=\"banner-right-inpost\">\r\n    <a href=\"https:\/\/panel.mybox.com\/helpdesk2\/v\/list\/\" class=\"banner-button-inpost\"><span class=\"translation-block translation-block-banner-text\">Message us<\/span><\/a>\r\n  <\/div>\r\n<\/div><\/div>\n\n<div class=\"translation-block translation-block-merged\"><p class=\"wp-block-paragraph\">You will know you need to adjust this when you see the error: <strong>&#8220;Fatal error: Maximum execution time of X seconds exceeded.&#8221;<\/strong> Common scenarios on <strong>mybox<\/strong> include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Heavy WordPress Updates:<\/strong> Large theme or core updates that require significant file unzipping and database rewriting.<\/li>\n\n\n\n<li><strong>E-commerce Imports:<\/strong> Syncing product stock from an external XML or CSV feed into PrestaShop or WooCommerce.<\/li>\n\n\n\n<li><strong>Backup Generation:<\/strong> Creating a full site archive where the compression process takes several minutes.<\/li>\n\n\n\n<li><strong>Image Optimization:<\/strong> Running a batch process to convert hundreds of images to WebP format.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Increase_the_Limit_on_mybox\"><\/span><strong>How to Increase the Limit on mybox<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Since you cannot modify the global server configuration, you apply this change at the site level.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>The .htaccess Method (Global for the site)<\/strong><\/h4>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Connect to your mybox account via FTP.<\/li>\n\n\n\n<li>Navigate to your <code>public_html<\/code> folder.<\/li>\n\n\n\n<li>Edit your <code>.htaccess<\/code> file and add this line:<code>php_value max_execution_time 300<\/code><em>(This sets the limit to 5 minutes. While the example text suggests 5000, it is safer to start lower to prevent runaway scripts from crashing your Elastic resources.)<\/em><\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>The wp-config.php Method (WordPress specific)<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively, you can sometimes set this within WordPress by adding this line:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>set_time_limit(300);<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Recommended_Time_Limits_for_2026\"><\/span><strong>Recommended Time Limits for 2026<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Task<\/strong><\/td><td><strong>Recommended Time<\/strong><\/td><td><strong>Why?<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Standard Browsing<\/strong><\/td><td>30 \u2013 60s<\/td><td>Keeps the server snappy and kills &#8220;stuck&#8221; scripts.<\/td><\/tr><tr><td><strong>Plugin Updates<\/strong><\/td><td>120 \u2013 300s<\/td><td>Allows enough time for large file extractions.<\/td><\/tr><tr><td><strong>Large Data Imports<\/strong><\/td><td>600 \u2013 1200s<\/td><td>Necessary for processing thousands of products\/rows.<\/td><\/tr><tr><td><strong>Emergency Tasks<\/strong><\/td><td>0 (Unlimited)<\/td><td><strong>Not recommended<\/strong>; only use temporarily for massive migrations.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"A_Word_of_Caution_Performance_vs_Stability\"><\/span><strong>A Word of Caution: Performance vs. Stability<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Increasing the <code>max_execution_time<\/code> is a &#8220;fix,&#8221; but it can also be a &#8220;symptom-hider&#8221;:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Infinite Loops:<\/strong> If a script has a bug that makes it run forever, a high limit means it will consume your <strong>mybox<\/strong> CPU resources for a longer time, potentially increasing your costs.<\/li>\n\n\n\n<li><strong>Slow Queries:<\/strong> Sometimes a script is slow because the database is unoptimized. Fixing the database query is always better than just giving the script more time to run poorly.<\/li>\n\n\n\n<li><strong>The 504 Gateway Timeout:<\/strong> If you set PHP to run for 5000 seconds, but your browser or a proxy (like Cloudflare) is set to 60 seconds, you will still see a &#8220;Timeout&#8221; error in your browser even if the script is still running in the background.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Summary\"><\/span><strong>Summary<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>max_execution_time<\/code> is a safety valve. For most intensive tasks on <strong>mybox<\/strong>, increasing this to <strong>300 or 600 seconds<\/strong> via <code>.htaccess<\/code> provides a perfect balance between allowing your tasks to finish and keeping your server resources protected.<\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"template":"","format":"standard","manualknowledgebasecat":[28],"manual_kb_tag":[8578,9088,9122,9123,9124,9125,638,718,3896,3902],"class_list":["post-7854","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-others","manual_kb_tag-server-timeout","manual_kb_tag-mybox-server","manual_kb_tag-php-timeout","manual_kb_tag-long-running-scripts","manual_kb_tag-script-execution-limit","manual_kb_tag-increase-execution-time","manual_kb_tag-wp-config-file","manual_kb_tag-htaccess-file","manual_kb_tag-max-execution-time","manual_kb_tag-set-time-limit"],"_links":{"self":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/7854","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/7854\/revisions"}],"predecessor-version":[{"id":7855,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/7854\/revisions\/7855"}],"wp:attachment":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/media?parent=7854"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manualknowledgebasecat?post=7854"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb_tag?post=7854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}