WordPress allows you to efficiently manage your content by storing text content securely in a database and storing files separately. However, this can be a problem if you want to clone or duplicate an entire WordPress site. Manually exporting/importing a database and moving files to another location is not an easy task. With the many plugins available in WordPress, it is easier to achieve website cloning. Here are the steps to help you create a copy of your entire WordPress site, even if you are a beginner.
The need to duplicate a WordPress site
Reasons for duplicating (also known as cloning) a WordPress website can vary, but are usually one of the following:
How to duplicate an entire WordPress site?
WordPress offers a default importer for exporting and importing content to another website. However, this won’t import the core WordPress files, you have to import each post type separately, and this method won’t work if you have a large number of posts and attachments. The good part is that you have backup plugins that you can easily use to back up your entire WordPress site. These backup plugins can copy your uploads, themes, plugins, and all content on a WordPress site and make it easily transferable or migrateable.
You can save hours when moving a live WordPress site to a new host, duplicating/moving a website from a local server to a production server, cloning/moving a live site to a local server for testing and development purposes.
Installing and activating the Duplicator plugin
To start cloning your WordPress site, install and activate the Duplicator plugin, but why? This powerful plugin serves as a WordPress backup and migration tool for professionals and novices alike. The plugin does not require any settings to set up and you can start using it right after activation.
Login to your WordPress dashboard and go to Plugins > Add. Use the plugin search box to type in and find the Duplicator plugin, then click install and activate after that – that’s it.
Backing Up Your WordPress Site With Duplicator
Before using the Duplicator plugin to get a complete copy of your website, it first backs up the content you want to download to a new location. When creating your site’s backup storage package, find or hover over the “Duplicate” menu in the sidebar and click “Packages”. Find the “Create” button in the upper right corner and click on it.
The plugin will automatically load the wizard, then click the “Next” button, leaving all other details as is.
This will prompt your website to scan to make sure everything is in order and the site supports the WordPress plugin. If there are any issues, you will receive a warning stating what is wrong. Otherwise, since the scan will complete with all the requirements marked good. Click the “Create” button to continue the backup process.
After that, the entire database of your WordPress site, including templates or themes, plugins, images, and all other files, is now in one downloadable package.
Duplicate Your WordPress Site
This step comes after the backup process of your site package is complete. You will see the “Archive” (contains backup files) and the “Installer” script as your site’s downloadable files on your screen. Move to click the “One Click Download” link below these buttons and it will automatically download both files at once. Or click the buttons individually and download the files to your computer.
Never leave one file for another, as both files are needed to duplicate your entire site.
Uploading the archive and installation file to the new site
Now navigate to the new location where you want to upload the files representing your entire website. Whether it’s cloning and moving a site to an active or local server, here’s how to do it.
- For a site on a local server: copy the downloaded files (archive and installer) and paste them into an empty subfolder in htdocs of your self-hosted server. Note that htdocs is the document root folder when using local WordPress installations with MAMP, XAMPP, and many other applications. However, it may differ depending on the application you are using to create localhost. Make sure you paste the files in the correct document root for your localhost. In this example, we are creating a duplicate site in a subdirectory named “learnwordpress”, which should be in the “htdocs” folder.
- For a site on a live server: You can upload files to the root directory of your domain using the File Manager application from the hosting panel.
In any case, make sure the files are in empty subfolders – no other files or folders next to them.
Running the installer script (Installer.php)
Everything is in order, and if everything is done correctly, running the PHP import script will not cause any problems. Open your web browser, navigate to your new live WordPress website using the URL below which adds the installer script to your domain name. Don’t forget to replace your-new-site.com with your own website name.
https://your-new-site.com/installer.php
Otherwise, use the URL below to navigate to the local site. Be sure to use the correct subdirectory name, or remove it from the URL if you are going to the root of the local server.
https://localhost/learnwordpress/installer.php
The duplicator toolbar now displays an evaluation of all required configuration options that can be retrieved and marks success. If everything looks great on your site, go to the terms and conditions. Next, click the “Next” button.
You need to populate the new database information as shown for the site you are duplicating. After completing the data entry, you can click the “Check Database” button to make sure it’s correct before clicking the “Next” button.
You will most likely receive an installation confirmation message that requires you to click OK. Once the database installation is complete, the settings for your new site will be automatically determined and pre-populated for you.
Click the “Next” button to complete the installation of the package and the plugin will now present you with the final step – testing your duplicate WordPress website by clicking the “Admin Login” button.
Testing Your Duplicate WordPress Website
The WordPress admin or backend is not the only place to conduct surveys. Continue typing the URL of your new live or local clone site to view its interface and see if everything works. I hope you won’t have any problems as long as you follow these guides correctly.
Finally, remove the installation files
You can now delete the temporary files created by the Duplicator file when you copy your site. This is where the satisfaction comes from the fact that everything is going well. Once you have accessed the dashboard of your newly cloned WordPress site, hover over the Duplicator menu and click on Tools. Find “Delete installation files” and click the button to delete all installation files generated by the plugin.
Please note that some temporary files are automatically deleted if you visit the administrator login area during the final step of the database installation (part of the installer script run).
Conclusion About Duplicating an Entire WordPress Site
We understand what it’s like to survive with a new clone or duplicate site. There may be other ways to duplicate a site, but we bet this is the best option with little or no technical details and is suitable for a beginner.