A 503 service unavailable error can be caused by a number of things including (but not limited to):
- Buggy plugins or themes
- A misbehaving custom PHP script
- Insufficient server resources
- Server glitches
- Malicious attacks such as the infamous Distributed Denial of Service (DDoS) attack
Faulty plugins are responsible for most of the errors you will encounter in WordPress.
If you encountered the 503 error after installing or updating a particular plugin, you most definitely know the culprit. All you have to do is delete the plugin in question.
If, however, you have no idea which plugin (or what exactly) is causing the 503 error, you should begin the diagnosis by deactivating all plugins.
Deactivating All WordPress Plugins
Login to your WordPress directory either via FTP or File Manager.
Inside your WordPress directory, locate and open the wp-content folder, which contains your plugins, themes and media among other things.
Right-click on your plugins folder and rename it to plugins-old:
This deactivates all plugins at once. Now rename plugins-old back to plugins and reload your website. If the 503 error is gone, a plugin is the cause of your current predicament.
All you have to do now is identify and delete the problematic plugin.
You should now be able to login to your WordPress admin dashboard via the browser and activate the plugins one by one.
Every time you activate a plugin, reload your site to pinpoint the buggy plugin.
Deactivate WordPress Theme
Before we deactivate we must create a backup. Connect to your WordPress site via FTP and navigate to the wp-content -> themes folder.
Locate your active theme and download it.
Next, delete your active theme and reload your site. If the error is gone, then you know the theme is the cause.
To enable debug mode in WordPress and write errors to a log file, follow these steps, this will assist your developer in locating the cause:
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