During the backup installation or restoration process, you may encounter errors 500, 502, 503, and 504. These errors can arise due to various factors, including server misconfigurations, .htaccess rules, security plugins, and more.
This article provides a step-by-step guide to identifying and resolving these errors effectively.
Handling general 500 errors
During the installation process, you receive a more general error with a 500/502/503/504 status.
Solution 1 disable ModSec
Verify whether your hosting provider has a mod_security (ModSec) rule that is being triggered. On some servers, executing numerous database commands or even extracting a file can activate a mod_security blacklist rule. This typically means your host is blocking your IP from performing specific operations.
To resolve this, contact your hosting provider and ask them to check if a mod_security rule is preventing you from accessing the installer properly. If necessary, request an exemption or adjustment to allow the process to complete successfully.
Solution 2 Cloudflare and WordFence
There are a few issues around WordFence and Cloudflare that can cause these codes. See this article for details:
What can I try for 502/503/504 Gateway issues during the build?
Solution 3 .htaccess directives
During the installation process, your host might automatically lay down a .htaccess file. Typically, Duplicator works best if no .htaccess files are present during the installation process, as some directives can cause conflicts. If you want to try resolving the issue yourself without your host’s assistance, check out the article below:
How to Fix 504 Gateway Timeout Error in WordPress
Solution 4 files and directories permissions
A 500 error in Step 1 processing on Duplicator Lite can sometimes be due to a timeout during zip extraction or when file permissions are being set (on either Duplicator Lite or Pro).
To resolve this, first perform a Manual Extraction, enable the Advanced mode, and then uncheck the options File Permissions and Dir permissions on Step 1 of the installer under Options » Advanced.

Solution 5 pause Cloudflare
If you’re using Cloudflare, the following settings may help:
- Log in to Cloudflare
- From the Overview page, click “Advanced” » then click “Pause“
- Install the backup
- Turn Cloudflare back on
Handling AJAX 503 errors
During the installation process, you receive an error titled “AJAX ERROR! STATUS:503 Service Unavailable”.
Solution
If your host has issues with AJAX callbacks, the best solution is to run a manual installation. For a step-by-step guide, see the article:
How do I do a ‘Manual Extraction’ or run installer without Zip enabled?