There are a few cases where you want to create a duplicate of your existing website. Whether you’re switching webhosting, setting up a staging site or making a backup. Cloning your website will make an exact copy of the current state of your website including all the files, media, database and content.
All though it might sound like a lot of work or even intimidating but to be honest, it’s going to be quite easy!
There is this awesome WordPress plugin “Duplicator” that will do the hard work for us.
What is Duplicator?
With over 25 million downloads Duplicator successfully gives WordPress users the ability to migrate, copy, move or clone a site from one location to another and also serves as a simple backup utility. Duplicator handles serialized and base64 serialized replacements. Standard WordPress migration and WordPress backups are easily handled by this plugin as are zero downtime migrations.
Duplicator also comes as a Pro version but don’t worry, the free version will do exactly what we need to migrate, clone or backup our site.
How to Clone, Backup and Migrate
Your WordPress site with WordPress Duplicator
Lets do this! 💪
- Install the Duplicator plugin
- Build your package
- Download your package
- Package as backup
- Create a database on your new web server
- Upload your package to new host
1. Install the Duplicator plugin
To add the plugin to your existing WordPress site, navigate to Plugins > Add New from your back-end dashboard and search for “Duplicator”. “Duplicator – WordPress Migration Plugin” is created by Snap Creek with over 1 million active installations.
Install and activate the plugin. Once activated, you’ll see Duplicator as a new item in the sidebar.
2. Build your package
Select Duplicator > Packages, then select Create New in the top right corner. You can now name your package (or leave it as it is) and click Next. Duplicator will now scan your site for potential issues. If it highlights any problems, resolve these and rescan before continuing.
Once the scan is complete and successful, agree with the build process and click the Build button. Duplicator will building your package. This might take some time depending on the size of your site.
3. Download your package
Once done building the package, select the One-Click Download option. This downloads both your backup file (.zip) and the installer.php file. You need both files.
4. Package as backup
You can use the current package for future backups. You can choose to regularly use this tool to create a back up and store it somewhere safe.
5. Create a database on your new web server
To create a database, do the following:
- Go to the cPanel on your new web server and navigate to Databases and select MySQL Databases
- Choose to create a New database and choose a name and click Create Database. Save the name for later
- Create a new user and enter a username and generate a strong password. Click Create a User and save the username and password
- Go to Add a User to Database and choose the user and database from the dropdowns and click Add
- Now check ALL PRIVILEGES on the Manage User Privileges and save/make the changes
6. Upload your package to new host
Now that the database is all set up, we can upload our Duplicator package. You don’t need a fresh install first. This is all in the package.
Install Duplicator package to new host:
- Via your cPanel file manager of via FTP upload both archive.zip and installer.php file to your to your root directory
- Navigate to mywebsite.com/installer.php and follow the installation wizard
- Enter the database name and the database username and password and in most cases leave localhost as host. If this isn’t working, contact your hosting support for the correct host URL.
- Click Test connection and it should be all green
- Click Run
- After that, click the Admin login button and login to your new site
That’s it! You should double check if all is working fine. One of my habits is to save my custom CSS/JS and permalinks again and delete the Duplicator plugin.
If you found this article helpful, got a question or spotted an error/typo... Do well to leave your feedback in the comment section or help spread it by sharing this article. If you're feeling generous (and I hope you do) you can definitely help me by getting me a cup of coffee ☕.