Looking for an easy way to clone WordPress site?
To clone a WordPress site or create an exact copy of an existing site can come in handy in many ways. If you are a developer, this might mean copying a website from staging to production or vice versa. If you are a WordPress user who might want to tinker with their website, you should consider doing that on a duplicate WordPress Site, not on the original one.
In this article, we will explore multiple ways to do this. You can either manually clone a website or use a plugin to do so. Let us now look at this process in detail.
Method 1: To Clone the WordPress Site Manually
Many managed WordPress hosts provide easy solutions to clone WordPress sites. However, if you want to do that manually, follow the steps in this section (however which is quite different from cloning a WordPress page manually or exporting a WordPress site). For the purpose of this article, we will call the site that you are copying the “source” and the new copy that we are making the “destination”.
Step 1 – Copy Files from the Source
To copy files from the source:
- Connect to your website through FTP. You can use free software similar to FileZilla.
- Find and Locate your WordPress files. This will usually be under the public_html folder. Refer to your host’s documentation for details.
- Download the contents from the wp_content folder. This folder contains your themes, plugins, and media uploads.
Want to add a PDF download button using Elementor? Read, How To Add PDF Download Button Using Elementor? (6 Easy Steps)
Step 2 – Copy the Database from the Source
To download a copy of the database:
- Connect to your host’s phpMyAdmin. Refer to your host’s help center for specific instructions for login details.
- Click Export.
- From the Format dropdown, select SQL.
- Click Go.
Save the SQL file in a secure location.
Step 3 – Import Database in the Destination Site
To import the copied database to the new site:
- Connect to the new WordPress site’s phpMyAdmin.
- Click Import.
- Click Choose File navigate to the location where the database file is saved, and select the file.
- From the ‘Format’ dropdown menu choose ‘SQL’.Click Go to start the import.
Step 4 – Create a new database user and give permissions
- Create a new database user in your MySQL database using phpMyAdmin. Save the credentials.
- Add the newly created user to the database that we imported in the step.
- Give the new user all permissions to the imported database. Refer to your host’s help center for specific instructions. You can find phpMyAdmin’s documentation here.
Step 5 – Upload contents of the wp-content folder
Next, upload the contents of the wp-contents folder to the destination site.
- Connect to the destination site through FTP.
- Browse to the wp-content folder.
- Upload contents from the wp-content folder that we downloaded in step 1.
Step 6 – Edit the wp-config file
- Connect to your destination website and download the wp-config.php file.
- Open the wp-config.php file using a text editor.
- Replace the database name and password using the database username and password that we created in step 4.
- DB_NAME: Name of the database
- DB_USER: The username of the database user we created in step 4.
- DB_PASSWORD: Password for the database user we created in step 4.
- Refer to your host’s help center for the DB_HOST. In most cases, localhost, the default hostname, works.
- Save the file.
- Re-upload the wp-config.php file to the destination server.
Note: If your host provides an option to edit the wp-config.php file using the browser, you can do that to update the database details.
Step 6 – Change the site URL
If your cloned WordPress site has a different URL or address, you will need to update this in the database.
- On the destination site, connect to phpMyAdmin and select your WordPress site’s database from the left pane.
- Click and select the wp_options table.
- Locate the ‘siteurl’ and ‘home’ rows. Click the pencil icon next to each row to edit.
- Replace the URL with the destination site’s URL.
- Click Go to update.
- You should do this for both siteurl and home options.
Your cloned website should now be ready to use
Method 2: To Clone WordPress Site Using Duplicator Plugin
If you want to clone a WordPress website using a WordPress Site Cloner plugin, there are a handful available in the WordPress repository. Duplicator is the most popular WordPress Site cloner plugin among them. In this section, we will show you how to clone a WordPress site using the Duplicator plugin.
To clone a WordPress site using the Duplicator plugin:
- On your source website, install the Duplicator plugin.
- From the left panel of your WordPress admin dashboard, click Duplicator.
- Click Create New to create a new package.
4. Provide a name for your package file. This is optional.
5. Click Next to begin creating the package.
6. If all the scan results are showing Good, click Build.
7. The plugin will now begin building the package. This may take several minutes. Do not close this window until the process is complete.
8. When the package is successfully created, download both the Installer and Archive files.
9. Upload the Installer and Archive files to the destination server.
10. Access the installer.php file on a browser. For example https://newsite.com/installer.php
11. Accept the terms and conditions.
12. Click Next to begin copying files and the database.
13. Enter the database name, user ID, and password for the new database.
14. Refer to your host’s help center for the database hostname. In most cases, this will be localhost.
15. Click Next to begin. The database will now be imported to the destination site.
16. On the New Settings page, enter the new URL, and a new name for the website. Click Next to continue.
Note: The plugin will automatically find the new URL. Update this only if it hasn’t changed.
17. Click Site log in to go to the WordPress admin login page.
18. Test the destination site and make sure that everything works fine.
19. If everything works fine, click the Remove Installation Files Now! link to delete the files.
Looking for an easy way to add a testimonial block using Elementor? Check out, How to Create an Attractive Testimonial Block In Elementor? ( 2 Easy Methods)
Top 5 WordPress Plugins to Clone WordPress Site
Duplicator is definitely the most popular plugin among WordPress users when it comes to copying a website. However, there are many other WordPress Site Cloner plugins that will let you duplicate a WordPress site.
With 100,000+ active installs, Clone is yet another popular WordPress Site Cloner plugin among WordPress users who want to easily copy websites. The plugin has been recently revived with new developers onboard.
FastDup claims to clone WordPress sites easily by reducing the number of steps required.
All-in-One WP Migration is yet another WordPress Site Cloner or migration plugin with 2+ million active installations. This plugin promises to export your WordPress website including the database, media files, plugins, and themes with no technical knowledge required.
4. WP Staging
This plugin claims to create an exact copy of your entire website for staging or development purposes in seconds. It can clone a WordPress site into a subfolder of your main WordPress installation including an entire copy of your database.
5. Migrate Guru
Migrate Guru can clone WordPress sites with a few mouse clicks. It can also automatically rewrite URLs, bypass import-export scripts, and handle serialized data.
Now that you know the manual method and WordPress Site Cloner plugin-based methods to clone WordPress sites, which one will you choose? Let us know in the comments section.
Cloning a WordPress site might seem like a complex task, but with the two easy methods we’ve discussed in this blog, it becomes a straightforward process.
Whether you prefer the manual approach or a dedicated plugin, you have the tools to duplicate your site easily.
Cloning is invaluable for backups, testing changes, or moving your site. By following our guide, you’ll be confident in managing your WordPress site.
Connect With JustHyre
Hire WordPress Engineers for custom jobs like Website Customization, SEO Optimization, Clearing a Hacked Website, Installation & Configuration & more.Connnect with JustHyre