Ошибка 503 на сайте wordpress

Themeisle content is free. When you purchase through referral links on our site, we earn a commission. Learn More

Have you encountered the 503 error on your WordPress site? It’s a common WordPress error that can be fixed by following the steps we have covered in today’s tutorial.

Some of these steps may look technical, but they actually don’t require any deep technical knowledge.

In this article, we will first discuss what caused the 503 error in WordPress, then we will show you all potential solutions and how you can prevent encountering the 503 error in the future.

Let’s dive in!

What is the 503 error? What causes it?

The 503 error occurs when your website server cannot be reached – i.e., the server is unavailable. The reasons for unavailability can be a badly coded plugin or theme, a code snippet gone rogue, a glitch in the server, a DDoS attack, or quality issues with your hosting service overall.

Let’s take a deeper look at each of the causes:

Badly coded plugin or theme:

Commonly, the 503 error appears when you install or update a badly coded plugin or theme. When the plugin or theme cannot function properly, it causes WordPress to throw the 503 error.

Code snippet gone rogue:

Customizing a WordPress site is super easy. You can add some CSS code here, upload a PHP script there, and modify the site based on your needs. But, a piece of bad custom code can cause a lot of trouble. The 503 error you are experiencing could be due to such a bad code snippet.

Technical issues of the server:

Your server could be down because it’s under maintenance, or because of some other scheduled work. Usually, any issues resulting from these reasons disappear after a couple of hours. That said, hosting providers should have mirror servers to ensure that the sites are up and running during maintenance.

A DDoS attack :

Although this does not happen very frequently, the 503 error might have been produced due to an attack made on your website. DDoS attacks, in particular, are often associated with 503 errors. That’s because, in these types of attacks, hackers send a ton of traffic to your website so that the server gets overloaded and crashes your site. Read more about DDoS attacks on WordPress sites and how to mitigate the risk here.

These are the typical reasons that cause the 503 error on WordPress sites.

It’s worth noting that there are a few different variations of the error:

  • “503 Service Unavailable”
  • “503 Service Temporarily Unavailable”
  • “HTTP Server Error 503”
  • “HTTP Error 503”
  • “Error 503 Service Unavailable”
  • “The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.”

👉 The solutions that we have covered below should fix any 503 error on a WordPress website.

The exact fix that is going to work for you depends on the root cause. The 503 error itself does not give you much information to go on. So in this section, we will show you a number of steps to follow in order to pinpoint the cause and then fix it.

Before we dive into the solutions, make sure you are carrying out the following preliminary steps:

The 503 error WordPress also occurs when you are updating a plugin or a theme. You might want to check your website again to see if it was a temporary issue. Just make sure you cleared the cache before checking the site.

As I mentioned earlier, sometimes the 503 error occurs because of maintenance work on your web server. You must have been alerted about it via email by your hosting provider. In a typical maintenance alert, you are informed about how long the server is expected to be down. So check your email.

bluehost scheduled maintenance email
Bluehost scheduled maintenance email

If the error appeared right after you added a code snippet to your website, then you know who the culprit is. Remove the code and your website should go back to normal. But if you’ve lost access to your dashboard, then we suggest restoring a backup of your website. Your hosting provider should be able to help you out with this.

Nothing worked? Then let’s try the steps below.

1. Deactivate plugins temporarily

503 errors are commonly caused by plugins that you have installed on your site. To determine if a plugin caused the error, you will need to disable all the plugins only temporarily.

The 503 error prevents you from accessing the dashboard, so you will have to use an FTP client like FileZilla.

Open FileZilla, connect with your site, and navigate to the public_html directory. Open the folder and navigate to the wp-content. Inside this directory, you’ll find another one called plugins. It contains all your site’s plugins (active and inactive). Rename the plugins directory to plugins_ or whatever else. This will deactivate every plugin on your site.

editing plugins folder
Disabling all plugins by renaming the main plugin directory

Go back to your site again and see if the 503 error is gone. If it is, then it’s safe to assume that a plugin was causing the error.

Now, it’s time to pinpoint the exact plugin that’s causing the issues.

Go back to FileZilla, change back the name of your plugins directory to the original (“plugins”). Go inside and start working through all your plugins one by one. Do this:

  1. Change the name of the first plugin in the directory to something else.
  2. Check the website to see if the error is gone.
  3. If it is indeed gone, you’ve found your culprit. If not, change back the name of that first plugin and proceed to test the next one the same way.
  4. Repeat until you find the plugin that’s causing the problems.

Once you find the plugin causing the error, it’s best to just delete it and look for an alternative. If none of your plugins is causing the 503 error, then try the next solution.

2. Deactivate your theme temporarily

Deactivating the theme is a bit tricky because you can’t simply rename the theme folder as we did with the plugins folder. It would lead to an error of its own.

So here’s what you need to do: log into your hosting account, go to the cPanel section and open the phpMyAdmin.

Select wp_options and go to Search. Under option_name, write template and click on Go.

changing wordpress theme in phpmyadmin
Finding your current theme in PHPMyAdmin

The system will run a search and then show you your current theme under option_value. Select Edit and change the current theme to twentytwentyone.

editing option value in phpmyadmin
Editing current theme in PHPMyAdmin

If this fixes the error, then you might want to try getting an earlier version of the theme (one that worked), installing it, and waiting for the theme’s developer to release an update. Or, you can switch to a different theme altogether if that’s an option.

3. Disable your CDN temporarily

Occasionally, CDNs are known to cause 503 errors, so disabling it – if you have one working on your site – can be a quick solution. All CDNs have some option that allows you to pause them manually. For instance, on Cloudflare, you need to log into your account, select your website, and click on the Pause Cloudflare on site option.

