{"id":38461,"date":"2021-10-26T13:52:34","date_gmt":"2021-10-26T13:52:34","guid":{"rendered":"\/tutorials\/?p=38461"},"modified":"2025-03-28T02:57:05","modified_gmt":"2025-03-28T02:57:05","slug":"503-service-unavailable","status":"publish","type":"post","link":"\/in\/tutorials\/503-service-unavailable","title":{"rendered":"How to fix the 503 Service Unavailable error in six steps"},"content":{"rendered":"<p>Imagine a visitor is about to make a significant purchase or access a service on your website. Instead of reaching the desired page, they&rsquo;re greeted with a frustrating message: <strong>503 Service Unavailable<\/strong>. For them, it can be a deal-breaker.<\/p><p>It&rsquo;s even worse for the website owner who&rsquo;s risking lost traffic, missed sales, and potential reputation damage as visitors might not return in the future.<\/p><p>Although the 503 error is often temporary, addressing it quickly is crucial. In this article, we&rsquo;ll explain what the 503 Service Unavailable error means, explore its common causes, and guide you through actionable steps to fix it. By the end, you&rsquo;ll know how to troubleshoot the error and apply preventive measures to make sure it doesn&rsquo;t happen again.<\/p><p>\n\n\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-what-is-the-503-service-unavailable-error-and-what-causes-it\">What is the 503 Service Unavailable error, and what causes it?<\/h2><p>\n\n\n<div class=\"protip\">\n                    <h2 class=\"featured-snippet title\">What is a 503 error<\/h2>\n                    <p><br>\nThe 503 Service Unavailable error is a temporary <a href=\"\/in\/tutorials\/http-status-codes\">HTTP response status code<\/a> indicating that the server can&rsquo;t handle the request at the moment. This often occurs due to resource limitations, scheduled maintenance, or back-end issues. It typically resolves once the underlying problem is fixed.<br>\n<\/p>\n                <\/div>\n\n\n\n<\/p><p>503 Service Unavailable falls under the <strong>5xx<\/strong> HTTP status code category, representing server-side issues. Unlike permanent errors such as<a href=\"\/in\/tutorials\/how-to-fix-error-404\"> 404 Not Found<\/a>, the 503 error indicates that the server is functioning but unable to complete requests.<\/p><p>Behind the scenes, a client (such as a web browser, app, or API client) sends a request to the server for a webpage, API resource, or other content. The server (usually a web server like Apache or NGINX) recognizes the request, but something prevents it from being processed correctly.<\/p><p>Instead of delivering the requested resource, the server sends back an HTTP 503 response, informing the client that the service is currently unavailable.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69f0dc8ddc392\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" width=\"802\" height=\"357\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/10\/service-unavailable.png\" alt=\"A website shows the 503 Service Unavailable error\" class=\"wp-image-38464\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/service-unavailable.png 802w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/service-unavailable-300x134.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/service-unavailable-150x67.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/service-unavailable-768x342.png 768w\" sizes=\"(max-width: 802px) 100vw, 802px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Some possible causes of the 503 Service Unavailable error include:<\/p><ul class=\"wp-block-list\">\n<li><strong>High server traffic or resource overload<\/strong>. Too many concurrent users or insufficient resources can overwhelm the server.<\/li>\n\n\n\n<li><strong>Scheduled server maintenance<\/strong>. Website administrators or hosting providers may temporarily turn off services during updates or repairs.<\/li>\n\n\n\n<li><strong>Backend dependency failures<\/strong>. Issues with databases, APIs, or other components can prevent the server from processing requests.<\/li>\n\n\n\n<li><strong>Misconfigured server or application settings<\/strong>. Configuration errors can disrupt normal server operations.<\/li>\n\n\n\n<li><strong>Malicious or unusual traffic patterns<\/strong>. Distributed denial-of-service (DDoS) attacks, cross-site scripting (XSS), and SQL injections may overload the server.<\/li>\n\n\n\n<li><strong>Faulty security measures or rate-limiting settings<\/strong>. Overly restrictive web application firewall (WAF) rules or rate-limiting policies can block legitimate requests, leading to a 503 error.<\/li>\n<\/ul><figure tabindex=\"0\" class=\"wp-block-table\"><table><tbody><tr><td><strong>Error code<\/strong><\/td><td>503 Service Unavailable<\/td><\/tr><tr><td><strong>Error type<\/strong><\/td><td>Server-side error<\/td><\/tr><tr><td><strong>Error variations<\/strong><\/td><td>503 Service Unavailable<br><br>Error 503 Service Unavailable<br><br>503 Service Temporarily Unavailable<br><br>HTTP Error 503<br><br>HTTPS Error 503<br><br>HTTP Server Error 503<br><br>HTTP Error 503. The service is unavailable.<br><br>The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.<\/td><\/tr><tr><td><strong>Error causes<\/strong><\/td><td>Excessive traffic or insufficient resources to handle requests<br><br>Temporary downtime for maintenance or updates<br><br>Issues with backend systems<br><br>Incorrect server or application configurations<br><br>Malicious DDoS attacks<br><br>Faulty security settings or overly restrictive rate-limiting policies<\/td><\/tr><\/tbody><\/table><\/figure><h2 class=\"wp-block-heading\" id=\"h-how-to-resolve-the-503-service-unavailable-error\">How to resolve the 503 Service Unavailable error<\/h2><p>While 503 Service Unavailable is a server-side issue, <strong>website visitors<\/strong> can try a few quick fixes, such as:<\/p><ul class=\"wp-block-list\">\n<li>Refreshing the desired web page.<\/li>\n\n\n\n<li><a href=\"\/in\/tutorials\/is-this-website-down\">Checking if the website is down<\/a> for others using tools like <strong>DownDetector<\/strong>.<\/li>\n\n\n\n<li><a href=\"\/in\/tutorials\/clear-browser-cache\">Clearing the browser&rsquo;s cache<\/a>, cookies, and history.<\/li>\n<\/ul><p>For<strong> website owners<\/strong>, we&rsquo;ve outlined six proven steps to resolve the 503 Service Unavailable error. Start with the first method, and if the issue persists, try the next steps until the problem is fully resolved.<\/p><h3 class=\"wp-block-heading\" id=\"h-1-analyze-server-resource-usage\">1. Analyze server resource usage<\/h3><p>The first step is to analyze whether your server has sufficient resources to handle the current traffic or tasks.<\/p><p>Servers process requests using resources like CPU, RAM, bandwidth, and disk space. When these resources are maxed out, your website&rsquo;s performance can degrade, triggering errors like 503.<\/p><p>Website owners can monitor resource usage through their hosting provider&rsquo;s control panel.<\/p><p>For example, on Hostinger&rsquo;s web hosting, cloud hosting, and Managed WordPress plans, open hPanel to access your website&rsquo;s dashboard. Then, go to <strong>Hosting Plan &rarr; Resource Usage<\/strong> to view metrics such as disk space, inodes, CPU, memory, bandwidth, and I\/O (throughput).<\/p><figure data-wp-context='{\"imageId\":\"69f0dc8dde984\"}' data-wp-interactive=\"core\/image\" class=\"wp-block-image aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"724\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/10\/hpanel-websites-hosting-resources-usage-1024x724.png\" alt=\"The Resources Usage page in hPanel\n\" class=\"wp-image-121814\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-hosting-resources-usage-1024x724.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-hosting-resources-usage-300x212.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-hosting-resources-usage-150x106.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-hosting-resources-usage-768x543.png 768w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-hosting-resources-usage-1536x1086.png 1536w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-hosting-resources-usage-2048x1448.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><p>If your website consistently exceeds disk space, inodes, or memory limits (represented by a red line on graphs), you need to <a href=\"https:\/\/support.hostinger.com\/en\/articles\/3417446-how-to-fix-the-503-error\" target=\"_blank\" rel=\"noopener\">optimize resource usage<\/a> or upgrade to a higher-tier plan with more CPU, RAM, and bandwidth.<\/p><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-full\"><a href=\"\/in\/web-hosting\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\" alt=\"Hostinger web hosting banner\" class=\"wp-image-98604\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/11\/Web-hosting_in-text-banner.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/11\/Web-hosting_in-text-banner-300x88.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/11\/Web-hosting_in-text-banner-150x44.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/11\/Web-hosting_in-text-banner-768x225.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><p>If you host your website on a Linux virtual private server (VPS), run commands like <strong>top<\/strong>, <strong>htop<\/strong>, or <strong>vmstat<\/strong> in the terminal to<a href=\"\/in\/tutorials\/how-to-list-processes-in-linux\"> monitor running processes<\/a> and resource usage in real time. If you identify processes consuming excessive CPU or memory,<a href=\"\/in\/tutorials\/how-to-kill-a-process-in-linux\"> terminate them using commands like kill or pkill<\/a> to free up resources.<\/p><h3 class=\"wp-block-heading\" id=\"h-2-check-for-scheduled-maintenance\">2. Check for scheduled maintenance<\/h3><p>Server maintenance is important for optimizing performance and reducing security risks. However, web servers and applications often shut down automatically during updates or maintenance, which can lead to 503 Service Unavailable.<\/p><p>For instance, many web hosts enable automatic updates for new WordPress releases. During the process, they may issue the 503 HTTP status code on user websites until the update is completed. Hostinger customers can check real-time server updates on our<a href=\"https:\/\/statuspage.hostinger.com\" target=\"_blank\" rel=\"noopener\"> status page<\/a>.<\/p><p>You can modify your server settings to disable automatic updates and prevent unexpected downtime. For<a href=\"\/in\/web-hosting\"> Hostinger&rsquo;s web hosting<\/a> users, here&rsquo;s how to do so on hPanel:<\/p><p>\n\n\n<div><p class=\"important\"><strong>Important!<\/strong> If you decide to disable automatic updates, make sure to manually check for updates and apply them promptly to keep your site secure.<\/p><\/div>\n\n\n\n<\/p><ol class=\"wp-block-list\">\n<li>From your website&rsquo;s dashboard, navigate to <strong>WordPress &rarr; Security<\/strong>.<\/li>\n\n\n\n<li>Expand the <strong>WordPress auto-updates<\/strong> section by clicking <strong>Customize<\/strong>.<\/li>\n\n\n\n<li>Select <strong>No updates<\/strong> from the <strong>WordPress (core)<\/strong>, <strong>Themes<\/strong>, and <strong>Plugins<\/strong> drop-down menu, then hit <strong>Save<\/strong>.<\/li>\n<\/ol><figure data-wp-context='{\"imageId\":\"69f0dc8de1d08\"}' data-wp-interactive=\"core\/image\" class=\"wp-block-image aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"676\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/10\/hpanel-websites-wordpress-security-no-updates-highlighted-1024x676.png\" alt=\"The No updates option for the WordPress (core), Themes, and Plugins fields in hPanel\n\" class=\"wp-image-121815\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-wordpress-security-no-updates-highlighted-1024x676.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-wordpress-security-no-updates-highlighted-300x198.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-wordpress-security-no-updates-highlighted-150x99.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-wordpress-security-no-updates-highlighted-768x507.png 768w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-wordpress-security-no-updates-highlighted-1536x1014.png 1536w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-wordpress-security-no-updates-highlighted-2048x1352.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Pro tip<\/h4>\n                    <p><a href=\"\/in\/tutorials\/wordpress-maintenance-mode\">Enable maintenance mode<\/a> on your site during planned maintenance. This informs visitors about the downtime and reassures them that your website will return soon.<\/p>\n                <\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-3-inspect-server-logs\">3. Inspect server logs<\/h3><p>Examining server logs can help pinpoint the cause of the 503 error. Logs provide detailed information about your website&rsquo;s activities, such as requested pages and system errors, making it easier to identify the root issue.<\/p><p>For WordPress websites, enable debugging mode to generate an error log. If you<a href=\"\/in\/wordpress-hosting\"> host your WordPress site on Hostinger<\/a>, follow these steps:<\/p><ol class=\"wp-block-list\">\n<li>Navigate to <strong>Websites &rarr; Dashboard &rarr; Files &rarr; File Manager<\/strong> on hPanel.<\/li>\n\n\n\n<li>Open the <strong>public_html<\/strong> folder and locate the<a href=\"\/in\/tutorials\/wp-config-php\"> wp-config.php file<\/a>.<\/li>\n<\/ol><figure data-wp-context='{\"imageId\":\"69f0dc8de3b98\"}' data-wp-interactive=\"core\/image\" class=\"wp-block-image aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"721\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/10\/hpanel-file-manager-public-html-wp-config-php-selected-1024x721.png\" alt=\"The wp-config.php file inside the public_html folder\n\" class=\"wp-image-121816\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-file-manager-public-html-wp-config-php-selected-1024x721.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-file-manager-public-html-wp-config-php-selected-300x211.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-file-manager-public-html-wp-config-php-selected-150x106.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-file-manager-public-html-wp-config-php-selected-768x541.png 768w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-file-manager-public-html-wp-config-php-selected-1536x1081.png 1536w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-file-manager-public-html-wp-config-php-selected.png 1864w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><ol start=\"3\" class=\"wp-block-list\">\n<li>Right-click the file and select <strong>Edit<\/strong>.<\/li>\n\n\n\n<li>Add the following code inside the file &ndash; preferably at the end of it &ndash; and hit <strong>Save<\/strong>.<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">define( 'WP_DEBUG', true );\n\ndefine( 'WP_DEBUG_LOG', true );\n\ndefine( 'WP_DEBUG_DISPLAY', false );<\/pre><figure data-wp-context='{\"imageId\":\"69f0dc8de5953\"}' data-wp-interactive=\"core\/image\" class=\"wp-block-image aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"465\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/04\/filemanager-wpconfig-edit-newcodepasted-highlighted-1024x465.png\" alt=\"The WP_DEBUG code inside the wp-config.php file\n\" class=\"wp-image-82884\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/04\/filemanager-wpconfig-edit-newcodepasted-highlighted.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/04\/filemanager-wpconfig-edit-newcodepasted-highlighted-300x136.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/04\/filemanager-wpconfig-edit-newcodepasted-highlighted-150x68.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2023\/04\/filemanager-wpconfig-edit-newcodepasted-highlighted-768x349.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><ol start=\"5\" class=\"wp-block-list\">\n<li>Trigger the error by accessing your website or a specific page where the 503 occurs.<\/li>\n\n\n\n<li>Go to <strong>public_html &rarr; wp-content<\/strong> to find a file named <strong>debug.log<\/strong>.<\/li>\n<\/ol><p>In this file, you&rsquo;ll find the detailed error information, which might include:<\/p><ul class=\"wp-block-list\">\n<li><strong>PHP warnings<\/strong>. Issues with plugins, themes, or scripts.<\/li>\n\n\n\n<li><strong>Failed API calls<\/strong>. Errors in external service integrations.<\/li>\n\n\n\n<li><strong>Database connection timeouts<\/strong>. Problems with database credentials or performance.<\/li>\n<\/ul><p>Review the logged errors and address them accordingly, such as fixing misconfigured plugins or updating database settings.<\/p><p>If you&rsquo;re unsure whether the issue is WordPress-specific or caused by broader PHP scripts,<a href=\"\/in\/tutorials\/website\/how-to-check-your-website-error-log\"> activate PHP error logging<\/a>. Here&rsquo;s how to do it on hPanel:<\/p><ol class=\"wp-block-list\">\n<li>Navigate to <strong>Advanced &rarr; PHP Configuration<\/strong> from your website dashboard&rsquo;s left sidebar.<\/li>\n\n\n\n<li>Select the <strong>PHP Options<\/strong> tab, enable the <strong>logErrors<\/strong> option, and click <strong>Save<\/strong>.<\/li>\n<\/ol><figure data-wp-context='{\"imageId\":\"69f0dc8de78bd\"}' data-wp-interactive=\"core\/image\" class=\"wp-block-image aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"526\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/10\/error-log-1024x526.png\" alt=\"The logErrors option under the PHP options tab of hPanel\n\" class=\"wp-image-38474\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/error-log.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/error-log-300x154.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/error-log-150x77.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/error-log-768x395.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><ol start=\"3\" class=\"wp-block-list\">\n<li><a href=\"https:\/\/support.hostinger.com\/en\/articles\/1583245-how-to-connect-to-a-hosting-plan-via-ssh\" target=\"_blank\" rel=\"noopener\">Access your server configuration files via SSH<\/a> and navigate to the <strong>.logs<\/strong> directory:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cd .logs<\/pre><p>Locate the error log file, typically named <strong>error_log_yourdomain_tld<\/strong>. It records broader PHP-related issues, such as syntax errors in server-side scripts and failed server processes or script executions.<\/p><p>For<a href=\"\/in\/vps-hosting\"> VPS hosting<\/a> users, check web server logs to investigate errors like missing files, misconfigured virtual hosts, and module failures. Depending on your server software, the log files are located in the following:<\/p><ul class=\"wp-block-list\">\n<li><strong>Apache<\/strong>. \/var\/log\/apache2\/error.log<\/li>\n\n\n\n<li><strong>NGINX<\/strong>. \/var\/log\/nginx\/error.log<\/li>\n<\/ul><h3 class=\"wp-block-heading\" id=\"h-4-restart-the-server-or-key-components\">4. Restart the server or key components<\/h3><p>Restarting your server or specific components can often resolve 503 Service Unavailable. This clears problems such as locked files, memory leaks, or unresponsive processes so your server can start fresh.<\/p><p>On Hostinger&rsquo;s web hosting plans, you don&rsquo;t have root access to restart the server directly. However, you can stop and restart key processes using hPanel:<\/p><ol class=\"wp-block-list\">\n<li>Go to <strong>Hosting &rarr; Resources Usage<\/strong> and scroll down to the <strong>Stop running processes<\/strong> section.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69f0dc8de9b07\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"198\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/09\/hpanel-hosting-resourcesusage-stoprunningprocesses-1024x198.png\" alt=\"The Stop running processes section in hPanel's Resources Usage page\" class=\"wp-image-84765\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2022\/09\/hpanel-hosting-resourcesusage-stoprunningprocesses.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2022\/09\/hpanel-hosting-resourcesusage-stoprunningprocesses-300x58.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2022\/09\/hpanel-hosting-resourcesusage-stoprunningprocesses-150x29.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2022\/09\/hpanel-hosting-resourcesusage-stoprunningprocesses-768x149.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"2\" class=\"wp-block-list\">\n<li>Click the corresponding button and confirm the action in the dialog box.<\/li>\n\n\n\n<li>Give a few seconds for the process to finish.<\/li>\n<\/ol><p>If you use VPS hosting, you have complete control over restarting your entire server or individual services. To reboot your VPS via hPanel:<\/p><ol class=\"wp-block-list\">\n<li>Go to <strong>VPS &rarr; Overview<\/strong>.<\/li>\n\n\n\n<li>Click the <strong>Reboot VPS<\/strong> button.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69f0dc8deb774\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"302\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/10\/the-vps-reboot-button-on-hostinger-hpanel-1024x302.png\" alt=\"The Reboot VPS button in hPanel's VPS dashboard\" class=\"wp-image-126189\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/the-vps-reboot-button-on-hostinger-hpanel-1024x302.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/the-vps-reboot-button-on-hostinger-hpanel-300x88.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/the-vps-reboot-button-on-hostinger-hpanel-150x44.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/the-vps-reboot-button-on-hostinger-hpanel-768x226.png 768w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/the-vps-reboot-button-on-hostinger-hpanel-1536x453.png 1536w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/the-vps-reboot-button-on-hostinger-hpanel.png 1770w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>Wait at least <strong>two minutes<\/strong> for the process to complete.<\/li>\n<\/ol><p>If you prefer restarting your server via the command-line interface (CLI), open your terminal and run the command below:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo reboot<\/pre><p>Besides rebooting the entire server, you can also reboot individual services like Apache, NGINX, or MySQL. Use the appropriate command based on the service you want to restart:<\/p><ul class=\"wp-block-list\">\n<li><strong>Apache:<\/strong><\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl restart apache2<\/pre><ul class=\"wp-block-list\">\n<li><strong>NGINX:<\/strong><\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl restart nginx<\/pre><ul class=\"wp-block-list\">\n<li><strong>MySQL:<\/strong><\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl restart mysql<\/pre><h3 class=\"wp-block-heading\" id=\"h-5-fix-faulty-firewall-configurations\">5. Fix faulty firewall configurations<\/h3><p>Web application firewalls (WAFs) protect your server from malicious activities. However, misconfigurations or overly strict rules can result in false positives, blocking safe traffic and triggering 503 Service Unavailable errors.<\/p><p>If you suspect your firewall is blocking legitimate requests, reset its configuration to default settings. For Hostinger&rsquo;s web hosting users, follow these steps:<\/p><ol class=\"wp-block-list\">\n<li>On hPanel, navigate to <strong>Performance &rarr; CDN<\/strong> and hit <strong>Manage<\/strong>.<\/li>\n\n\n\n<li>Select the <strong>Security<\/strong> tab and set the security level to<strong> Essentially Off<\/strong>.<\/li>\n<\/ol><figure data-wp-context='{\"imageId\":\"69f0dc8ded6a8\"}' data-wp-interactive=\"core\/image\" class=\"wp-block-image aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"293\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/10\/hpanel-cdn-security-essentially-off-highlighted-1024x293.png\" alt=\"The Essentially off option under the Security tab of hPanel's CDN\n\" class=\"wp-image-121819\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-cdn-security-essentially-off-highlighted-1024x293.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-cdn-security-essentially-off-highlighted-300x86.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-cdn-security-essentially-off-highlighted-150x43.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-cdn-security-essentially-off-highlighted-768x220.png 768w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-cdn-security-essentially-off-highlighted-1536x439.png 1536w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-cdn-security-essentially-off-highlighted-2048x586.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><ol start=\"3\" class=\"wp-block-list\">\n<li>Revisit your website to see if the error is resolved.<\/li>\n<\/ol><p>If the error continues, return to the <strong>CDN<\/strong> page and deactivate it entirely.<\/p><figure data-wp-context='{\"imageId\":\"69f0dc8def4a4\"}' data-wp-interactive=\"core\/image\" class=\"wp-block-image aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"204\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/10\/hpanel-websites-performance-cdn-disable-highlighted-1024x204.png\" alt=\"The Disable button in hPanel's CDN\n\" class=\"wp-image-121820\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-performance-cdn-disable-highlighted-1024x204.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-performance-cdn-disable-highlighted-300x60.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-performance-cdn-disable-highlighted-150x30.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-performance-cdn-disable-highlighted-768x153.png 768w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-performance-cdn-disable-highlighted-1536x307.png 1536w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-websites-performance-cdn-disable-highlighted-2048x409.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><p>\n\n\n<div><p class=\"important\"><strong>Important!<\/strong> Only disable the firewall temporarily. Don&rsquo;t forget to re-enable it after identifying the issue to maintain server security.<\/p><\/div>\n\n\n\n<\/p><p>If you use a firewall from a third-party content delivery network (CDN) service like Cloudflare, visit its dashboard to adjust the settings. If you need help adjusting the firewall to prevent false positives, contact its support team.<\/p><p>On Hostinger&rsquo;s VPS, you can reset or modify firewall rules using hPanel:<\/p><ol class=\"wp-block-list\">\n<li>From your VPS dashboard, go to <strong>Security &rarr; Firewall<\/strong>.<\/li>\n\n\n\n<li>Click the <strong>three horizontal dots<\/strong> next to your custom firewall configuration and select <strong>Edit<\/strong>.<\/li>\n<\/ol><figure data-wp-context='{\"imageId\":\"69f0dc8df1337\"}' data-wp-interactive=\"core\/image\" class=\"wp-block-image aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"301\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/10\/hpanel-vps-firewall-edit-highlighted-1024x301.png\" alt=\"The Edit option next to a custom firewall configuration in hPanel's VPS\n\" class=\"wp-image-121821\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-vps-firewall-edit-highlighted-1024x301.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-vps-firewall-edit-highlighted-300x88.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-vps-firewall-edit-highlighted-150x44.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-vps-firewall-edit-highlighted-768x226.png 768w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-vps-firewall-edit-highlighted-1536x452.png 1536w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-vps-firewall-edit-highlighted-2048x603.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><ol start=\"3\" class=\"wp-block-list\">\n<li>Review each rule you&rsquo;ve set, then edit or delete any that might be causing issues.<\/li>\n\n\n\n<li>If necessary, delete the custom configuration entirely.<\/li>\n\n\n\n<li>If the above steps don&rsquo;t help, go to <strong>Settings &rarr; Main settings<\/strong> and click the button next to <strong>Reset firewall configuration<\/strong>. This will reset all rules to the default settings.<\/li>\n<\/ol><figure data-wp-context='{\"imageId\":\"69f0dc8df366b\"}' data-wp-interactive=\"core\/image\" class=\"wp-block-image aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"462\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/10\/hpanel-vps-settings-main-settings-reset-highlighted-1024x462.png\" alt=\"The Reset button next to the firewall option in hPanel's VPS\n\" class=\"wp-image-121822\" srcset=\"https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-vps-settings-main-settings-reset-highlighted-1024x462.png 1024w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-vps-settings-main-settings-reset-highlighted-300x135.png 300w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-vps-settings-main-settings-reset-highlighted-150x68.png 150w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-vps-settings-main-settings-reset-highlighted-768x346.png 768w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-vps-settings-main-settings-reset-highlighted-1536x693.png 1536w, https:\/\/www.hostinger.com\/in\/tutorials\/wp-content\/uploads\/sites\/52\/2021\/10\/hpanel-vps-settings-main-settings-reset-highlighted-2048x924.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><p>If you use<a href=\"\/in\/tutorials\/how-to-configure-firewall-on-ubuntu-using-ufw\"> Uncomplicated Firewall (UFW)<\/a>, you can disable or reset it via the terminal:<\/p><ol class=\"wp-block-list\">\n<li>Disable the firewall temporarily with this command:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo ufw disable<\/pre><ol start=\"2\" class=\"wp-block-list\">\n<li>Re-enable it after testing:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo ufw enable<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>If necessary, reset the firewall configuration entirely by executing:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo ufw reset<\/pre><h3 class=\"wp-block-heading\" id=\"h-6-investigate-recent-changes\">6. Investigate recent changes<\/h3><p>The 503 Service Unavailable error can be caused by a misconfiguration or incompatibility after an update, deployment, or code change.<\/p><p>On WordPress, plugins commonly cause 503 errors because they can consume excessive resources or conflict with each other. If the error occurs right after installing a specific plugin, you&rsquo;ve likely found the culprit. In this case, deactivate or uninstall the problematic plugin completely.<\/p><p>If you&rsquo;re not sure which plugin is causing the error, <a href=\"https:\/\/support.hostinger.com\/en\/articles\/4411258-how-to-disable-wordpress-plugins-without-access-to-the-admin-page\" target=\"_blank\" rel=\"noopener\">consider disabling all of them at once<\/a> and then check your website. If the error resolves, reactivate the plugins individually to identify the root cause.<\/p><p>Poorly coded WordPress themes can also trigger 503 Service Unavailable. To troubleshoot,<a href=\"\/in\/tutorials\/change-a-theme-in-wordpress\"> switch to a default theme<\/a> like <strong>Twenty Twenty-Five<\/strong>. If this solves the issue, you&rsquo;ll know for sure that the issue is with your theme.<\/p><p>If the error began after deploying new code, rolling back to a previous stable version can often fix it. Use a version control system like <strong>Git<\/strong> to revert recent commits:<\/p><p>\n\n\n<div><p class=\"important\"><strong>Important!<\/strong> Test the rolled-back version in a staging environment to ensure compatibility and stability before deploying it to production.<\/p><\/div>\n\n\n\n<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git reset --hard [commit_hash]\n\ngit push --force<\/pre><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Pro tip<\/h4>\n                    <p>Learn the <a href=\"\/in\/tutorials\/basic-git-commands\">most used Git commands<\/a> to manage your deployments more efficiently.<\/p>\n                <\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-traffic-impact-of-the-503-error\">Traffic impact of the 503 error<\/h2><p>High traffic can trigger and sustain the 503 error. When too many requests overwhelm a server&rsquo;s resources, it can lead to downtime, stopping visitors from accessing the desired page.<\/p><p>Addressing traffic-related issues can help resolve the error and prevent it from recurring. Here are some strategies to mitigate the traffic-related problems:<\/p><ul class=\"wp-block-list\">\n<li><strong>Use a load balancer<\/strong>. A load balancer distributes incoming requests across multiple servers, preventing any single server from being overwhelmed. With it, you can ensure better availability and performance during traffic spikes.<\/li>\n\n\n\n<li><strong>Choose a CDN service<\/strong>. A CDN caches and serves static content from servers closer to users, reducing the main server&rsquo;s load by distributing traffic evenly. Hostinger offers an in-house CDN included with our <a href=\"\/in\/cloud-hosting\">cloud hosting<\/a>, web hosting, and Managed WordPress hosting plans.<\/li>\n\n\n\n<li><strong>Enable auto-scaling<\/strong>. Auto-scaling dynamically adjusts your server resources based on traffic demands. During high-traffic periods, it allocates additional resources to maintain performance, and during quieter periods, it scales back resources to save costs.<\/li>\n\n\n\n<li><strong>Optimize database queries<\/strong>. Review and refine database queries regularly so that they&rsquo;ll execute efficiently, reducing server strain and improving overall website performance.<\/li>\n\n\n\n<li><strong>Reschedule cron jobs<\/strong>. Schedule background tasks, such as<a href=\"\/in\/tutorials\/cron-job\"> cron jobs<\/a>, during low-traffic periods to minimize their impact on server performance. This reduces the risk of resource contention during peak hours.<\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>503 Service Unavailable is a common server-side issue that can disrupt your website&rsquo;s availability and negatively impact user experience. By understanding its causes and applying a structured approach to troubleshooting, you can resolve and prevent the issue from recurring.<\/p><p>Here are six ways to fix the 503 error:<\/p><ol class=\"wp-block-list\">\n<li>Make sure your server has sufficient resources like CPU, RAM, and bandwidth.<\/li>\n\n\n\n<li>Verify whether the error is caused by server updates or maintenance.<\/li>\n\n\n\n<li>Use log files to pinpoint the specific issue.<\/li>\n\n\n\n<li>Restart your server or specific services to clear temporary glitches.<\/li>\n\n\n\n<li>Reset or adjust firewall rules to allow legitimate traffic.<\/li>\n\n\n\n<li>Roll back updates or debug recent code changes, plugins, or themes.<\/li>\n<\/ol><p>To prevent this error in the future, address traffic-related causes by implementing a CDN, load balancing, and auto-scaling. Additionally, optimize resource-intensive processes like database queries and schedule cron tasks during low-traffic periods to maintain server stability.<\/p><p>We hope this guide has helped you resolve the 503 error code and restore access to your website. If you have further questions or need assistance, feel free to leave them in the comment section below.<\/p><h2 class=\"wp-block-heading\" id=\"h-503-service-unavailable-faq\">503 Service Unavailable FAQ<\/h2><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1737733680103\"><h3 class=\"schema-faq-question\">Is the 503 error permanent?<\/h3> <p class=\"schema-faq-answer\">No, the 503 Service Unavailable error is usually temporary. It often occurs due to server overload or maintenance. Once the underlying issue is resolved, the error disappears, and the site becomes accessible again.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1737733684788\"><h3 class=\"schema-faq-question\">How can I prevent 503 Service Unavailable errors?<\/h3> <p class=\"schema-faq-answer\">You can prevent 503 errors by regularly monitoring server resources, implementing load balancing, and using a CDN. Optimizing resource-intensive tasks like database queries, enabling auto-scaling, and scheduling background processes during low-traffic periods can also help.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1737733689805\"><h3 class=\"schema-faq-question\">What are some other related errors to 503 Service Unavailable?<\/h3> <p class=\"schema-faq-answer\">Other related errors under the <strong>5xx<\/strong> category include <a href=\"\/in\/tutorials\/502-bad-gateway\">502 Bad Gateway<\/a>, which indicates communication issues between servers. Another example is <a href=\"\/in\/tutorials\/504-gateway-timeout\">504 Gateway Timeout<\/a>, which occurs when a server takes too long to respond.<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Imagine a visitor is about to make a significant purchase or access a service on your website. Instead of reaching the desired page, they&rsquo;re greeted with a frustrating message: 503 Service Unavailable. For them, it can be a deal-breaker. It&rsquo;s even worse for the website owner who&rsquo;s risking lost traffic, missed sales, and potential reputation [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/in\/tutorials\/503-service-unavailable\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":411,"featured_media":121813,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"","rank_math_description":"","rank_math_focus_keyword":"","footnotes":""},"categories":[],"tags":[],"class_list":["post-38461","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-fix-503-service-unavailable-error","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/erreur-503-service-unavailable","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/como-arreglar-el-error-503-service-unavailable\/","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/503-service-unavailable","default":0},{"locale":"de-DE","link":"https:\/\/www.hostinger.com\/de\/tutorials\/503-service-unavailable","default":0},{"locale":"nl-NL","link":"https:\/\/www.hostinger.com\/nl\/tutorials\/503-service-unavailable","default":0},{"locale":"ko-KR","link":"https:\/\/blog.hostinger.io\/kr\/tutorials\/503-service-unavailable\/","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/503-service-unavailable","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/503-service-unavailable","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/503-service-unavailable","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/como-arreglar-el-error-503-service-unavailable\/","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/como-arreglar-el-error-503-service-unavailable\/","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/como-arreglar-el-error-503-service-unavailable\/","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/503-service-unavailable","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-fix-503-service-unavailable-error","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-fix-503-service-unavailable-error","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-fix-503-service-unavailable-error","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/posts\/38461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/users\/411"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/comments?post=38461"}],"version-history":[{"count":49,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/posts\/38461\/revisions"}],"predecessor-version":[{"id":126191,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/posts\/38461\/revisions\/126191"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/media\/121813"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/media?parent=38461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/categories?post=38461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/in\/tutorials\/wp-json\/wp\/v2\/tags?post=38461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}