{"id":9251,"date":"2020-07-12T15:00:17","date_gmt":"2020-07-12T13:00:17","guid":{"rendered":"https:\/\/qodeinteractive.com\/magazine\/?p=9251"},"modified":"2020-11-13T13:18:07","modified_gmt":"2020-11-13T12:18:07","slug":"503-service-temporarily-unavailable","status":"publish","type":"post","link":"https:\/\/qodeinteractive.com\/magazine\/503-service-temporarily-unavailable\/","title":{"rendered":"How to Fix the &#8220;503 Service Temporarily Unavailable&#8221; Error in WordPress"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]WordPress is the most popular CMS (Content Management Software) used today. That is, in large part, due to its straightforwardness and the low level of technical knowledge needed to get a website going. However, despite its user-friendliness, sometimes a WordPress site will encounter an error that can be difficult to solve. This is particularly the case with errors that offer little to no explanation as it makes them daunting for any newer user. The 503 Service Unavailable Error is one of those. It renders both your frontend and backend inaccessible, whilst (as you can see in the screenshot below) offering limited information. [\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/1-503-Service-Unavailable-Error.jpg\" class=\"attachment-full size-full\" alt=\"503 Service Unavailable Error\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/1-503-Service-Unavailable-Error.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/1-503-Service-Unavailable-Error-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/1-503-Service-Unavailable-Error-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]This error can also appear with the following error codes: 503 Error, HTTP 503, HTTP Error 503, HTTP Server Error 503, and HTTP\/1.1 Service Unavailable. As all these error codes don\u2019t give any clues regarding the issue, in this article we will show you probable causes and the tried-and-true steps for solving it:[\/vc_column_text][vc_empty_space height=&#8221;22px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#deactivate-all-plugins\">Deactivate all plugins<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#switch-to-a-default-theme\">Switch to a default theme<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#turn-on-and-review-your-error-log\">Turn on and review your error log<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#limit-wordpress-heartbeat\">Limit WordPress Heartbeat<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#limit-maximum-crawl-rate\">Limit Google\u2019s maximum crawl rate<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#disable-your-cdn\">Disable your CDN<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#contact-your-hosting-provider\">Contact your hosting provider<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;70px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">How to Solve the 503 Error<\/h2>\n<p>[\/vc_column_text][vc_column_text]The 503 Service Unavailable Error happens when you try to access a website, but the server hosting it isn\u2019t reachable. That\u2019s due to various reasons which can be loosely grouped into two categories \u2013 faulty coding and server issues. The reasons include issues with your plugins and theme, errors due to improper custom scripts, insufficient server resources, or sudden spikes of website traffic. The spike in traffic could be a real issue, caused by an influx of visitors to your website, or a false one, caused by a DDoS attack (Distributed Denial of Service attack). There are several possible approaches to fixing a 503 error. We\u2019ve divided the troubleshooting process into seven steps that will help you pinpoint the exact reason behind the error and solve it as efficiently as possible.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\"><a id=\"deactivate-all-plugins\"><\/a>Deactivate All Plugins<\/h3>\n<p>[\/vc_column_text][vc_column_text]Most frequently, the reason why a 503 error occurs is due to incompatibility issues between the many plugins a typical WordPress site might have. Therefore, the first and easiest step you can take while troubleshooting this issue is to deactivate all plugins. Since you won\u2019t be able to login to your dashboard directly, you would need to <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-use-ftp\/\">connect to the server via FTP<\/a>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<strong>Connect to your server<\/strong> using your FTP credentials and navigate to the <strong>root WordPress directory<\/strong> (often called <em>public_html<\/em>). Open the <strong>wp-content subdirectory<\/strong>, right-click on <strong>the plugins folder found<\/strong> within, and click on <strong>the <em>Rename<\/em> option<\/strong> in the dropdown.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/2-Rename-the-plugins-folder.jpg\" class=\"attachment-full size-full\" alt=\"Rename the plugins folder\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/2-Rename-the-plugins-folder.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/2-Rename-the-plugins-folder-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/2-Rename-the-plugins-folder-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>Rename the plugins folder<\/strong> (for example, <em>plugins.old<\/em> or <em>plugins.deactivated<\/em>) and <strong>check if the 503 Error persists<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/3-Deactivate-all-plugins.jpg\" class=\"attachment-full size-full\" alt=\"Deactivate all plugins\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/3-Deactivate-all-plugins.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/3-Deactivate-all-plugins-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/3-Deactivate-all-plugins-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>Renaming the plugins folder will deactivate all plugins. If the error no longer appears, the issue is caused by a faulty plugin. To pinpoint which one, you need to re-activate them all and then deactivate one by one while checking if the 503 error has gone.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Here are the steps you need to take. First, <strong>undo the name change for the plugin subdirectory<\/strong>, i.e. restore it to <em>plugins<\/em>. This will allow you to activate the plugins manually within your dashboard. To do so, navigate to <strong>Plugins &gt; Installed Plugins<\/strong> and <strong>activate all your plugins<\/strong> manually. Then, <strong>log out of your admin dashboard<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]The next step requires you to <strong>reconnect to your server<\/strong> using your FTP credentials and <strong>navigate to your plugins directory<\/strong> which should be located at <strong>your-site\/wp-content\/plugins\/<\/strong>. Select a plugin, <strong>right-click on the plugins\u2019 folder<\/strong> followed by clicking on <strong>the <em>Rename<\/em> option<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/4-Reconnect-to-your-server.jpg\" class=\"attachment-full size-full\" alt=\"Reconnect to your server\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/4-Reconnect-to-your-server.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/4-Reconnect-to-your-server-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/4-Reconnect-to-your-server-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>Rename the folder<\/strong> (for example, <em>plugin-name.old or plugin-name.deactivated<\/em>).[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/5-Deactivated.jpg\" class=\"attachment-full size-full\" alt=\"Deactivated\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/5-Deactivated.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/5-Deactivated-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/5-Deactivated-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Then try to <strong>log in to your dashboard<\/strong> again. If you are able to log in, you have found your culprit\u2014the plugin you previously deactivated by changing its folder name. If you weren\u2019t able to log in, <strong>repeat the same process for all plugins<\/strong>, one by one, until you find the faulty one. After establishing which plugin caused the issue, contact its developers for assistance.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\"><a id=\"switch-to-a-default-theme\"><\/a>Switch to a Default Theme<\/h3>\n<p>[\/vc_column_text][vc_column_text]Another likely reason for the 503 error is a faulty theme, so the next troubleshooting method is to deactivate it. <strong>For users who have multiple themes installed (including a default one like <em>Twenty Twenty<\/em>), simply deactivate your current theme via FTP. This will activate the default WordPress theme. Then, try to log to your admin dashboard once more. If you are successful, it indicates that the 503 error was caused by the theme you were using<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]You can deactivate your current theme by <strong>connecting to the server<\/strong> using your FTP credentials and locating the root WordPress directory. <strong>Navigate to the <em>\/wp-content\/themes\/<\/em> directory<\/strong>, right-click your current theme\u2019s directory and select <strong>the <em>Rename<\/em> option<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/6-Switch-to-a-default-theme.jpg\" class=\"attachment-full size-full\" alt=\"Switch to a default theme\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/6-Switch-to-a-default-theme.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/6-Switch-to-a-default-theme-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/6-Switch-to-a-default-theme-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Rename <strong>the theme directory<\/strong> and then try to <strong>log in to your dashboard<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/7-Rename-the-theme-directory.jpg\" class=\"attachment-full size-full\" alt=\"Rename the theme directory\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/7-Rename-the-theme-directory.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/7-Rename-the-theme-directory-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/7-Rename-the-theme-directory-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>If you don\u2019t have a default WordPress theme installed, there is an added step<\/strong>. You will have to download one from the WordPress repository first, upload it to your WordPress installation, and then deactivate your current theme.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]To complete this added step, navigate to <a href=\"https:\/\/wordpress.org\/themes\/\" target=\"_blank\" rel=\"noopener noreferrer\">the WordPress default theme repository<\/a>, <strong>pick a theme using the search filter, and download it<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/8-The-WordPress-default-theme-repository.jpg\" class=\"attachment-full size-full\" alt=\"The WordPress default theme repository\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/8-The-WordPress-default-theme-repository.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/8-The-WordPress-default-theme-repository-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/8-The-WordPress-default-theme-repository-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Locate the downloaded file\u2014it will be a zipped folder with the name <strong>theme-name.zip<\/strong> (theme-name being the actual name of the theme). It will most likely be <strong>in your Downloads folder<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]After you <strong>locate the .zip file, extract it. Connect to your server<\/strong> using your FTP credentials and navigate to the following path: <strong>your-site-url\/wp-content\/themes\/<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Drag and drop the unzipped <strong>theme-name folder<\/strong> and wait for it to upload.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<strong>Make sure not to put the new theme\u2019s folder inside the folder(s) of another theme!<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/9-Drag-and-drop-the-unzipped-theme-name-folder.jpg\" class=\"attachment-full size-full\" alt=\"Drag and drop the unzipped theme name folder\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/9-Drag-and-drop-the-unzipped-theme-name-folder.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/9-Drag-and-drop-the-unzipped-theme-name-folder-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/9-Drag-and-drop-the-unzipped-theme-name-folder-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>Then, test if your current theme is the source of the issue, by disabling it as described in the section above. If your site stops showing the 503 error while using a default WordPress theme, then you\u2019ll know your original theme was actually the reason for the issue. In that case, you should contact its developers for assistance.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;81px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_separator color=&#8221;custom&#8221; accent_color=&#8221;#f0f0f0&#8243;][vc_empty_space height=&#8221;50px&#8221;][vc_widget_sidebar sidebar_id=&#8221;top-picks-banner&#8221;][vc_empty_space height=&#8221;28px&#8221;][vc_separator color=&#8221;custom&#8221; accent_color=&#8221;#f0f0f0&#8243;][vc_empty_space height=&#8221;84px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\"><a id=\"turn-on-and-review-your-error-log\"><\/a>Turn on and Review Your Error Log<\/h3>\n<p>[\/vc_column_text][vc_column_text]If you weren\u2019t able to figure out the source of the 503 error by trying the first two suggested solutions, then inspecting any custom PHP code you might have added is your next go-to. However, as it could be quite hard to keep track of all the custom code you added over time, it is always best to <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-turn-on-error-logs-in-wordpress\/\">turn on debugging and review your error log<\/a> for clues. Furthermore, both plugins and themes can add a lot of custom scripts to your site, so reviewing your error log can help you pinpoint the exact line of faulty code, regardless of its origin. Reviewing the error log could be a valuable step towards solving the 503 error quickly even if the issue is caused by your current theme or any of the plugins you are using.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]To turn on error logging, connect to your server using your FTP credentials then navigate to <strong>the root WordPress directory<\/strong> (often called <em>public_html<\/em>). <strong>Right-click on the wp-config.php file and press the <em>View\/Edit<\/em> option<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/10-Press-the-View-Edit-option.jpg\" class=\"attachment-full size-full\" alt=\"Press the View Edit option\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/10-Press-the-View-Edit-option.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/10-Press-the-View-Edit-option-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/10-Press-the-View-Edit-option-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>Open the file with a text editor and<\/strong>, above the <em>\/* That&#8217;s all, stop editing! Happy blogging. *\/<\/em>\u00a0 line <strong>insert the following code<\/strong>:[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">define ('WP_DEBUG', true);\r\ndefine ('WP_DEBUG_LOG', true);\r\ndefine ('WP_DEBUG_DISPLAY', false);\r\n@ini_set ('display_errors', 0);<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;39px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/11-Code.jpg\" class=\"attachment-full size-full\" alt=\"Code\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/11-Code.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/11-Code-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/11-Code-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]The first two lines of this code enable the debugging mode and the storing of error messages inside a file called <strong>debug.log. The path to that file is your-site\/wp-content\/debug.log.<\/strong> The following two lines of code prevent the showing and printing of error messages on your screen.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]*Bonus tip[\/vc_column_text][vc_column_text]If you open the wp-config.php file and find the first line of code already present in the form <em>define(&#8216;WP_DEBUG&#8217;, false);<\/em> you can still keep it by <strong>changing false into true<\/strong>. Then, add the remaining three lines of code.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<strong>Save the changes made and upload the edited file<\/strong> back to your root directory, <strong>overriding<\/strong> the wp-config.php file currently on the server.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]If you are unable to edit the wp-config.php file, you will need to temporarily change its permissions. To do so, <strong>locate your wp-config.php file<\/strong> once more, <strong>right-click on it and select the <em>File permissions<\/em> option<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/12-Select-the-wp-config-File-permissions-option.jpg\" class=\"attachment-full size-full\" alt=\"Select the wp config File permissions option\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/12-Select-the-wp-config-File-permissions-option.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/12-Select-the-wp-config-File-permissions-option-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/12-Select-the-wp-config-File-permissions-option-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]In the field for Numeric value, <strong>type in either the number 644 or 666 and press the OK button<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/13-Numeric-value.jpg\" class=\"attachment-full size-full\" alt=\"Numeric value\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/13-Numeric-value.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/13-Numeric-value-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/13-Numeric-value-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]After adjusting the permissions,<strong> try inserting the code mentioned above. When you\u2019re done, change the permissions on your wp-config.php file back to either 440 or 400<\/strong>, as those are the suggested permissions on this file.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<strong>Upon retrieving the debug.log file, review the error messages within<\/strong>. Please be aware that this could take some time or be quite difficult as the messages won\u2019t directly mention the 503 error. Therefore, you might want to find some additional professional help, such as a developer. Depending on the file paths mentioned in the error messages, contacting the plugin or theme developers, or even your hosting provider, can be beneficial, too.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\"><a id=\"limit-wordpress-heartbeat\"><\/a>Limit WordPress Heartbeat<\/h3>\n<p>[\/vc_column_text][vc_column_text]<strong>Heartbeat is a built-in WordPress API<\/strong>, introduced in version 3.6. It has a lot of practical uses\u2014<strong>creating periodical autosaves of your posts while you edit them, showing notifications in your admin dashboard, managing real-time sales dates of your e-commerce plugins, and showing the notification that another user is editing the post on sites with multiple authors<\/strong>. However, performing all these functionalities can take its toll on server resources, especially if they aren\u2019t that high to begin with.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]The easiest way to check if the Heartbeat API is the reason behind the 503 error is to deactivate it. To achieve this, you need to add a piece of custom code at the end of your theme\u2019s functions.php file.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]That\u2019s done by <strong>connecting to your server<\/strong> using your FTP credentials and going to your root WordPress directory. <strong>Navigate to <em>wp-content\/themes<\/em>, locate the directory of your current theme<\/strong> and open it. <strong>Find the functions.php file<\/strong> within, right-click on it and select the View\/Edit option.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/14-Limit-WordPress-Heartbeat.jpg\" class=\"attachment-full size-full\" alt=\"Limit WordPress Heartbeat\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/14-Limit-WordPress-Heartbeat.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/14-Limit-WordPress-Heartbeat-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/14-Limit-WordPress-Heartbeat-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>Open the file using a text editor and add this custom code at the end of the file to deregister the heartbeat script.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">function stop_heartbeat(){\r\nwp_deregister_script('heartbeat');\r\n}\r\nadd_action('init', 'stop_heartbeat', 1);<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;39px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/15-Add-custom-code.jpg\" class=\"attachment-full size-full\" alt=\"Add custom code\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/15-Add-custom-code.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/15-Add-custom-code-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/15-Add-custom-code-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>Save the changes and upload the edited file back to the server<\/strong> to override the existing one. Afterward, <strong>try to access your site<\/strong> to see if the 503 error has disappeared. If the 503 error is still present, it means that the Heartbeat API wasn\u2019t the culprit. Accordingly, <strong>remove the previously inserted code for Heartbeat API deactivation<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\"><a id=\"limit-maximum-crawl-rate\"><\/a>Limit Google\u2019s maximum crawl rate<\/h3>\n<p>[\/vc_column_text][vc_column_text]Google\u2019s maximum crawl rate represents the maximum number of requests per second that Googlebot sends to your site for crawling purposes. Usually, Google has an algorithm for establishing the optimal website crawl rate. However, if your website has had a great number of requests in a short period of time, the added requests made by Googlebot can cause server load issues and lead to a 503 error. In those cases, it is best to limit Google\u2019s maximum crawl rate. Unfortunately, in the newer version of Google Search Console, there is no longer an option to limit the maximum crawl rate for your website. However, you can still do it if you <strong>follow the link to the legacy version of Google Search Console<\/strong>\u2014<a href=\"https:\/\/www.google.com\/webmasters\/tools\/settings?hl=en&amp;authuser=1\" target=\"_blank\" rel=\"noopener noreferrer\">Google Webmaster Tools<\/a>. While there, <strong>log in with your Google Search Console credentials and choose a verified property<\/strong> (the one for which you want to change the maximum crawl rate).[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/16-Limit-Googles-maximum-crawl-rate.jpg\" class=\"attachment-full size-full\" alt=\"Limit Googles maximum crawl rate\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/16-Limit-Googles-maximum-crawl-rate.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/16-Limit-Googles-maximum-crawl-rate-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/16-Limit-Googles-maximum-crawl-rate-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>Find the <em>Crawl rate<\/em> option in Site Settings, click on the <em>Limit Google\u2019s maximum crawl rate<\/em> radio button, drag the slider to the <em>Low<\/em> setting<\/strong>, and press the Save button afterward.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/17-Find-the-Crawl-rate-option-in-Site-Settings.jpg\" class=\"attachment-full size-full\" alt=\"Find the Crawl rate option in Site Settings\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/17-Find-the-Crawl-rate-option-in-Site-Settings.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/17-Find-the-Crawl-rate-option-in-Site-Settings-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/07\/17-Find-the-Crawl-rate-option-in-Site-Settings-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Then, <strong>try to access your site<\/strong>. If you are still unable to do so, then you proceed and try another of the methods suggested in this article. Also, <strong>don\u2019t forget to reverse the changes you made to the maximum crawl rate by choosing the <em>Let Google optimize for my site<\/em> option<\/strong> and pressing the Save button.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\"><a id=\"disable-your-cdn\"><\/a>Disable Your CDN<\/h3>\n<p>[\/vc_column_text][vc_column_text]CDNs, or Content Delivery Networks, are used for serving static site resources: CSS and JS stylesheets and images. They are an important asset for improving your website\u2019s speed, especially if your site has high traffic rates. However, this means that sometimes the reason behind the 503 error is your CDN and not your server. So, if you are a <strong>website owner who uses CDNs, you can temporarily disable the CDN<\/strong> to test if it\u2019s causing the error. As this process varies greatly depending on which CDN you are using, we suggest contacting your provider for details about the procedure. <strong>After you disable your CDN, check if you can access your site. If the 503 error is still present, re-enable your CDN<\/strong>, and then try using another of the methods suggested in this article.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\"><a id=\"contact-your-hosting-provider\"><\/a>Contact Your Hosting Provider<\/h3>\n<p>[\/vc_column_text][vc_column_text]If you have exhausted all options and the error persists, we suggest contacting your hosting provider for further assistance. There are many reasons that make this worthwhile. In fact, we already mentioned one earlier\u2014they can help with troubleshooting the error messages from the log. If the 503 errors started happening after a recent update you had (WordPress, theme, or plugin update), you can ask your host provider to restore the pre-update backup of your site. [\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Additionally, 503 errors can happen because of server downtime, although this is quite rare. Nevertheless, you could inquire with your hosting provider if this was the case and what caused it. If the server experienced downtime because of a DDOS attack, you should discuss the implementation of higher security measures with your hosting provider.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Finally, the reason why you might have 503 errors is due to a legitimate increase in traffic. As sites grow in size and number of visitors, it is important to have a powerful server that can keep up with the daily traffic spikes. As such, you can see about upgrading your current hosting plan. If this is not possible, you should consider switching to a better hosting provider to avoid future 503 errors.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Final Thoughts<\/h2>\n<p>[\/vc_column_text][vc_column_text]We hope that the reasons why a 503 Service Unavailable error in WordPress can happen are much clearer to you now. Fortunately, as you\u2019ve seen, there are many ways you can use to approach troubleshooting this error. We are confident that you will manage to solve the 503 error using the explanations and suggestions given in this guide. Since it may prove helpful in other situations, make sure to bookmark this article and keep it close should you need it again.[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Follow our step-by-step guide that will show you how to fix one of the most common WordPress errors\u2014the 503 Service Temporarily Unavailable error.<\/p>\n","protected":false},"author":11229,"featured_media":9269,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[14,4,52,13],"class_list":["post-9251","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-core","tag-tips","tag-troubleshooting","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/9251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/users\/11229"}],"replies":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/comments?post=9251"}],"version-history":[{"count":0,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/9251\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media\/9269"}],"wp:attachment":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media?parent=9251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/categories?post=9251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/tags?post=9251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}