Next, check your website and if the 503 error persists, then unpause the CDN and try the next solution.

4. Limit WordPress Heartbeat API

The Heartbeat API is responsible for several essential functions, like auto-saving posts, showing plugin notifications, preventing you from accessing a post when someone else is modifying it, etc.

The API uses your server resources to carry out these functions. If your server can’t handle the API’s demands, it will throw a 503 error. To determine if the Heartbeat API is causing the error, you need to disable it temporarily.

Open your FTP client (FileZilla), connect to your website and go to public_html → wp-content → themes. Open the current theme directory and download a copy of the functions.php file, then edit it.

function.php file location -  503 error fix
Locating function.php file

Add the following code snippet right after the opening <?php tag:

add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
wp_deregister_script('heartbeat')
}
editing function.php file to fix 503 error
Inserting code snippet in function.php file

Save the file, reupload it, and check your website. If the error disappears, then you’ve caught the culprit.

But remember, the Heartbeat API is essential, so you can’t keep it disabled long term. You can slow down its frequency if you feel like it by installing the Heartbeat control plugin. Just make sure to delete the code snippet from the functions.php file before setting up the plugin.

5. Enable WP_DEBUG

When all other solutions fail, enabling the debug mode could give you answers.

You can enable the debug mode using a plugin or by modifying the wp-config file.

Since the 503 error prevents you from accessing the dashboard, installing a plugin is out of the question. So you have to modify the wp-config file manually.

Open your FTP client (FileZilla), go to public_html → wp-config.php and download a copy of the file, then edit it. Insert the following code snippet into it:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Save the file and reupload it.

editing wpconfig file to fix 503 error
Inserting code snippet in wp-config.php file

Now go to the wp-content directory, and you should find a debug.log file in there.

The log file contains errors that your website has been experiencing. It’ll show you the causes of the error along with specific lines of code that led to it. You are not going to find a direct indication of the 503 error, so we suggest showing the log to your hosting provider and seeking help with them.

👉 By now, you should have a solution to the 503 WordPress error. However, you should ensure that it never occurs on your site in the future again.

Preventing 503 error WordPress in the future

You can prevent the 503 error from appearing on your website by following the instructions below:

  • Use themes and plugins from the WordPress repository or trusted developers (like Themeisle). Read how to choose a theme and how to choose a plugin for more information.
  • Move to a better hosting plan if your site requires more resources to function properly.
  • Use a firewall to prevent DDoS attacks.
  • Install or update plugins on a staging site before carrying them out on the live site.

That’s it folks! With that, we have come to the end of this article.

I hope that you found this guide easy to follow and helpful. If you have any questions, let us know in the comments below.

Если вы пытаетесь зайти на свой сайт на WordPress и видите сообщение «Ошибка 503 Сервис недоступен» (Service Unavailable), то это значит, что ваш сервер не может обработать ваш запрос из-за перегрузки, сбоя или технического обслуживания. Это может быть временная проблема, которая решится сама собой через несколько минут, или же требовать вашего вмешательства. В этой статье мы расскажем, что означает ошибка 503, как её исправить и как предотвратить её появление в будущем.

Оглавление

  • 1 Что означает ошибка 503
  • 2 Как исправить ошибку 503
    • 2.1 Деактивировать все плагины WordPress
    • 2.2 Проверить файл .htaccess
    • 2.3 Свяжитесь с хостингом
  • 3 Как предотвратить ошибку 503

Что означает ошибка 503

Код 503 сообщает, что запущенный сервис недоступен. Чаще всего это ненадолго: например, доступ к ресурсу закрывают на время перезагрузки или для проведения технического обслуживания. Но иногда ошибка 503 возникает из-за того, что работа системы организована неправильно.

Сервер взаимодействует с очередью запросов: принимает их, обрабатывает и выдаёт ответ. С лёгкими запросами он справляется быстро, со сложными — долго. Если таких тяжёлых запросов много, очередь продвигается медленно. Длина очереди обычно фиксированная. Когда вы заходите на сайт, то отправляете запрос серверу. Если для него нет места, появится ошибка 503.

Ошибка недоступности сервиса 503 возникает, когда ваш веб-сервер не может получить правильный ответ из сценария PHP. Этот PHP-скрипт может быть плагином WordPress, темой или некорректно работающим фрагментом кода.

Как исправить ошибку 503

Как мы упоминали выше, эта ошибка возникает, когда ваш веб-сервер не может получить правильный ответ от PHP-скрипта, работающего в фоновом режиме. Чтобы исправить это, мы будем отключать все ненужные сценарии PHP по одному, пока ошибка не будет устранена. Давайте начнем.

Деактивировать все плагины WordPress

Все ваши плагины WordPress являются PHP-скриптами, поэтому сначала вам нужно деактивировать их. Поскольку вы не можете войти в свою панель управления WordPress из-за ошибки 503, вам необходимо подключиться к вашему веб-сайту через файловый менеджер хостинга. Зайдите в папку wp-content и переименуйте папку плагинов plugins, например в plugins1.Далее вам нужно создать новую папку и назвать ее plugins. Теперь вам нужно зайти на ваш сайт WordPress, чтобы увидеть, решит ли это ошибку. Если это так, то это означает, что плагин, установленный на вашем сайте, вызывал ошибку.

Вышеуказанные шаги отключили все плагины WordPress. Чтобы выяснить, какой плагин вызывал проблему, вам нужно в файловый менеджере. Далее вам нужно перейти в wp-content и удалить пустую папку с плагинами. После этого вам нужно переименовать папку плагинов обратно в plugins. Это сделает все ваши ранее установленные плагины доступными для WordPress. Однако эти плагины останутся деактивированными.

