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.
To create the development site, Follow these steps:
1. Create a subdomain that the copy will use. I'll use devsite.mywebsite.com
2. Copy the files from the public_html folder, to the subdomain folder
You can use the File Manager
3. Export a backup of the live website database
You can use phpMyAdmin
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 Databases
Create a new user for the database (For better better for security).
Add that new user to only the 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 again
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.