Experienced E-commerce Agency for Magento/ Adobe Commerce/ Shopify/ Shopware Development

How to Solve Magento Error 503 After Upgrade?

If you or your visitors are facing error 503 – service temporarily unavailable, there are some problems with your website. It also means that the server cannot implement the request at the moment because it cannot respond, it may be busy, or it may be in the maintenance state. You might see the following message.

Magento error 503 after upgrade
Magento error 503 after upgrade

You may encounter this type of error as you install an extension or update your Magento version. Every time this message shows up, your visitors cannot reach your site.

However, don’t worry! We’re here to help you. We’re going to show how to solve Magento error 503 after upgrading right below.

Table of contents

Looking for
Upgrade Services?

Upgrade your Magento 2 store to the latest version for new features and security - with the help of our dedicated experts.

Upgrade now
upgrade service

The causes of error 503

During the upgrade to Magento 2, the system generates the file maintenance.flag to show the system is in maintenance mode. This can be useful to hind any problems that happen during the installation or upgrade of your customers.

This file is automatically deleted after the whole process is finished. However, sometimes it may not be automatically removed, or the file may be generated again in the system. Hence, the existence of .maintenance.flag file in Magento 2 system will show error 503 - Service Temporarily Unavailable.

How to solve Magento error 503 after upgrade

To resolve the 503 Magento 2 Service Temporarily Unavailable error, follow these steps:

Step 1: Remove the Maintenance Flag File

  • Navigate to the Magento 2 root directory and delete the maintenance.flag file located in the var folder.

  • Clear the Magento cache either from the Admin panel or by running the command:

php bin/magento cache:flush

Note: In Magento 1.X, this maintenance.flag file is a bit different because the system automatically creates that.

Step 2: Enable Developer Mode

After removing the maintenance.flag file, reload your website. The system may display this message: “Exception printing is disabled by default for security reasons.”

To address this issue, you need to activate the developer mode. If any issues persist, review the Magento error logs to identify any exceptions.

You can enable Developer mode by executing the command:

php bin/magento deploy:mode:set developer

Step 3: Upgrade Database

Following the removal of the maintenance.flag, you may see this message: “Please upgrade your database.”

Resolve this by running the following command from the Magento root directory:

php bin/magento setup:upgrade

Learn more:

What is a 502 bad gateway error?

Magento 2 Enable or Disable maintenance mode via Command Line

How to Custom Maintenance mode Page in Magento 2

Conclusion

When you’ve done all the above steps, you can deal with error 503 - Service temporarily unavailable. If you find anything unclear about the solution, drop a line in the comment section. We’re very pleased to support you.

And don’t forget that we also offer Magento upgrade service trusted by a huge number of clients around the world. Our upgrade experts will help you prevent any errors like this one, and ensure your site runs smoothly after the upgrade process. Contact us now for free consultations!

CONTACT UPGRADE EXPERTS

Website Support
& Maintenance Services

Make sure your store is not only in good shape but also thriving with a professional team yet at an affordable price.

Get Started
mageplaza services
Table of content
    • insights



    Subscribe

    Stay in the know

    Get special offers on the latest news from Mageplaza.

    Earn $10 in reward now!

    Earn $10 in reward now!

    comment
    iphone
    go up