Теперь нужно зайти в админку WordPress и перейти на страницу плагинов. Вы можете активировать свои плагины один за другим и посещать разные страницы на вашем сайте после активации каждого плагина. Продолжайте делать это, пока не найдете плагин, вызывающий ошибку 503.

Проверить файл .htaccess

Файл .htaccess содержит правила для конфигурации вашего сервера и может быть поврежден или содержать ошибочный код. Чтобы проверить это, вам нужно подключиться к вашему сайту через FTP или файловый менеджер и найти файл .htaccess в корневой директории вашего сайта. Переименуйте файл .htaccess в .htaccess_old и зайдите на свой сайт. Если ошибка 503 исчезла, значит проблема была в файле .htaccess.

Чтобы создать новый файл .htaccess без ошибок, зайдите в админку WordPress и перейдите в раздел Настройки — Постоянные ссылки. Нажмите кнопку Сохранить изменения, ничего не меняя в опциях. Это автоматически создаст новый файл .htaccess для вашего сайта.

Свяжитесь с хостингом

Если ни один из вышеуказанных способов не помог исправить ошибку 503 на вашем сайте на WordPress, то возможно проблема на стороне хостинга. Свяжитесь с поддержкой хостинга и объясните им ситуацию. Они могут проверить состояние сервера и его ресурсы и помочь вам решить проблему.

Как предотвратить ошибку 503

Чтобы избежать появления ошибки 503 на вашем сайте на WordPress в будущем, следуйте этим рекомендациям:

  • Выбирайте надежный хостинг с достаточными ресурсами для вашего сайта.
  • Обновляйте свои темы и плагины до последних версий.
  • Используйте только проверенные и безопасные темы и плагины от известных разработчиков.
  • Удаляйте неиспользуемые темы и плагины с вашего сайта.
  • Используйте кэширование и оптимизацию для ускорения загрузки вашего сайта.
  • Защитите свой сайт от DDoS-атак и других видов хакерских атак.

Updated on January 5, 2023

 How to Fix 503 Service Unavailable Error WordPress

HTTP 503 Error WordPress

Table of Contents [TOC]

  • HTTP 503 Error WordPress
    • What Is 503 the Service is Unavailable error?
    • http error 503. the service is unavailable Error Causes
      • By incorrect configuration
  • How to Fix the HTTP error 503 Service Unavailable in WordPress?
    • Disable WordPress plugins
    • Remove and deactivate WP theme
    • Enable WP_DEBUG
    • Faulty PHP CODE
    • Limit Google’s Crawl Rate (Server-Related)
    • Limit WordPress Heartbeat
  • How To Prevent HTTP 503 error in WordPress
    • Upgrade to a Better Hosting Plan
    • Use a Content Delivery Network (CDN)
    • Summary: http error 503. the service is unavailable.
    • Like this:
    • Related

WordPress is the most popular and used CMS in the world, has a super simple interface and also does not require much technical knowledge so we can get it going. However, there are situations in which we can find several errors that are not easy to solve, as in the case of ⚠️ 503 service unavailable WordPress error.

We are going to dedicate this article to this particular error, so that you will learn how to fix 503 service unavailable error in WordPress and you will also discover why it happens.

What Is 503 the Service is Unavailable error?

On the Internet, there are different codes to designate the different types of errors with which we can cross in certain situations. For example, a 404 error indicates that the requested content has not been found, just as a 403 error indicates that there is a File and Folder Permissions Error in WordPress site, an error 500 means internal server error.

In the world of hosting, error 503 ⚠️ means that the server has received our request but has not been able to process it.

503-service-unavailable-error-example-wordpress

When you encounter 503 error with WordPress, it means that the server in question is unavailable. Most of the time, it just shows up with a “Service temporarily unavailable” message.If you’re lucky, the 503 error code will have occurred because your WordPress website is under maintenance.

WordPress very briefly sets your site to maintenance mode when you’re updating a plugin, a theme, or the core software. 💡[Fix WordPress Stuck in Maintenance Mode – Tutorial]

To understand it, we must know how a server works. To stop beating around the bush, our basic explanation is that the browser sends a request or number of requests to the server.

This responds with a code and dispatching the site, the mentioned code is usually 200 to indicate that the request was successfully dispatched. In case of any problem, the response code will change and a 503 error⚠️ indicates that there was indeed a problem.

For example, you can see these error codes instead:

  • ⚠️ 503 Service Unavailable
  • ⚠️ Http/1.1 Service Unavailable
  • ⚠️ HTTP Server Error 503
  • ⚠️ 503 Error
  • ⚠️ HTTP 503
  • ⚠️ HTTP Error 503

In this tutorial, we will show how to debug and fix http 503 service error in WordPress sites. Firstly, you need to understand what are the most common causes of Error 503 (Service Temporarily Unavailable) . After that, you’ll need to follow several steps in order to locate the root cause and fix HTTP 503 Service Unavailable Error in WordPress.

http error 503. the service is unavailable Error Causes

The 503 error is a distribution server error that occurs when your server cannot distribute a file to another server. It means there is a problem with the file or with your hosting provider. Sometimes, this error can occur if you have made changes to your website but forgot to update some plugins or themes. Or, if you were trying to access files on your website, but they were not uploaded correctly.

In most cases, this error occurs when there is a problem with your web host’s server or network connection. You may also see this message if someone else has tried to access your site at the same time as you (this happens often).

