- 09 Feb 2023
- 1 Minute to read
How to make a development version of a website
- Updated on 09 Feb 2023
- 1 Minute to read
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 the live version of your 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 "example.net". It has a fresh WordPress install in a cPanel account.
To create the development site, Follow these steps:
1. Create a subdomain that the copy will use. I'll use devsite.example.net
2.Copy the files from the public_html folder, to the subdomain folder by use of the "File Manager"
3.Export a backup of the live website database by using phpMyAdmin
The database will download as an .sql file to your computer.
4. Create a new database for the development website by using MySQL Databases. This keeps the development website from affecting the live website
Create a new user for the database (For better security).
Add that new user to onlythe development database
Grant all the permissions that user could need
5. Import the backup sql file contents from step 3 into the new database
You can use phpMyAdmin for this
6. For a WordPress site, update the siteurl and home options in the options table of the new database
If you use a different website system. You may need to make different updates for it to recognise the new configuration.
You now have a test site that you can freely modify without fear of breaking the exisiting, live website.