Maintenance WP’s blog

How to fix a 503 error on WordPress?

29 Jul 2022 | WordPress Support

First, there is this blank page. A blank page with some not very understandable indications. The number 503 appears here, and the following two words are often seen there: “service unavailable“.

And then there is this feeling of distress, tinged with incomprehension. Suddenly, your site has become unavailable. Just like that, without warning. No doubt about it: you are facing a 503 error on WordPress

To get rid of it as soon as possible, follow our guide. In this article, you will discover the causes of this error, as well as 6 concrete solutions, with screenshots, to fix it immediately.

What is a 503 error?

A 503 error indicates that your web hosting server cannot respond to a request made by a web browser. As a result, the target page cannot be displayed, and the site you want to browse is temporarily unavailable (“service unavailable”).

If we look at the technical aspect for a few seconds, you should know that a 503 error is an HTTP error (on WordPress, there are also PHP, MySQL, or JavaScript errors).

By the way, the Mozilla browser’s developer documentation tells us that the number 503 corresponds to “an HTTP server error response code”.

So much for theory. In practice, a 503 error prevents you, the webmaster, from accessing the administration interface(back office) of your WordPress site via the classic login page.

As you’ll see later in this article, you’ll need to use your FTP client to find the source of the error and fix it.

What does a 503 error look like?

A 503 error can be quite confusing for you, because it gives almost no indication of the source of the problem.

Here is an example of a typical page that may appear on your screen when this error decides to bother you:

Un exemple d'erreur HTTP 503 qui peut se produire sur WordPress.

And to top it all off, note that this page can also be displayed in different forms, with error messages bearing the following labels:

  • Error 503 Service Unavailable;
  • 503 Error;
  • Error 503 : Backend Unavailable;
  • 503 Service Unavailable;
  • HTTP 503 Error or HTTP Error 503;
  • HTTP Error 503;
  • HTTP 503;
  • Status code HTTP Error 503;
  • HTTP Error 503 : The Service is Unavailable;
  • 503 Service Temporary Unavailable etc.

Why does this kind of unpleasant message appear all of a sudden, without you having asked anything? Elements of an answer just below.

What are the main causes of a 503 error?

The Mozilla documentation, quoted earlier in this article, gives a first concrete clue.

According to it, a 503 error usually occurs because the server is down or inaccessible due to maintenance or overload”.

Here you are a little further along, but you’ll see right away: there are other causes that can make your site temporarily unavailable. Let’s break down the most important ones.

Cause #1 of the 503 error: server overload

A 503 error message on your WordPress site may first appear on your screen when your hosting server is suffering from an overload.

In concrete terms, this means that it is not able to handle an influx of visits during a traffic peak, especially if the server is shared (you share its resources and storage space with other webmasters).

An overload can also be due to attacks caused by malware (malicious software) or bots (robots) that spam your site with the sole purpose of harming you.

Un statut d'erreur 503.

Cause n°2 : the maintenance of the hosting server

After overload, maintenance is the second cause of an HTTP 503 error

In order to function at full capacity, a web server needs to be maintained to function properly and remain secure. It is therefore sometimes updated, making your site unavailable.

Generally, web hosts perform this type of operation during the night, so that it has the least possible impact on the availability of the sites. Some hosts – not all – will also take the trouble to warn you in case of deployment of a major maintenance.

However, don’t worry: most of the time, these operations take place without you noticing.

Your server may also become unavailable momentarily when you update the plugins and themes of your WordPress site.
In this case, the most widely used CMS (Content Management System) on the planet enters what it calls a Maintenance Mode.

The following message may appear on your screen:

message de maintenance wordpress

Cause #3: a plugin or theme with broken code

If your WordPress plugins and theme can play tricks on you when you update them, they can also cause a 503 error on WordPress if they are badly coded.

This is the case when they contain a PHP script that cannot be interpreted correctly by the server. Unable to display the requested request, the server becomes unavailable.

In the same spirit, you can also encounter a nice 503 when you decide to add a piece of custom code – in the jargon, we talk about snippet – on your WordPress website.

In case of a syntax error or bad code, your site may crash and the connection becomes impossible. No one can access your services anymore.

Good to know: Even though it is less frequent than the first three, a faulty DNS configuration can also be the cause of a 503 error. For your information, DNS is the acronym for Domain Name System. It is a server that translates your domain name (e.g. maintenance-wp.fr) into an IP address, details Wikipedia.