A 503 Service Unavailable on Fresh Install or on an already running site can be caused by  a number of things including (but not limited to):

  • Infected plugins or themes – [Read How to scan Malware in WordPress Themes ]
  • A misbehaving custom PHP script – [Read Web Shell PHP Exploit]
  • Insufficient server resources – [Read This Account Has Been Suspended – WordPress Down ]
  • Server glitches – [Read Error Establishing a Database Connection in WordPress, File Type Is Not Permitted For Security Reasons ]
  • WordPress Malware attack/hack – [Also Read 💡How To Remove Malware in WordPress site]
  • You may be doing some maintenance at that time. For example, if you are making a backup of your website or if you are optimizing WordPress images with a plugin, this implies a normally high resource consumption, which can lead to a 503 error.
  • It could also be a configuration problem. If you have manually entered rules in the .htaccess file or some code in a php file (for example, to do a redirect or to configure Google Analytics) and you have made a mistake, the file may behave incorrectly and this may lead to an error 503 (although the most normal thing is that it results in a 500 error).
  • The interactions between plugins and templates can also affect. Each WordPress component is usually programmed by a different development team, which may cause incompatibilities not known to each other. These incompatibilities will result in high consumption of resources and, as a consequence, ends up in an error 503.
  • A peak in website traffic can cause a 503 error if you have not taken the appropriate measures.
  • The most common is that your website has just grown and you need to buy bigger hosting or with better maintenance.

As you can see, there are many possible causes for a 503 error. Therefore, you have to go step by step, testing and discarding possibilities until you find the origin of your specific problem.

“Through error 503, the server is telling you: “Right now I am very busy. Please come back later.”

As we have been saying, error 503 is telling us that the web server at this time cannot send the requested resources. This can be a temporary error or it can be a fixed error, that is to say, it will not go “by itself”

There are several causes behind a 503 error, among which we can find problems at the level of the network, an error in the configuration of the DNS or the DNS zone of the domain in question, or even a problem of resources to dispatch the request (due to an overload, for example).

As we said, the causes of a 503 error can be several, and obviously, WordPress is not the only system that can present an error of this type, in fact, it can happen to virtually any kind of site.

Leaving aside already mentioned causes such as overloads, DNS problems or network failures, most of the 503 errors in WordPress have their origin in the use of their own scripts. Here, we are talking about those scripts that are not part of the default structure of WordPress, as well as it can also be given by problems generated at the level of plugins or even the side of the theme that we are using.

The causes of 503 service error in WordPress can be; problems at the server level as well as by some conflict on the site itself. This means that there is no universal solution for this error, but must be resolved according to each case.

By incorrect configuration

If modifying WordPress files you have caused a 503 service unavailable error, you have to restore the backup you have made of the files before modifying them. But what if you do not have a backup? Well, you have to do several things:

  • If it is a file of a plugin or theme, you can download it again from the official repository.
  • If this is not possible, you can see if your hosting provider has a recent copy of the file.
  • In both cases, you should go to the nearest tattoo studio to have the word ” BACKUP ” written on Comic Sans on the back of your hand. So surely for the next, you do not forget. 🙂

There will be situations in which you simply cannot know the origin of error 503. Especially, if your hosting plan is shared, you will not have access to some important logs for diagnosis; and anyway, some checks are very technical and you can escape.

That’s where the importance of the technical service of your hosting comes into play. If after following the guidelines of this article you are not clear about the problem, you should not hesitate to contact the experts of your hosting company.

Although sometimes they cannot give you a direct solution to the problem, surely they can help you to have a clearer picture of the situation and propose some solutions to the 503 error.

How to Fix the HTTP error 503 Service Unavailable in WordPress?

Fortunately, in general, this error is easy to solve, although reaching this solution may take some time depending on where the problem originates.

Based on the client-server model, several of the causes may be on the server side, in which case the one who will be responsible for resolving it will be the administrator of the server. If you have a good hosting provider, then it should not take long to solve a problem of this type that is originating at the server level.

But what happens if the error arises from our site? In that case, we must get down to work and first of all, examine the sources. We have mentioned some of the fixes you can implement in order to Fix ‘503 Service Unavailable’ WordPress Error

Disable WordPress plugins

In the case of plugins, the best thing we can do is start disabling them one by one.

This can be done directly from the WordPress administration panel, just enter there and you are deactivating the plugins one by one and testing the site, until you find the problematic one. What if you cannot access the panel because it also gives an error?

In that case, we have to put on gloves and get down to work, since we are going to deactivate the plugins from an FTP manager, although the cPanel file manager also works.

By means of an FTP manager, we will have to enter the wp-content/plugins folder of our site, and there we will see the folders of each plugin. What we will do is to remove permits (that is, assign permissions 000) one by one and testing the site.

Below are the steps in details to follow:

  • Access your server using an FTP client
  • Locate a file which is often named public_html WordPress root folder
  • Navigate to the wp-content directory from the root folder
  • Look for “plugins” folder, right-click on it, and choose the Rename option. Rename plugins folder with FileZilla

  • Change the name of the plugins folder to something such as plugins-deactivated or anything else you like, as long as you remember what it is.
  • Try accessing your WordPress website.

This process is similar to what we would do from the WordPress administrator, just keep in mind that you may need to reconfigure your plugins later. If you hit the problematic plugin, you can return the permissions to the previous ones, using the following setting should be enough:

  • 755 for all folders and sub-folders.
  • 644 for all files.

Great, you’ve found the problematic plugin but you have to leave it disabled because it breaks your site, what to do in that case?

In that situation, the help should come from the plugin programmer, which is the team or person who developed it, so get in touch with the developer of the problematic plugin and report the situation.

Remove and deactivate WP theme

If you have performed these procedures and do not find a problematic plugin, then there is a possibility that the error is caused by the theme or template you are using.

If so, you will have to perform the same process that you did with the plugins, but this time deactivating the theme.

