{"id":708,"date":"2017-03-15T00:00:00","date_gmt":"2017-03-15T00:00:00","guid":{"rendered":"http:\/\/blog.hostinger.io\/hostinger-tutorials\/uncategorized\/how-to-fix-maximum-execution-time-exceeded-error-wordpress\/"},"modified":"2025-12-22T14:25:29","modified_gmt":"2025-12-22T14:25:29","slug":"how-to-fix-maximum-execution-time-exceeded-error-wordpress","status":"publish","type":"post","link":"\/tutorials\/how-to-fix-maximum-execution-time-exceeded-error-wordpress","title":{"rendered":"How to fix fatal Error: max_execution_time exceeded Error in WordPress"},"content":{"rendered":"<p>Are you getting a <strong>Fatal Error: max_execution_time exceeded<\/strong> message while using WordPress?&nbsp; No worries. It simply means that the PHP script you run takes longer to complete than the limit allows. Read on to find out how to debug this WordPress issue.<\/p><p class=\"has-text-align-center\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Mega-WordPress-Cheat-EN.pdf\" target=\"_blank\" rel=\"noopener\">Download all-in-one WordPress cheat sheet<\/a><\/p><p>\n\n\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-solving-max-execution-time-wordpress-error\">Solving Max Execution Time WordPress Error<\/h2><p>There are three methods that you can use to fix the max execution time error in WordPress: <strong>editing the .htaccess file, <\/strong><strong>changing the time limit via the control panel,<\/strong> and&nbsp;<strong>installing a plugin.<\/strong><\/p><h3 class=\"wp-block-heading\" id=\"h-manually-editing-htaccess-file\">Manually Editing .htaccess File<\/h3><p>By default, the max_execution_time is usually set to 30 seconds. If your PHP scripts need more time, then you need to edit the value in the <strong>.htaccess<\/strong> file.<\/p><p>Here&rsquo;s how to do it:<\/p><ol class=\"wp-block-list\">\n<li>Open the <strong>File Manager<\/strong> in Hostinger&rsquo;s hPanel and navigate to the <strong>public_html<\/strong> directory.<\/li>\n\n\n\n<li>Double-click the <strong>.htaccess<\/strong> file.<\/li>\n\n\n\n<li>Insert the following code into the bottom of your <strong>.htaccess <\/strong>file:\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">php_value max_execution_time 60<\/pre>\n<\/li>\n\n\n\n<li>Press&nbsp;<strong>Save and Close.<\/strong><strong><br><\/strong><\/li>\n<\/ol><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Pro Tip<\/h4>\n                    <p> If you're still getting the same error, you can try increasing the value to 120-180 seconds <\/p>\n                <\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-changing-max-execution-time-value-via-hpanel\">Changing max_execution_time value via hPanel<\/h3><p>You can also increase the WordPress <strong>max_execution_time<\/strong> directly from <strong>PHP Configurations&nbsp;<\/strong>in hPanel.<\/p><ol class=\"wp-block-list\">\n<li>Login to Hostinger&rsquo;s hPanel and navigate to <strong>PHP Configurations<\/strong> under the <strong>Advanced <\/strong>section.<\/li>\n\n\n\n<li>Select the<strong> PHP Options<\/strong> tab and scroll down until you find the&nbsp;<strong>max_execution_time<\/strong> option.<\/li>\n\n\n\n<li>Increase the default value as needed and click <strong>Save.<\/strong><\/li>\n<\/ol><p>That&rsquo;s it &mdash; you have successfully increased the WordPress <strong>max_execution_time<\/strong> limit of your PHP script!<\/p><h3 class=\"wp-block-heading\" id=\"h-installing-a-plugin-to-increase-execution-time-limit\">Installing a Plugin to Increase Execution Time Limit<\/h3><p>An easy way to fix the WordPress max_execution_time error is by using a plugin. We recommend using <a href=\"https:\/\/wordpress.org\/plugins\/google-pagespeed-insights\/\" target=\"_blank\" rel=\"noreferrer noopener\">Google Pagespeed Insights<\/a> as it is straightforward and the developer updates it regularly.<\/p><ol class=\"wp-block-list\">\n<li><a href=\"\/tutorials\/wordpress\/how-to-install-wordpress-plugins\">Install the plugin<\/a> for <strong>Google Pagespeed Insights<\/strong> from your WordPress dashboard and activate it.<\/li>\n\n\n\n<li>Navigate to&nbsp;<strong>Tools -&gt; Pagespeed Insights.<\/strong> Scroll down, find <strong>Advanced Configuration<\/strong>, and change the maximum execution time as needed. However, we recommend using the default settings as they will work fine on most websites.<img decoding=\"async\" width=\"1024\" height=\"304\" class=\"aligncenter wp-image-20507 size-large\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2017\/03\/advanced-settings-1024x304.png\" alt=\"this image shows you the advanced settings of Google PageSpeed Plugin\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2017\/03\/advanced-settings.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2017\/03\/advanced-settings.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2017\/03\/advanced-settings.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2017\/03\/advanced-settings.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2017\/03\/advanced-settings.png\/w=990,fit=scale-down 990w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2017\/03\/advanced-settings.png\/w=1140,fit=scale-down 1140w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/li>\n\n\n\n<li>Click <strong>Save Options<\/strong> and the plugin will automatically modify the<strong> .htaccess <\/strong>file.<\/li>\n<\/ol><p>Should you want to undo any changes, simply deactivate the plugin and all the changes made to <strong>.htaccess<\/strong> will be removed.<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>You&rsquo;ve learned three easy ways to fix the WordPress <strong>max_execution_time<\/strong> error. Here&rsquo;s a quick recap of those methods:<\/p><ol class=\"wp-block-list\">\n<li>Insert the <strong>php_value max_execution_time 60 <\/strong>code into&nbsp;the <strong>.htaccess<\/strong> file.<\/li>\n\n\n\n<li>Extend the limit directly through PHP Configurations in hPanel.<\/li>\n\n\n\n<li>Increase the time limit by using Google Pagespeed Insights plugin.<\/li>\n<\/ol><p>There you have it, easy and quick fixes! If you&rsquo;re using shared hosting services and none of the solutions worked for you, contact your hosting provider and ask if it&rsquo;s possible to increase the maximum execution time. Good luck!<\/p><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-wordpress-hosting\" href=\"\/wordpress-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"2048\" height=\"600\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/public\" alt=\"\" class=\"wp-image-111781\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=2048,fit=scale-down 2048w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=1536,fit=scale-down 1536w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Are you getting a Fatal Error: max_execution_time exceeded message while using WordPress?&nbsp; No worries. It simply means that the PHP [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/tutorials\/how-to-fix-maximum-execution-time-exceeded-error-wordpress\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"Fixing max_execution_time Error in WordPress","rank_math_description":"Are you getting the WordPress max_execution_time error? Don't worry, this tutorial will show you three simple solutions for it!","rank_math_focus_keyword":"max_execution_time wordpress","footnotes":""},"categories":[22640,22637],"tags":[],"class_list":["post-708","post","type-post","status-publish","format-standard","hentry","category-security-and-maintenance","category-wordpress"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-fix-maximum-execution-time-exceeded-error-wordpress","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/como-corrigir-erro-fatal-tempo-maximo-de-execucao-excedido-no-wordpress","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/max-execution-time-wordpress","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/como-solucionar-el-error-max-execution-time-exceeded-en-wordpress","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/cara-mengatasi-error-maximum-execution-time","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-fix-maximum-execution-time-exceeded-error-wordpress","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-fix-maximum-execution-time-exceeded-error-wordpress","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-fix-maximum-execution-time-exceeded-error-wordpress","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/como-solucionar-el-error-max-execution-time-exceeded-en-wordpress\/","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/como-solucionar-el-error-max-execution-time-exceeded-en-wordpress\/","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/como-solucionar-el-error-max-execution-time-exceeded-en-wordpress\/","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/como-corrigir-erro-fatal-tempo-maximo-de-execucao-excedido-no-wordpress","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-fix-maximum-execution-time-exceeded-error-wordpress","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-fix-maximum-execution-time-exceeded-error-wordpress","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-fix-maximum-execution-time-exceeded-error-wordpress","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-fix-maximum-execution-time-exceeded-error-wordpress","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/708","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/comments?post=708"}],"version-history":[{"count":21,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/708\/revisions"}],"predecessor-version":[{"id":138245,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/708\/revisions\/138245"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media?parent=708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/categories?post=708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/tags?post=708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}