How to make a development version of a website

Follow

Inevitably you or your customers will want to redesign their website. Redesigning a website is a major undertaking and usually involves the site going offline several times while changes are being made and bugs are fixed, so it's not something you want to do on your live, working website!

This article shows how to make a developement version of your current website, so you are free to make modifications without it breaking your live website. Once the new site is ready, you can switch it to become the new site!

This method involves making a development subdomain of your actual site. For this example, I'll be using a pretend website called "mywebsite.com". It has a fresh wordpress install in a cPanel account. 

Screen_Shot_2017-10-16_at_12.31.20_pm.png

To create the development site, Follow these steps:

1. Create a subdomain that the copy will use. I'll use devsite.mywebsite.com

Screen_Shot_2017-10-16_at_12.34.16_pm.png

Screen_Shot_2017-10-16_at_12.34.39_pm.png

Screen_Shot_2017-10-16_at_12.34.52_pm.png

2. Copy the files from the public_html folder, to the subdomain folder

You can use the File ManagerScreen_Shot_2017-10-16_at_12.35.44_pm.png

Screen_Shot_2017-10-16_at_12.36.12_pm.png

3. Export a backup of the live website database

You can use phpMyAdminScreen_Shot_2017-10-16_at_12.36.49_pm_copy.png

Screen_Shot_2017-10-16_at_12.37.04_pm.png

Screen_Shot_2017-10-16_at_12.37.19_pm.png

The database will download as an .sql file to your computer.

 

4. Create a new database for the development website. This keeps the development website from affecting the live website

Create the new database using MySQL DatabasesScreen_Shot_2017-10-16_at_12.36.49_pm.png

Screen_Shot_2017-10-16_at_12.38.04_pm.png

Create a new user for the database (For better better for security).Screen_Shot_2017-10-16_at_12.38.32_pm.png

Add that new user to only the development databaseScreen_Shot_2017-10-16_at_12.38.44_pm.png

Grant all the permissions that user could needScreen_Shot_2017-10-16_at_12.38.55_pm.png

5. Import the backup sql file contents from step 3 into the new database

You can use phpMyAdmin for this againScreen_Shot_2017-10-16_at_12.36.49_pm_copy.png

Screen_Shot_2017-10-16_at_12.39.21_pm.png

Screen_Shot_2017-10-16_at_12.39.49_pm.png

Screen_Shot_2017-10-16_at_12.39.59_pm.png

6. For a wordpress site, update the siteurl and home options in the options table of the new databaseScreen_Shot_2017-10-16_at_1.14.22_pm.png

If you use a different website system. You may need to make different updates for it to recognise the new configuration. 

Congratulatons!
You now have a test site that you can freely modify without fear of breaking the exisiting, live website.Screen_Shot_2017-10-16_at_1.14.46_pm.png

 

Have more questions? Submit a request

Comments

Powered by Zendesk