You can do it from the WordPress administrator or, if it is not available, through FTP or a file manager. Remember that templates in WordPress are stored within wp-content/themes. Search your active theme there and put 000 permissions on it or change its name, and then test your site.

  • Get access to your cPanel using an FTP client.
  • Locate the wp-content/themes from the root directory.
  • Navigate to a folder that shares a similar name to your active theme.
  • Right-click on the theme’s folder and choose the Rename option.
  • Change your theme name to mytheme-deactivated
  • Go to your WordPress website and review it as a visitor.

If the web starts working then the 503 error is caused by your theme. You can try to download it again, maybe only one file is missing and that causes the error, or you will have to contact its creator and present the case. If you cannot get a solution on that side, then surely you have no choice but to change the theme of your site.

Enable WP_DEBUG

Finally, the other possible cause of our nightmares maybe some script we have on the site. In that case, the best option we can take is to enable the sample of errors, otherwise, it will be very difficult to find the problem by doing a manual search between scripts.

  • Enable WordPress Debug Feature

But since the 503 error often locks you out of your WordPress admin, we shall use WP_DEBUG and WP_DEBUG_LOG, WP_DEBUG_DISPLAY and @ini_set constants available to WordPress.

To enable debug mode in WordPress and write errors to a log file,  follow these steps:

  1. Open your WordPress directory via FTP or File Manager.
  2. Open the wp-config.php file
  3. Scroll down to where WP_DEBUG is defined. It looks like this define ('WP_DEBUG', false);. If it is missing, we will add it just above the line that says /*That's all, stop editing! Happy blogging.*/
  4. Insert the DEBUG magic codes. Just change the above define ('WP_DEBUG', false); code to:
    define ('WP_DEBUG', true);
    define ('WP_DEBUG_LOG', true);
    define ('WP_DEBUG_DISPLAY', false);
    @ini_set ('display_errors', 0);
  5. Save changes

enable-debug-in-wp-config

This file contains all the errors on your website. If your 503 service unavailable error is caused by a custom code snippet, it will show up somewhere with details of the error.

Faulty PHP CODE

To enable the sample of errors in PHP there are several options, perhaps the simplest is to open our file wp-config.php (located at the root of the site) and add near the end of the following line:

  • ini_set(‘display_errors’, 0);
  • We must place it in the position indicated in the image, not in the last line of the file.
  • We save the change, we test the site and we should see where the source of the error is located.
  • If for some reason, we cannot access this method to show PHP errors, then we can choose to do it through our user’s PHP, as long as we can customize it clearly.
  • This should not be a problem if your hosting provides a modern server (such as LiteSpeed ​​or Nginx ) with customizable PHP, for example, if you have cPanel it is 99% sure that you can configure the variable display_errors at ease, ask your provider to turn in on/off.
  • In the image below, we can see where to make this change in the infrastructure servers through the PHP Selector available in cPanel.

 errors in PHP using display_errors

Another way to activate the display of errors in PHP using display_errors is directly editing the php.ini of the server, but we must bear in mind that for this it is necessary that we have root access to the server, and it is also essential that we know how to use the console.

In case you activate PHP’s display_errors, regardless of whether you did it through wp-config.php or with one of the other described methods, remember to deactivate it when you no longer need it, since having it active permanently is a serious failure to the security level.

Keep in mind that leaving the variable display_errors status “On” may cause part of your code, file and folder structure to be shown, and that can be used by third parties to hack your site, upload malicious content, etc.

Related – WordPress HTTP Image Upload Error

Specifically, Google’s crawl is a software whose main mission is to explore the Web to analyze the content of documents visited and store them organized in an index.

The crawler, therefore, travels continuously, autonomously and automatically, the various sites and Internet pages in search of new content or possible updates of content already explored in the past.

Google’s maximum crawl rate can be another reason that causes 503 error in WordPress, which can be fixed by following 3 tips:

  • Increase the hosting packages so you will have more resources.
  • Slow down the work and do not update anything for awhile. Obviously, you’re going to miss visits, but sometimes it’s the only option. When the traffic normalizes you will recover the normal use of the web.
  • Optimize WordPress so that, in case of an avalanche of visits, it doesn’t consume so many resources and not cause an error 503. [Also Read – Optimize WordPress – Repair Corrupted Tables]

Login to Google Search Console and select your website.

Next, click the gear icon and select site settings as shown below:

On the next screen, adjust the Google crawl rate by dragging the slider to the left side:

fix-503-service-unavailable-error-in-wordpress-site-settings

503-service-unavailable-error-in-wordpress-crawl-rate-search-console

Limit WordPress Heartbeat

It’s responsible for features such as post autosaving and so on.

The WordPress Heartbeat API fires a file known as admin-ajax.php among other queries at regular intervals when you’re logged into your site.To determine if WordPress Heartbeat is the cause of the 503 service unavailable error on your WordPress site, add the following code into your theme’s functions.php file right after the opening <?php tag:

Save your changes and reload your site. If the 503 error is gone, take a breather. But if the 503 service unavailable error is still there, it means the WordPress Heartbeat API is the least of your troubles.

If the below code didn’t fix the 503 error, don’t forget to remove the code from your functions.php file.

add_action( ‘init’, ‘stop_heartbeat’, 1 );
function stop_heartbeat() {
wp_deregister_script(‘heartbeat’);
}

How To Prevent HTTP 503 error in WordPress

Before we start the problem-solving strategy, we talked about how spikes in traffic can cause 503 errors. If you want to avoid encountering this problem in the future, there are two things you can do to be proactive.

Upgrade to a Better Hosting Plan

The fact that WordPress is one of the most used CMS worldwide makes it the main target of hackers. When a security hole is detected in a plugin or at the core level, many malicious users take advantage of these common wordpress security vulnerabilities to take control of many websites.