As you can see, there are several reasons why a 503 error may occur. Although annoying, it can disappear automatically almost as quickly as it appeared.

If it continues to stick to your screen, you will have no choice. You’ll have to roll up your sleeves to get rid of it.

For detailed instructions on how to do this, go to the next section.

6 solutions to solve a 503 error on WordPress

#1 Reload the error page

You may have already experienced this. Sometimes, a simple workaround can make a 503 error on WordPress disappear with a snap of the fingers.

What’s the magic formula? A quick refresh of the unavailable page by refreshing it on your web browser.

To do this, click on the F5 key on your keyboard, or on the “refresh” icon of your web browser:

Maintenance Wp SSL certificate
The MaintenanceWP website has an SSL certificate ;-).

With a bit of luck, your web server will be back on track in the meantime, and the page you want to view will be accessible again (its status is normal).

Don’t hesitate to repeat this operation for a few minutes to check that everything is back to normal.

#2 Check your plugins to resolve a 503 error on WordPress

Refreshing your page isn’t helping? Put on your heat blue. You’re going to check that the source of the error isn’t coming from one of your extensions.

First of all, there’s a problem: you can’t connect to your site from its front-end, because no page can be displayed.

To access it, you have two options

  • use an FTP (File Transfer Protocol) client. This is a software that allows you to connect to your hosting server in order to manipulate the files and folders that make up your WordPress site;
  • go through the admin of your hosting company. For info, one of the most famous is called cPanel. Many hosts use it, especially on shared servers.

In this article, we will opt for the use of an FTP software, in this case Filezilla. Free and open source, Filezilla is also one of the most popular tools, compatible on all platforms.

Filezilla peut aider à trouver et à résoudre une erreur HTTP 503.

If it doesn’t suit you, you can also turn to Cyberduck (macOS and Windows, free) or Transmit (macOS, paid).

Step 1: Connect to the FTP client

Install Filezilla on your computer, then connect using the credentials provided by your hosting provider.

In particular, you will need to fill in the following information

  • host
  • port ;
  • the login or username
  • password.

Step 2: Create a new plugins folder

To understand this, you should know that Filezilla is divided into two parts:

  • on the left, you have access to all files and folders on your local site (your computer);
  • on the right, you have access to the files and folders on your remote site (the hosting server).

Go to the right side, in public_html. Depending on your host, this folder may have another name, like htdocs or www.

For your information, this public_html is the rootof your site. Inside, you will find all the directories and files of your website.

the /wp-content folder
The /wp-content folder

Double-click on the wp-content folder, then rename the plugins folder inside, calling it plugins-error for example.

Continue by creating a new folder that you will name plugins (like the old one). WordPress will then automatically deactivate all your extensions.

Step 3: Try to display your site

Now it’s time to go back to your browser and try to display your site. You will be presented with two options

  1. The site will display again. Log in using your WordPress credentials, then re-enable each plugin one by one, checking each time that your page is displayed.
    Delete the plugin that is causing the HTTP 503 error on your FTP, in the wp-content > plugins folder. When the operation is finished and all your plugins have been reactivated, remember to delete the plugins-error folder on your FTP;
  2. The 503 error is still there. In this case, you should look for the fault elsewhere, since your WordPress plugins do not seem to be at fault.
    While waiting to move on, delete the plugins folder on your FTP and rename the plugins-error folder to plugins.

Good to know: To avoid problems with extensions as much as possible, prefer those listed in the the official directory. Their code is checked by a dedicated team before being added, which guarantees a certain quality. Also pay attention to the frequency of update the ratings and user reviews. The better they are, the more likely you are to find a serious extension. By the way, this advice is also valid when choosing your theme.

#3 Check your theme

Your plugins are not at fault? Don’t be discouraged, the 503 error may be caused by your theme.

The steps to follow are similar to those detailed in the previous sub-section. In summary, you must :

  1. Go to the wp-content > themes directory.
  2. Download your active theme folder by right clicking and selecting “Download”. Place it in a safe place on your computer or even on an external hard drive.
  3. Delete the theme you just downloaded (right click > Delete).
delete WordPress theme

Normally, WordPress will then automatically activate one of its native themes by default. At the time of writing, the most recent native theme was called Twenty-Twenty Two.

You may have another theme at home that starts with Twenty something.

