{"id":207,"date":"2025-12-17T09:41:31","date_gmt":"2025-12-17T08:41:31","guid":{"rendered":"https:\/\/mybox.com\/help\/?post_type=manual_kb&#038;p=207"},"modified":"2026-02-13T15:09:33","modified_gmt":"2026-02-13T14:09:33","slug":"error-maximum-execution-time-exceeded-in-wordpress-causes-and-solutions","status":"publish","type":"manual_kb","link":"https:\/\/mybox.com\/help\/en\/knowledgebase\/error-maximum-execution-time-exceeded-in-wordpress-causes-and-solutions\/","title":{"rendered":"Error &#8220;Maximum Execution Time Exceeded&#8221; in WordPress &#8211; causes and solutions"},"content":{"rendered":"\n<div class=\"translation-block translation-block-merged\">\n<p class=\"wp-block-paragraph\">Error <strong>&#8220;Maximum Execution Time Exceeded&#8221;<\/strong> in WordPress can be a frustrating problem both for beginners, as well as experienced users. It occurs when when a script PHP needs more time to execute, than is allowed by the settings of the server. As a result the user sees an error instead of the expected result of the action of the page. In this article we will explain what exactly this error is, what its causes are and how to effectively resolve it. <\/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-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/error-maximum-execution-time-exceeded-in-wordpress-causes-and-solutions\/#What_is_the_%E2%80%9CMaximum_Execution_Time_Exceeded%E2%80%9D_error\" >What is the &#8220;Maximum Execution Time Exceeded&#8221; error?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/error-maximum-execution-time-exceeded-in-wordpress-causes-and-solutions\/#Reasons_for_the_error\" >Reasons for the error<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/error-maximum-execution-time-exceeded-in-wordpress-causes-and-solutions\/#How_to_fix_the_%E2%80%9CMaximum_Execution_Time_Exceeded%E2%80%9D_error\" >How to fix the &#8220;Maximum Execution Time Exceeded&#8221; error?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/error-maximum-execution-time-exceeded-in-wordpress-causes-and-solutions\/#Preventing_the_%E2%80%9CMaximum_Execution_Time_Exceeded%E2%80%9D_error\" >Preventing the &#8220;Maximum Execution Time Exceeded&#8221; error<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/error-maximum-execution-time-exceeded-in-wordpress-causes-and-solutions\/#Summary\" >Summary<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_the_%E2%80%9CMaximum_Execution_Time_Exceeded%E2%80%9D_error\"><\/span>What is the &#8220;Maximum Execution Time Exceeded&#8221; error?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">PHP, the language in which WordPress is written, runs on the server and has a time limit set for the execution of each script. By default, this is usually 30 seconds. If the script does not complete within this time, the process is automatically interrupted to prevent excessive server load.<\/p>\n\n\n\n<\/div>\n\n<div id=\"mybox-3315159391\" 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\">This error manifests itself in various forms, such as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Fatal error: Maximum execution time of 30 seconds exceeded in \/path\/to\/your\/file.php on line X<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Fatal error: Maximum execution time of 60 seconds exceeded in \/home\/user\/public_html\/wp-includes\/class-phpmailer.php<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Reasons_for_the_error\"><\/span>Reasons for the error<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">1. Low limit time execution script<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The main reason is low <strong>limit time execution<\/strong> (English <em>max execution time<\/em>). By default servers set it to 30 seconds, which in many cases is sufficient. However for more resource-intensive operations, such as updating plugins, importing large CSV files, or creating backup copies backups, time this may prove to be too short.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Plugins and themes that require a lot of resources<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Some plugins, especially those involved in data analysis, backup, or optimization, may require more time to perform their tasks. Themes with complex structures can also cause longer loading times.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3. Server issues<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">On shared hosting servers, resources are limited. If many websites are running on the same server, it can slow down your website, increasing the risk of errors. Problems can also be related to suboptimal server configuration or load from other processes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_fix_the_%E2%80%9CMaximum_Execution_Time_Exceeded%E2%80%9D_error\"><\/span>How to fix the &#8220;Maximum Execution Time Exceeded&#8221; error?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Below are a few methods you can try to increase the timeout limit and fix the problem.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1. Change the time limit in the file <code>.htaccess<\/code><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">File <code>.htaccess<\/code> This is an Apache server configuration file used by WordPress for settings related to permalinks and optimization. It can also be used to increase the execution time limit for PHP scripts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following line of code to your file <code>.htaccess<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php_value max_execution_time 300<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Tip: Be sure to edit the <code>.htaccess<\/code>file carefully, as incorrect changes may cause problems with the website&#8217;s functionality.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2. Changing the time limit in the file <code>wp-config.php<\/code><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>wp-config.php<\/code> This is the file where WordPress stores its configuration settings, including the database connection. You can increase the execution timeout by adding the following code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>set_time_limit(300);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add it before the line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* That's it, finish editing here! Happy blogging. *\/<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3. Modify the file <code>php.ini<\/code><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">In the case of mybox, we do not provide this type of editing, but some service providers allow you to edit the PHP configuration file named <code>php.ini<\/code>.<br>You can then change the limit. Find the line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>max_execution_time = 30<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">And change the value to a higher one, e.g.:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>max_execution_time = 300<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After making changes, save the file and restart the server for the new settings to take effect.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4. Contacting Customer Service<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If the above methods do not work or you do not have access to the relevant configuration files, please contact our support team by opening a ticket via the mybox panel in the 24-hour Helpdesk section.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Preventing_the_%E2%80%9CMaximum_Execution_Time_Exceeded%E2%80%9D_error\"><\/span>Preventing the &#8220;Maximum Execution Time Exceeded&#8221; error<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">WordPress site optimization <\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Regular website optimization can help you avoid this error in the future. Here are some steps you can take:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Regular database cleaning: Removing unnecessary data, such as spam comments, old versions of posts, or unused metadata, can speed up your website.<\/li>\n\n\n\n<li>Removing unnecessary plugins: Each additional plugin increases the load on the server. Only use those that are really necessary and update them regularly.<\/li>\n\n\n\n<li>Image optimization: Large, unoptimized images can slow down page load times. Use plugins such as Smush or Imagify to automatically compress images.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Choosing the right hosting plan<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If your website frequently experiences timeout issues, consider upgrading your package from OneBox to FlexBox, or if you already have FlexBox, activate the scaling option to automatically obtain additional resources when needed.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Server performance monitoring<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">You can monitor the performance of your website and server using plugins such as Query Monitor or WP Server Stats. These plugins allow you to easily identify the processes that consume the most resources and optimize their performance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Summary\"><\/span>Summary<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The &#8220;Maximum Execution Time Exceeded&#8221; error is one of the most common challenges WordPress users face. Fortunately, there are many ways to fix it \u2014 from simple changes to configuration files to optimizing the entire website and contacting your hosting provider. Regular website optimization, performance monitoring, and choosing the right hosting can significantly reduce the risk of this problem occurring in the future.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the problem persists, it is worth analyzing which plugins or themes cause the greatest load and considering optimizing or replacing them. With the right actions, your website can run faster and more stably, avoiding errors that can negatively impact the user experience.<\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"template":"","format":"standard","manualknowledgebasecat":[25,58],"manual_kb_tag":[638,718,3895,3896,3897,3898,3899,3900,3901,3902],"class_list":["post-207","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-hosting","manualknowledgebasecat-web-applications-cms","manual_kb_tag-wp-config-file","manual_kb_tag-htaccess-file","manual_kb_tag-maximum-execution-time","manual_kb_tag-max-execution-time","manual_kb_tag-php-time-limit","manual_kb_tag-increase-max-execution-time","manual_kb_tag-timeout-error","manual_kb_tag-fatal-error-maximum-execution-time","manual_kb_tag-php-ini-file","manual_kb_tag-set-time-limit"],"_links":{"self":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/207","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":3,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/207\/revisions"}],"predecessor-version":[{"id":4899,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/207\/revisions\/4899"}],"wp:attachment":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/media?parent=207"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manualknowledgebasecat?post=207"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb_tag?post=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}