With improved security in Managed WordPress Hosting plans by Host & Protect (Recommended), you can rest assured of security updates, backups and protection against WordPress brute force attack & WordPress DDoS attacks so you can sleep peacefully.

Use a Content Delivery Network (CDN)

We use the acronym CDN, but the real name is Content Delivery Network.

If we decipher the name, we quickly understand that the CDN is a network server for the distribution of content.

This network server is connected to the 4 corners of the world for two reasons:

  • Distribute content faster to the user: The closer you are to it, the faster the content will arrive. We are talking about a hundredth, a thousandth of a second, but it is HUGE when we know that a site should ideally load in 3 seconds MAXIMUM.
  • Securing the content of your website: Because your site is accessible from all over the world, it is “almost” impossible to discover, what is the real server that hosts your website and attacking it.

Some of the top WordPress CDN services are MaxCDN, Cloudflare & Rackspace.

Summary: http error 503. the service is unavailable.

As we have already seen, the 503 service unavailable error in WordPress can be quite annoying, but its solution is usually simple.

The problem can be presented by an error on the server side as well as originate from the WordPress site, in which case it is advisable to check our plugins and themes to find the cause, as well as activate the display of errors in PHP temporarily, with all this It should be more than enough to locate the origin.

Once we have found the origin of the 503 service error, we will have to evaluate how to solve it, and that depends on where the problem lies. Tracking user activity in WordPress can also help you in this case.

If it is a conflict of a plugin or a theme we should usually contact the developer of the plugin or the theme, while if it is a problem of our own script, we will have to see it on our own or with the help of our programmer or hosting provider.

Have you ever encountered the 503 service is unavailable error? How did you fix it? Please share with us in the comments below. Thanks in advance!

Scanning and Fixing Your WordPress Site for MalwareWe have created a custom search engine where you can find other WordPress errors, tips & tutorials – Visit Here

Other Popular Topics You Might Want To Read:

  • WordPress Theme Security
  • WordPress Malware Removal Checklist
  • WordPress .htaccess hacked
  • WordPress Stuck in Maintenance Mode
  • WordPress Security Checklist
  • WordPress Maintenance Checklist

Check Out Our In-depth Guides

  • Best WordPress Image Optimization Plugins 2023
  • How to Add Security Headers in WordPress
  • WordPress CSRF Protection – Prevent CSRF Attack
  • How To Restore WordPress Site From Backup
  • How to Password Protect A WordPress Site/Post
  • How to Block Countries In WordPress Using IP Address?
  • Best WordPress Staging Plugins To Create A Test Site
  • How to Fix ERR_SSL_PROTOCOL_ERROR on Google Chrome

Как и любая проблема с доступом к интернет-ресурсам, ошибка 503 Service Unavailable («Сервис недоступен») может быть вызвана сбоями как на стороне пользователя, так и на стороне сервера, на котором находится сайт. Поэтому первое, что нужно сделать, если вы столкнулись с таким сообщением при посещении веб-ресурса, попробовать устранить сбой своими силами. Это намного проще и быстрее, чем пытаться донести информацию о возникших сложностях до владельца сайта.

Процедура устранения проблемы со стороны администратора веб-ресурса более сложная, но в большинстве случаев именно неправильные настройки на уровне хостинга или настроек сайта в панели управления CMS приводят к появлению ошибки сервера с кодом 503.

Мощный хостинг в подарок при заказе лицензии 1С-Битрикс

Выбирайте надежную CMS с регулярными обновлениями системы и профессиональной поддержкой. А мы подарим вам год мощного хостинга – специально для сайтов на 1С-Битрикс.

Заказать

Устранение ошибки 503 пользователем

Возникает резонный вопрос: почему бы просто не покинуть проблемный сайт, пусть сами разбираются со своими багами? Это решение очевидное, но не совсем верное. Во-первых, вам может быть очень необходимо посетить именно этот веб-ресурс. Во-вторых, появление сигнала об ошибке доступа может говорить о том, что с вашим браузером, программным обеспечением, компьютером или другими устройствами что-то не в порядке. И тогда это уже ваша проблема, которая может повторяться систематически и при посещении других сайтов. Рассмотрим, что можно сделать самому, чтобы исправить ошибку 503, двигаясь от простого к сложному.

  1. Обновите вкладку браузера. Это покажется странным, но зачастую такое простое действие приводит к положительному результату. Нажмите клавишу F5 или воспользуйтесь специальной кнопкой в меню браузера.
  2. Закройте и откройте браузер. Таким образом вы произведете сброс текущей сессии соединения и обновите его. При новом подключении скрипт браузера может не обнаружить ошибку 503, если она была воспринята им ошибочно.
  3. Стоит убедиться, что сбой не связан именно с вашим компьютером. Это особенно актуально, если ошибки соединения с веб-ресурсами повторяются регулярно и возникают с разными кодировками на других сайтах. Для этого необходимо посетить проблемную страницу с другого устройства и желательно через новое интернет-соединение.
  4. Зайдите на страницу, выдавшую ошибку 503, используя другой браузер. Вполне вероятно, что дефект возникает из-за некорректных настроек текущего. Если это подтвердится, стоит в них покопаться и найти источник возникновения проблемы. Самое простое, это восстановить настройки по умолчанию.
  5. Перезагрузка компьютера. Как и любой программный сбой на уровне операционной системы или другого программного обеспечения, он может быть исправлен автоматически при новой загрузке системы.
  6. Очистка кэша и удаление файлов cookies.  В зависимости от настроек конкретного браузера в них может сохраняться много «лишней» информации при обмене web-данными. Операция довольно несложная, но стоит предварительно посмотреть help по данному вопросу, т.к. в каждом браузере она проводится по-разному.
  7. Перезагрузка сетевого оборудования. Часто сложности при соединении с интернет-ресурсами возникают из-за некорректного поведения ПО на внешних устройствах, через которые вы получаете трафик. Это может быть роутер, раздающий интернет как по кабелю, так и через Wi-Fi. Необходимо отключить соответствующую железку по питанию, т.е. полностью обесточить ее примерно на одну минуту. Если провайдер выдает вам динамический ip-адрес, то произойдет его смена, что тоже может привести к устранению появления ошибки 503.
  8. Смена DNS-адреса на сервере. Это решение является наиболее сложным для обычного пользователя. В большинстве интернет-соединений используется общедоступный DNS-адрес Google. Изменить его можно через «Панель управления компьютера» в «Центре управления сетями и общим доступом». Данные манипуляции довольно критичны для устойчивой работы интернета на вашем компьютере. Поэтому производить их стоит только тогда, когда вы абсолютно уверены в своей IT-подготовке.