Go back to your site and see if that damn 503 error is still there:

  • it’s gone. Good, your theme was probably the cause. Replace it with another one or, if you want to keep it, contact the theme’s support and tell them about the problem;
  • the error remains. Reinstall your theme, the one you previously downloaded to your computer, by uploading it to your FTP.

#4 Use WordPress debugging

So far, you know that this 503 error on WordPress is not coming from your extensions or your theme.

The error may be due to a simple piece of PHP code. To try to find out, you can activate the debug mode of WordPress.

To do this, enable a PHP constant called WP_DEBUG. You can find it in the file wp-config.php, which is located in the root of the site (in the public_html folder for our example) on your FTP client.

In this file, manually replace the value “false” by “true ” on the line below:

define( 'WP_DEBUG', true );

define( 'WP_DEBUG_LOG', true );

Eventual errors related to PHP will appear in a log file named debug.log, accessible on your FTP via the following path : wp-content > debug.log.

Warning: This solution is more technical than the two previous ones, so skip it if you don’t feel the manipulation. By the way, WordPress does not recommend using WP_DEBUG on a production site, but rather locally and on test sites.

#5 Optimize the database

Didn’t you get anything out of the debug mode? What if the crux of the problem was in your MySQL database, which stores all the content of your site (plugins, themes, revisions, comments, settings etc.).

The older your site gets, the more your database (DB) tends to grow and accumulate information, and the more likely it is to have trouble functioning properly.

If it is not optimized, it can sometimes generate a 503 error. To take care of it, you can use a dedicated plugin. You can choose from the following

These extensions will help you do a nice cleanup, but before you do, check with your web host, who may have an option for this.

Speaking of your host, find out in the final sub-section some tips on how to improve the resources of the server they have assigned to you.

#6 Increase the resources of your server

Do you remember? A 503 error code is linked to your server. Sometimes, it is also possible that it does not have enough resources to function properly.

Change your hosting package to resolve a 503 error

If you are hosted on a shared server, it may no longer be powerful enough to absorb large increases in traffic, for example.

Ask your host about your problem. He may advise you to switch to a higher package, more in line with your current needs.

Another possibility: switch to a dedicated web hosting (just for you), or specialized WordPress hosting. The performance will be better, but the price will also be higher than with shared hosting.

In any case, talking to your web host about your 503 error will never be too much. Even if your hosting offer is still adequate, they may be able to help you identify the cause of the problem.

Increase the WordPress memory limit

If you’re the stubborn type, also try to increase the PHP memory capacity allocated to WordPress, which is sometimes too low with some hosting providers.

To do so, integrate the following code in the “wp-config.php” file:

define('WP_MEMORY_LIMIT', '1024M');

Good to know: If you use a CDN (Content Delivery Network) proposed by your host (or by a third party solution), beware of this service which allows to accelerate the display speed of your pages. And for good reason: it can sometimes cause 503 errors on your WordPress! To be sure, disable it to check if this is not the case for you.

And if it still blocks, what should I do?

Now you have a broad overview of the 503 error. Throughout these lines, you have discovered the major causes of this error, as well as step-by-step solutions to solve it.

As no one is immune to the occurrence of such an error, we recommend that you frequently back up your site (files + database), in order to be better protected in case of a problem.

And if after reading all our tips and action plan, you still can’t get rid of this HTTP error, or don’t feel like taking action on your own, the WP Maintenance teams can help you solve a 503 error.

Our WordPress support service will provide you with a custom solution that will meet your needs with speed, professionalism and efficiency.

Related posts:

How to fix a 500 error in WordPress?

How to fix a 500 error in WordPress?

Capricious, she strikes at any time. A bit rude, it never asks permission before appearing on your screen. Annoying, it poisons your daily life as a webmaster. And, to top it all off, it keeps the mystery alive: it's impossible to know exactly what's causing it. It's...

How to choose a WordPress expert?

How to choose a WordPress expert?

To make your digital project a success, you will need one or more WordPress experts. But how do you recognize these rare gems?  What are the skills and qualities required to be defined as an "expert"? And most importantly, what kind of expert do you need for your...

Upgrade your WordPress site to HTTPS

Upgrade your WordPress site to HTTPS

Going HTTPS on a WordPress site is now more than necessary if you want to acquire new users and gain their trust by offering them a secure platform. But why is it necessary to migrate a WordPress site to HTTPS? What does it really mean? Maintenance WP gives you all...