<iframe width="480" height="270" src="https://www.youtube.com/embed/H0sBg3URL1E" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

Video Length: 14:30

Part 2 of setting up a dev site

Part 1 was called How to set up a development site on cPanel hosting. In that video we got as far as setting up a subdomain. Part 2 picks up from where we left off.

We’re going to clone and migrate a ‘gold standard site’, which is a website that’s already configured with all the plugins we want. It saves a lot of time at the beginning of a project. For example the security plugin takes a long time to set up so I don’t want to do it every time I start a new project.

I walk you through the whole process in the video but as usual, in case you prefer written instructions here they are:

Create a database and user

Create database

Log into cPanel

MySQL databases

Give the new database a name. I use XXX, where XXX is the name of the project.

Create Database

Copy name of database into a handy document. You’ll need this later.

Go Back

Add New User

Scroll down to MySQL Users and click on it.

You need to add a new user.

Give the user a name. I use XXX, where XXX is the name of the project.

Click on Password Generator

Choose a password that you like (keep clicking Generate Password). I avoid a lot of really random characters because they sometimes cause problems during the duplication.

Save the password into your handy document.

Click the box that says I have copied this password in a safe place.

Use Password

Create User

Save username in your handy document

Go Back

Add User to Database

Scroll down to Add User to Database

Choose the user from the dropdown

Choose the database from the dropdown

Click Add

Tick the box that says All Privileges

Make Changes

Make a backup of the website you’re planning to migrate

Log into the website you’re planning to migrate

Make sure everything is up to date – plugins, theme and WordPress core

If you don’t already have the Duplicator plugin installed do that now

Click on Duplicator (in the black bar down the left hand side)

Create New (top right)

Next

It will scan the site

Click Build

It will build the package

Now you need to download both components – the installer and the archive. Store them in a folder somewhere you’ll remember.

Upload 2 x backup files to your destination host

Click on File Manager

Open the subdomain folder you created in the last video

It will no doubt contain at least one thing. Select everything in the folder and click Compress.

Choose zip archive > Compress files.

Delete all files except the zip you just created.

Click Upload

Select File > navigate to folder where you stored your backup files > Open

(Or shrink the window and drag and drop)

Upload both the installer and the archive. Leave the archive zipped.

Go back to your File Manager window and Reload. You’ll see the files there.

I’m going to show you how to do this job via cPanel. Note that you will sometimes hear people say it shouldn’t be done this way, and that you should instead by uploading via FTP. I don’t want to argue who’s wrong and who’s right. I will say a lot of people do it the way I’m about to show you.

Complete the migration process

In a new browser window type in the address of your new website, followed by installer. php.

For example devsiteXXX.yourmainsite.com/installer.php

Step 1 should come up.

Tick the box that says I have read and accept all terms & notices

Next

Step 2

Choose Connect and remove all data

Choose localhost

Input the database name, the user name and the password from your handy document

Test database

Next

Run installer with these settings? > Yes

Step 3

Change the title to match your new site

Next

Step 4

The final clean up suggestions vary from host to host, just do what they say.

Site Login – use the login details from your original website.

Remove installation files

Clear build cache etc

Go back to your cPanel and reload the File Manager. Sort the contents by size from biggest to smallest. Make sure your zipped backup archive  has been removed. If not, remove it or your backups will be unnecessarily huge.

Issues and Other Notes

Sometimes you’ll run into issues, it can be a tricky process at times. In fact, if it works first time you’re required to give a little cheer of joy. I show an example of an error at 9:28 in the video.

Remember to change your login details if this site is going to a client.