Если ни один из вышеприведенных способов не помог, а достучаться до сайта ну очень нужно, пишите о проблеме в техподдержку данного ресурса, приложив скриншот страницы с кодом и описанием ошибки.

Ошибка 503 может отображаться в разных форматах с дополнительными информативными сообщениями. Появление страницы «503 Service Temporary Unavailable – Сервис временно недоступен» говорит о том, что проблема носит временный характер. В этом случае пользователю рекомендуется не предпринимать никаких действий и просто дождаться, когда доступ восстановится автоматически.

Ошибка 503 HTTP

Решение проблем с ошибкой 503 администратором веб-ресурса

При возникновении ошибки 503 Service Unavailable в любом ее проявлении администратор web-ресурса в первую очередь должен разобраться в причине ее появления. Игнорирование данной процедуры по принципу «само пройдет» может привести к тому, что сайт понесет глобальные потери в объеме пользовательского трафика и, как следствие, конверсии. Посетители, регулярно сталкивающиеся с проблемами доступа к определенному ресурсу, очень быстро занесут его в «игнор».

В зависимости от конкретного тарифного плана хостинга каждый сайт имеет ограничения по одновременной обработке запросов, поступающих на сервер от конечных пользователей. Более простые запросы браузеров обрабатываются практически мгновенно, сложные ожидают очереди в порядке их поступления. Количество отложенных запросов лимитировано, при превышении нормы каждый следующий отклоняется. В этом случае посетитель сайта видит на экране сообщение с кодировкой error 503.

Наиболее частые причины возникновения ошибки 503 на стороне сервера

  1. При получении запроса от пользователя конкретная страница сайта не может установить соединение с базой данных MySQL.
  2. Некорректная работа плагинов и расширений из-за внутренних ошибок или конфликта между собой.
  3. Использование недорого хостинга и маломощного сервера приводит к тому, что оборудование не справляется с обработкой входящего трафика.
  4. Ресурсоемкие скрипты создают дополнительную нагрузку на сервер.
  5. Задействован почтовый сервис, выполняющий автоматическую рассылку сообщений в большом объеме.
  6. Соединение с удаленным сервером может привести к замедлению обработки запросов.
  7. Передача файлов большого объема при помощи PHP-скрипта.
  8. Значительное количество нерабочих модулей конкретной CMS.

Как видим, решение практически всех проблем, приводящих к появлению ошибки 503, достигается использованием более мощных серверов и высокоскоростного качественного хостинга. Отрицательная сторона этого способа в его затратности. Распределение пользовательского трафика неравномерно по времени, и банальный апгрейд железа не поможет полностью исключить сбои в моменты пиковых нагрузок.

Как избежать появления ошибок 503

Для начала рекомендуется провести статистический анализ через административную панель (снять логи), чтобы понять, какие процессы создают максимальную нагрузку на сервер, и произвести определенные изменения в настройках.

Уменьшение нагрузки на базу данных можно добиться следующими способами:

  • Регулярное обновление CMS, которое позволяет оптимизировать работу движка, уменьшить количество багов.
  • Установка защиты от ботов и парсеров, которые часто запускаются вашими конкурентами, чтобы создать дополнительную нагрузку на ресурс и тем самым вывести его частично или полностью из строя.
  • Уменьшение размера и, если это возможно, количества графических файлов на сайте, а также «тяжелых» таблиц.
  • Ввод ограничений на количество одновременных участников в чате.

Оптимизация работы скриптов

  • Отключите все лишние плагины и дополнения, кроме тех, которые реально необходимы для бесперебойной работы сайта (кэширование, оптимизация базы данных, создание бэкапов, сжатие изображений).
  • Осуществляйте передачу файлов большого объема через FTP, т.к. использование других способов передачи данных приводит к созданию отдельного процесса.
  • Осуществляйте массовую почтовую рассылку в моменты отсутствия пиковой нагрузки на сайт, например, ночью или ранним утром.
  • При использовании удаленного сервера минимизируйте время ответа и оптимизируйте канал соединения.
  • Проверьте наличие проблемных запросов к базе MySQL в файле mysql-slow.log.

Дополнительную нагрузку на сервер, приводящую к появлению ошибки 503, могут создать DDoS-атаки. Защита от них с помощью фильтрации относится к отдельной теме обсуждения.

Следует отметить, что ошибка 503, вызванная перегрузкой серверных мощностей, может пройти сама собой, без внешнего вмешательства. Чтобы понять, произошло ли исправление ситуации, достаточно периодически перезагружать сайт.

Заключение

