Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Fix Duplicator Write Access Error on WordPress Migration

· 5 min read · Home Tech

In this article
  1. What Causes the Write Access Error
  2. Step-by-Step Fix: Check and Correct Permissions
  3. Adjust the Duplicator Storage Path
  4. Check for Conflicting Plugins or Server Rules
  5. When the Error Happens During the Installer Step
  6. Frequently Asked Questions
  7. Final Thoughts on Preventing the Error

If you are seeing a write access error while migrating WordPress with the Duplicator plugin, the fix is usually correcting file and folder permissions on your server, or adjusting the Duplicator storage path. This error typically appears when the plugin cannot write the installer files or package to the designated directory, and it can be resolved in a few straightforward steps.

What Causes the Write Access Error

Duplicator creates a zip package of your WordPress site and an installer script, then writes them to a folder on your server. The error "Unable to write to directory" or a similar write access message means the PHP process running WordPress does not have permission to create or modify files in that target folder. This is almost always a permissions or ownership issue, not a problem with the plugin itself. Common triggers include:

  • File permissions set too restrictively (e.g., 444 or 550 on folders)
  • Folder ownership mismatched between the FTP user and the web server user
  • A security plugin or server firewall blocking write operations
  • The storage path configured in Duplicator pointing to a non-existent or read-only directory

Step-by-Step Fix: Check and Correct Permissions

The first thing to do is verify the permissions of the folder where Duplicator saves its packages. By default, this is /wp-content/backups-dup-lite/ (for Duplicator Lite) or a custom path you set in the plugin settings. Connect to your server via FTP or your hosting file manager, then:

  1. Navigate to the wp-content folder and find the backup folder (or create it if it does not exist).
  2. Set the folder permission to 755 (drwxr-xr-x). This gives the owner full access and everyone else read/execute access.
  3. If that does not work, try 775 or 777 temporarily. Many shared hosts require 775 for the web server user to write. Use 777 only as a test and revert it after the migration.
  4. If the folder already has permissive settings, check the ownership. On most shared hosts, files should be owned by your account username; on VPS/dedicated servers, the web server user (e.g., www-data or nginx) may need ownership.

After changing permissions, return to Duplicator and try creating a new package. If the error persists, move on to the next step.

Adjust the Duplicator Storage Path

Sometimes the default storage path is the problem, especially if your server has restrictions on certain directories. In Duplicator, go to Settings > Packages and look for the "Storage" section. You can set a custom path, for example /home/yourusername/backups or a folder outside the public HTML directory. Use an absolute path (starting with /) to avoid ambiguity. Make sure the folder exists and has the correct permissions as described above. After saving, try again. If the path is outside your web root, the plugin may need extra configuration, but most hosts allow it.

Check for Conflicting Plugins or Server Rules

Security plugins (like Wordfence, iThemes Security) or server-level mod_security rules can block file writes. Temporarily disable any security plugin, then test Duplicator. If it works, you will need to whitelist the Duplicator paths or adjust the plugin's file scan settings. Also check your server's error log for messages like "Permission denied" or "mod_security" — these will point you to the exact cause. On Apache servers, a .htaccess rule in the backup folder could also block write access; if you have one, try renaming it temporarily.

When the Error Happens During the Installer Step

If the write access error appears not when creating the package but when running the installer on the new server, the issue is with the target site's permissions. The installer script needs to write the wp-config.php file and the database connection details. Ensure the root directory of the new WordPress site (where you uploaded the installer and package) has permissions 755 or 775. Also verify that the database user has privileges to create tables — the installer will fail with a write-like error if the DB user lacks CREATE and ALTER permissions. In that case, contact your hosting provider to grant full privileges to the database user.

Frequently Asked Questions

Why does Duplicator say "Unable to write to directory" even though permissions are 755?

This can happen if the folder is owned by a different user than the PHP process. For example, if you upload files as user1 but the web server runs as www-data, the server may not have write access even with 755. On shared hosting, you usually cannot change ownership, so try 775 or 777. On a VPS, you can use chown to give ownership to the web server user.

Can I use a custom storage path outside the WordPress directory?

Yes, Duplicator allows you to set a custom path. Using a folder outside the public HTML directory is often more secure and can avoid conflicts with security plugins. Just make sure the path is absolute and the folder has the correct permissions. If the path is not writable, you will see the same error.

What is the safest permission setting for the backup folder?

For most setups, 755 is safe and recommended. If the web server user is not the owner, 775 is usually sufficient. Avoid 777 for long-term use because it allows anyone to write to the folder, which is a security risk. Use 777 only as a temporary test and revert it after the migration.

Does this error affect the migration process itself?

Yes, if Duplicator cannot write the package, you cannot download it, so the migration cannot proceed. Fixing the write access is the first step. Once the package is created, the migration may still encounter write issues on the destination server, but those are separate and usually related to the installer script's permissions.

Why does Duplicator work on one site but not another on the same server?

This usually comes down to folder-specific permissions or ownership. One site may have been set up with different file permissions, or a security plugin on that site may be interfering. Compare the folder permissions between the two sites and check if any security rules are active only on the failing site.

Final Thoughts on Preventing the Error

To avoid this error in the future, set your WordPress file permissions correctly from the start: folders to 755 (or 775 if needed) and files to 644. Keep a consistent ownership model across your sites. If you use a security plugin, configure it to allow writes to the Duplicator backup folder. And always test a small package before performing a full migration. With these steps, the write access error should be resolved, and you can complete your WordPress migration without further issues.