How to fix 503 service unavailable error on WordPress latest 2022

Tutorials 0 lượt xem

How to fix 503 service unavailable error on WordPress latest 2022, this is a pretty annoying error for those who are using WordPress, when you get this error you will definitely not be able to access your website and if you do not fix it Soon you will lose a lot of hits.

Cause of 503 service unavailable error?

This error is determined to have quite a few causes, from basic to complex causes and maybe you will have to ask for help from service providers? The causes of the 503 service unavailable error on WordPress include:

  • Some Theme or Plugin uses too many resources
  • Theme is not compatible with WordPress version
  • Theme is not compatible with certain Plugin
  • Plugin is not compatible with WordPress version
  • The custom code that you insert into the theme causes conflicts
  • WordPress source code is corrupted (missing files or infected with malicious code)
  • Host resource limit is too low
  • Your server or Website is overloaded (due to DDoS attack for example)

From the above causes, we will learn some methods to fix 503 service unavailable error on WordPress.

Error 503 service unavailable due to Plugin

If you get a 503 service unavailable error when adding a certain Plugin, think of the culprit. It’s quite simple, you just need to go to the Web folder and delete them, but if you don’t specify it, you’ll be fine. Any plugin that causes it can be done by.

Please disable your Plugin completely by logging in to the folder containing the Web then navigate to the wp-content folder now you will see the plugins folder change it back to plugins_old for example.

sua type 503 service unavailable

After you change the name, try to access the Web site, if the 503 error disappears, it means that there is a conflicting plugin causing the problem.

Continue to change the plugins_old folder to Plugins , access the WordPress admin page, now you go to the Plugin Menu you will see the Plugins have been disabled.

How to fix the latest 503 service unavailable error on WordPress [male] 1

Continue, activate each Plugin (note: each time you activate a Plugin, please reload the Web page to check if there is a 503 error) .

If the 503 error appears when you activate a certain plugin, it means that the plugin has a problem and you need to delete them.

To remove the plugin causing the error by accessing the wp-content/plugins folder in the File Manager.

Now you just need to delete the Plugin causing the problem.

How to fix the latest 503 service unavailable error on WordPress [male] 2

Once done, you can now access the Web site.

Error 503 service unavailable due to Theme

If after you check all the plugins but still the error, continue to do the same with the themes to find the cause.

Note: I recommend that you always keep the default theme even when installing a new theme so that you can reuse it if something goes wrong.

In particular, users often encounter an HTTP 503 error after installing a new theme.

To disable the newly installed Theme, you can also do it by accessing the File Manager and going to the wp-content/themes folder, find the folder of the current theme you use, you can rename the new theme you are using.

For example , if you have a theme my-theme , right-click on that theme. Rename that theme folder to the name my-theme-off .

How to fix the latest 503 service unavailable error on WordPress [male] 3

Now your WordPress theme will be changed to the default theme.

Then run the Web page again to see if the 503 error has been fixed or not?

Error 503 service unavailable due to PHP code

If after you have checked plugins and themes but your website is still getting errors, we will continue to check to the custom PHP code that you have added to the website.

First, activate WP_DEBUG by going to File Manager, then find the file named wp-config.php in the WordPress installation directory and open it, find WP_DEBUG, it will look like define (‘WP_DEBUG’, false); If not already there this item, please add it above the line / That’s all, stop editing! Happy blogging. /

How to fix the latest 503 service unavailable error on WordPress [male] 4

Once done, save it.

Note : If you have set WP_DEBUG in wp-config.php file , please enable it by setting the value from false to true .

Finally reload the web page, it will show you an error code telling you what is it? and why.

Note : You can also view the error logs in …/error_log in the File Manager folder.

Server related error

If you have performed the steps above the error code 503 service unavailable still persists, it could be related to your server.

Usually these errors can appear and disappear on their own after a few minutes when the server is stable.

If the error does not fix itself, you can do some of the following methods.

Heartbeat’s error

What is Heartbeat?

A feature that allows the web browser to communicate with the server when you are logged into the WordPress admin panel. This functionality helps WordPress handle things like displaying notifications to other authors that a post is being edited by someone. Plugins can also take advantage of the Heartbeat feature to display real-time notifications.

To see if WordPress Heartbeat is causing the 503 Service Temporarily Unavailable error, add the following line of code in your current theme’s functions.php file right after the <?php code .

Save the file and reload your web page. If the site is working properly, great, you have fixed the error. If the error persists, remove this code from the functions.php file as WordPress Heartbeat is not the cause of the 503 error.

Insufficient server resources

If you get a 503 Service Unavailable error, check your website more at the Google Analytics page. If you are having higher than normal traffic, you are probably running out of server resources.

However, if you don’t have larger access but still get 503 error in WordPress, the problem may be due to lack of server Ram.

If you encounter this problem, you should contact your service provider to upgrade the service or maybe find a better provider.

Due to DDoS attack

If your Website has a sudden spike in traffic, it is most likely under a DDoS attack. Please install CloudFlare CDN for Website then activate Under Attack Mode.

How to fix the latest 503 service unavailable error on WordPress [male] 5

When this mode is activated, users will need to wait 5 seconds for CloudFlare to verify that they are not a robot, before being able to access your Website. It will help fight DDoS attacks effectively if the target of the attack is your Website, not the Server’s IP.

Reinstall WordPress

In case you suspect that the cause of the 503 Service Unavailable error is due to WordPress file corruption or missing files, proceed to reinstall its source code manually. Download the WordPress source code from WordPress.org > access the WordPress installation directory through the File Manager of cPanel/ DirectAdmin or FTP software > Upload the downloaded source code file > extract and overwrite the current source code.

//You regularly post posts but don’t have time and you often schedule automatic posts, but the posts are not published, please refer to how to fix the missing scheduled posts error in the latest WordPress 2022 .

Conclusion

503 Service Unavailable is a common error when you cannot access the website and website management page. It is usually caused by WordPress plugins, WordPress themes, and other problems.

Depending on the server’s configuration, this error will display differently. You may encounter the following error codes:

  • 503 Service Unavailable
  • 503 Service Temporarily Unavailable
  • HTTP/1.1 Service Unavailable
  • HTTP Server Error 503
  • 503 Error
  • HTTP 503
  • HTTP Error 503

After you apply the above methods and still can’t fix the 503 error, contact your service provider to check the cause and fix it as quickly as possible.

Bài viết liên quan