How to Migrate WordPress with Duplicator: Complete Guide
In this article
Migrating a WordPress site using the Duplicator plugin is the most reliable method for moving your website from one hosting environment to another, or from a local development server to a live domain. This process creates a complete archive of your site’s files and database, allowing you to restore it elsewhere without losing content, settings, or media. To begin, ensure you have administrative access to both the source (current) and destination (new) WordPress installations, as well as FTP or file manager access to the new host’s public_html directory.
What You'll Need
- A fully functional WordPress site on the source server.
- A fresh WordPress installation on the destination server (or an empty directory).
- The Duplicator plugin installed and activated on the source site.
- FTP credentials or cPanel File Manager access for the destination host.
- A custom domain name pointed to the new server’s IP address.
Step-by-Step
- Create the Package: Log into your current WordPress dashboard. Navigate to Duplicator > Packages and click "Create New." The plugin will scan your site for compatibility issues. If warnings appear, resolve them before proceeding. Click "Build" to generate the installer script and the archive file. Wait for the progress bar to complete.
- Download Files: Once the build finishes, two links will appear: "Installer" and "Archive." Download both files to your computer. The Installer is a PHP script that handles the restoration, while the Archive contains your entire site data.
- Prepare the Destination: Log into your new hosting account via cPanel or FTP. Locate the root directory where your site will live (usually
public_html). Delete any default files likeindex.phpordefault.htmlin this folder. Upload the downloaded Installer and Archive files to this empty directory. - Create a Database: In your new hosting control panel, go to MySQL Databases. Create a new database, a new user, and assign the user to the database with all privileges. Note down the database name, username, and password securely.
- Run the Installer: Open your web browser and navigate to
yourdomain.com/installer.php. Follow the setup wizard. Enter the database details you created in the previous step. Ensure the "Database Name," "User," and "Password" fields are correct. - Search and Replace: On the configuration screen, verify the URL search and replace settings. Duplicator automatically detects the old and new URLs. Review these carefully to ensure your site links update correctly from the old domain to the new one. Click "Validate" to check for errors.
- Complete Installation: Click "Install." The system will extract the archive, import the database, and rewrite URLs. Once finished, you will see a success message. Click "Admin Login" to access your new site’s dashboard.
- Clean Up: For security, delete the
installer.php,archive.zip(or .zip), and theduplicator-backupsfolder from your server immediately after successful migration. Never leave these files accessible publicly.
Common Mistakes
One frequent error occurs when users fail to clear their browser cache after migration, leading them to believe the site is still broken because they are viewing an old cached version. Another common issue is incorrect database credentials during the installer phase; double-check that the database user has full permissions. Users also often forget to update their DNS records, causing traffic to still route to the old host. Finally, skipping the cleanup step leaves vulnerable files on the server that could be exploited by malicious actors.
Tips
Always test the migration on a staging environment if possible before pointing your main domain. Use the "Debug Mode" in Duplicator if you encounter silent failures during the build process. If your site is large, consider splitting the package into smaller parts to avoid server timeout errors during upload. Ensure your PHP memory limit is increased on the destination server to at least 256MB to handle large database imports smoothly.
Troubleshooting
If the installer fails with a "Database Connection Error," verify your database credentials and ensure the database user is assigned to the database. A "403 Forbidden" error usually means the installer script lacks execution permissions; check file permissions via FTP or contact your host. If the site loads but images are missing, the URL replacement failed; manually edit the wp-config.php file to define WP_HOME and WP_SITEURL correctly. For white screen errors, enable WP_DEBUG in your wp-config.php file to view specific error messages. If the archive is too large for your host’s upload limit, use FTP to split the archive file or increase the upload_max_filesize setting in your PHP configuration.
Frequently Asked Questions
Can I migrate WordPress without a plugin?
Yes, but it requires manual export/import of the database via phpMyAdmin and downloading/uploading all files via FTP. This method is time-consuming and prone to human error compared to using Duplicator.
Does Duplicator move plugins and themes?
Yes, Duplicator migrates everything, including active and inactive plugins, themes, uploads, and core WordPress files. It creates a complete snapshot of your site.
What if my site goes offline during migration?
Your site remains online until you point your domain’s DNS records to the new server. You can perform the migration on a subdomain or local server first, then switch DNS only when ready.
Is it safe to delete the installer file?
Absolutely. The installer is a powerful tool that can overwrite your database. Leaving it on the server is a significant security risk. Delete it immediately after a successful migration.
Why do I get a "File Not Found" error on the installer?
This usually happens if the installer.php file was not uploaded to the root directory or if the domain is not pointing to the correct server IP. Verify your upload path and DNS propagation status.