Ошибка 503 Service Unavailable может возникнуть на любом сайте, управляемом одной из наиболее популярных CMS – WordPress (Вордпресс), Joomla (Джумла), DLE (ДЛЕ) и любой другой, использующей базы данных MySQL. Способов ее решения много, начиная от самых простых на уровне пользователя и заканчивая довольно сложными процедурами, которые должен выполнить администратор сайта.

Буду благодарен, если вы нашли нестандартный подход к устранению сбоя с кодировкой 503 и готовы поделиться своим опытом в комментариях!

Вы видите ошибку 503 Service Unavailable в WordPress? Проблема ошибки 503 является то, что она не дает никаких намеков о том, что ее вызывает, что делает ее очень сложной для начинающих. В этой статье мы покажем вам, как исправить ошибку 503 Service Unavailable в WordPress.

Причины ошибки 503 Service Unavailable в WordPress?

Все хостинговые компании предлагает фиксированное количество ресурсов для каждой учетной записи хостинга на WordPress. Для сайтов на виртуальном хостинге, это ограничение не позволяет обрабатывать большое использование ресурсов сервера.

Ошибка 503 Service Unavailable происходит, когда ваш веб — сервер не может получить правильный ответ от PHP скрипта. Этим скриптом может быть WordPress плагин, тема или плохо разработанный пользовательский фрагмент кода.

Если ошибка вызвана интенсивным использованием, глюком сервера или атаками DDoS, то он может автоматически исчезнуть в течение нескольких минут.

Однако, если это вызвано плохим кодом на вашем сайте, то он будет происходить постоянно, если не найти и не отключить код, который вызывает его.

А теперь, давайте посмотрим, как легко исправить ошибку 503 Service Unavailable в WordPress.

Исправление ошибки 503 Service Unavailable в WordPress

Как мы уже упоминали выше, эта ошибка возникает, когда ваш веб-сервер не может получить правильный ответ от PHP скрипта, который работает в фоновом режиме.

Чтобы исправить это, мы отключим все ненужные скрипты один за другим, пока не будет устранена ошибка.

Давайте начнем.

Деактивируем все плагины в WordPress

Все ваши плагины в WordPress имеют PHP скрипты, поэтому сначала нужно отключить все WordPress плагины.

Так как вы не можете войти в свою приборную панель в WordPress из-за ошибки 503, вам нужно будет подключиться к веб-сайта с помощью FTP-клиента или файлового менеджера в CPanel. После подключения, перейдите к папке /wp-content/ и переименуйте папку plugins в plugins-old.

Как исправить ошибку 503 Service Unavailable в WordPress

Далее, вам нужно создать новую папку и назовите его plugins.

Теперь вам нужно посетить ваш WordPress сайт, чтобы увидеть, что это ошибка была устранена.

Если это так, то это означает, что какой то из плагинов, установленный на вашем сайте был причиной ошибки. Вышеуказанные шаги выключили все WordPress плагины.

Для того, чтобы выяснить, какой плагин вызывает проблему, необходимо переключиться на ваш FTP-клиент или файловый менеджер в CPanel. Далее, вам нужно перейти в папку /wp-content/ и удалить пустую папку плагинов.

Как исправить ошибку 503 Service Unavailable в WordPress

После этого вам необходимо переименовать папку плагинов plugins-old. Это сделает все ваши ранее установленные плагины доступными для WordPress. Тем не менее, эти модули будут оставаться отключенными.

Вы должны посетить админку WordPress, а затем перейти на страницу плагинов. Вы можете активировать плагин по одному и посетить различные страницы на сайте после активации каждого плагина. Продолжайте делать это до тех пор, пока не найдете плагин, который вызывает ошибку 503.

Если этот шаг решит проблему, то вам не нужно следовать дальнейшим инструкциям на этой странице. В противном случае, вы можете переходить к следующему шагу.

Переключить на тему по умолчанию в WordPress

Если с помощью деактивации плагинов не удалось решить проблему, то следующий шаг это перейти к теме по умолчанию в WordPress. Это отключит вашу текущую тему WordPress.

Во-первых, вам нужно подключить к WordPress сайту с помощью клиента FTP или файловый менеджер в CPanel. После подключения, перейдите к папке /wp-content/themes/.

Как исправить ошибку 503 Service Unavailable в WordPress

Найдите текущую активную тему WordPress и загрузите ее на свой компьютер в качестве резервной копии.

После загрузки вашей темы, вы можете пойти дальше и удалить ее с вашего сайта

Теперь, если у вас уже есть тема по умолчанию, как Twenty Seventeen или Twenty Sixteen, то она будет автоматически активирована. Если вы этого не сделаете, то вы можете пойти дальше и установить тему по умолчанию на вашем сайте.

Тщательно проверьте свой веб-сайт, чтобы убедиться, что разрешена ошибку 503 Service Unavailable.

Исправление проблем

Если оба метода, с помощью которых можно устранить ошибку, вы можете предпринять следующие шаги:

  • Обратитесь к хостинг компании, потому что они могут быть в состоянии определить, что вызывает проблему.
  • В крайнем случае, вы можете повторно установить WordPress с новой копией.

Мы надеемся, что эта статья помогла вам узнать, как исправить 503 Service Unavailable ошибки в WordPress. Вы также можете увидеть наш окончательный список наиболее распространенных ошибок WordPress и как их исправить.

Если вы нашли ошибку, пожалуйста, выделите фрагмент текста и нажмите Ctrl+Enter.

Понравилась статья? Поделить с друзьями:
  • Ошибка 504 ваз гранта
  • Ошибка 504 ваз 21214
  • Ошибка 504 битрикс при установке
  • Ошибка 504 mail ru
  • Ошибка 504 libreoffice calc