Manually Clone a WordPress Site in 5 Steps

Manually Clone a WordPress Site in 5 Steps

Once you have a basic understanding of WordPress, it’s very easy to copy a site. The easiest way to do this if you’re a WordPress newbie is to use a plugin. This is how I got started. When I first tried to clone a website, I did it manually. The files were easy to copy. The database was a mystery to me. I didn’t know what it was, and I didn’t know how to replicate it. I used a plugin to migrate the site (files and databases).

As I explored and tested, I gradually learned that the database is what separates a management system like WordPress from HTML websites. The database is where all the content lives, including text (pages and posts), metadata (categories, tags, custom fields), usernames, passwords, site options, plugins, theme settings, etc. It’s quite significant!

Many plugins will copy all the files or the database between sites. These plugins do the job with just one click. Some of my favorites include Backup Buddy All in One WP Migration Duplicator and Updraft Plus.

There are still times when a plugin will not work. The site may be too big, and the copying process of the plugin will take a long time. There may be incompatibilities between the web hosting server and WordPress. It’s important to know how to clone WordPress sites without plugins, no matter what the reason.

Definitions

The source is the original website that you’re cloning.

The destination is the new site.

Step 1: Backup the source website

Start with a copy of the original site in case you ever need to go back! Cloning is then possible without any worries.

  1. Navigate to cPanel by logging into your account with the web host.
  2. Copy the files. Select the folder that contains the WordPress. Choose the WordPress folder. Source Make a.zip file of the site (“Compress”). Download the file to your computer.
    • The folder name will be “public_html” if the source is located at the top of the domain.
    • The source website will be in a separate folder and likely named “WordPress” or the same as the domain name (myurl.com).
  1. COPIED THE DATABASE Go into phpMyAdmin. Select the database of the source website. “Select all“. Click ” Export“. Use Custom options so that you can save the SQL Database as a zip archive (“Save output into a file > compression: zipped”)

Step 2: Create the new Destination Site

It can be a completely new primary domain. It can also be a subdomain of an existing domain. These steps are for subdomains, but they can be used in any situation.

  1. Log into the cPanel of your web host and create a new subdomain. Destination site: Destination .myurl.com.
    • Alternative: if your web host doesn’t allow subdomains, create a subdirectory: myurl.com/destination.
    • NOTE: When migrating a site from one web host to another, you will need to transfer the domain registration to the host of the new location or redirect the existing domain records to the host.
  1. Install WordPress using the tool provided by your web host. It could be software (Softaculous), a “Wizard,” or something else.

Step 3: Copy files from source to destination site

  1. Download the.zip archives of the source files that you downloaded in Step 1.
  2. Use Filezilla or the File Manager to access your files. Choose the directory (also known as a folder) that contains the WordPress files. Select the folder (also known as a directory) that contains the WordPress Destination site.
    • You only need to upload a single source directory to the target subdomain or subdirectory. wp-content
    • This folder is for themes, plugins, and media files (images, videos, PDFs, etc.) that you upload. This article provides a good explanation: Beginner’s guide to WordPress’ most important directory.
    • The new installation will overwrite the folder in the wp-content. All other files will be intact.

Copy the database from the source site to the destination site.

In the next set of steps, replace the Source URL and the File Path with the Destination URL and the File Path. Here, I use a plugin that allows me to return and find the data securely.

  1. Install the WP Migration DB on the source as well as the destination site.
  2. Open the WP Migrate DB Pro on both sites (Tools -> Migrate DB). Select ” Export File“.
  3. Find and replace URL –
  • Copy the URL from the “FIND field” into your clipboard.
    • //destination.myurl.com
  • Leave the “FIND” fields unchanged. In the Replace (“New URL”) area, paste the URL of the destination site:
    • //destination.myurl.com
  1. Find and replace FILE PATH 
  • Copy the File Path Content in the “FIND field” to your clipboard:
    • //different/path/to/destination.myurl.com
  • Leave the “FIND fields” as they are. Paste the destination file path in the Replace field (New File Path).
    • //different/path/to/destination.myurl.com
  1. Export the file. Use these settings:
    • Save the file as a PDF to your computer.
    • Compress the file using gzip
  1. Importing the file On the destination site
    • With the plugin, To use the “Import feature” (Tools > Migration DB), you need to purchase the paid version (WP-Migrate DB Pro).
  • Without a plugin, Click on phpMyAdmin.
      1. Select the database that corresponds to the destination website. All tables can be selected (“Check all”). Click ” Drop“.
    1. Select the database exported in Step 5. Click the ” Import” button.

Site destination: Import database from source site (with URL and file path replaced).

Step 5: Check the theme and permalink settings

The destination site will import all settings from the source site, including login credentials. Most likely, you’ll be logged out on the destination site. Log back in and check everything.

  1. You can navigate around the front end of the site to see the most important pages and posts.
  2. Check the configurations of the site by navigating through the back end.
  3. After a clone has been completed, two areas need to be addressed.
  • It may be necessary to reset the Permalinks, which are URLs for content.
  • Click on Permalinks in settings.
    • Choose the option you prefer, and then click ” Save changes.”
  • The Theme Settings may need to be reset.
  • Click on Theme name > Theme settings
    • You may only need to click Save. You can re-import the database if things are not working.
    • Appearance> Customize: Check this box if it was used in the source website.

Leave a Reply