Thank you for asking a really good question!
There are, of course, many ways that you can build a test site. The Joomla help forum has a few guides (
Moving / Exporting Joomla from one location to another (with Phpmyadmin and FTP)
is one of them) but this is a little complicated.
There are two kinds of test sites:
- Your basic, no-frills, vanilla-flavoured Joomla site; and
- A copy of your existing live production site which you can use for testing without affecting your live environment.
In the first-mentioned case, the task is as simple as creating a new folder below your /public_html root, copy the Joomla installation kit to that folder and install Joomla in the same way as you did when you created your live site. The only difference between this test site and your live site is that you need to use a different database.
In the second case, this again starts by creating a new folder below your /public_html root and then you have to do some file copying and database copying (plus you have to tweak a few Joomla configuration settings to use the different database) which can be a lot of work. There is a simpler approach that removes a lot of this worry.
We prefer to use a Joomla backup component called
Akeeba Backup
. Combined with
Akeeba Kickstart
(the restore tool) site backup and restoration is a breeze. There is some excellent
documentation
available at the Akeeba website that shows you what you need to do.
Sure, you may be a little awkward at first when you use something new but, after a little while, you will find that backing up a site this way (and restoring it just as easily) only takes a few minutes. And the best part of all of this is that it's free!
So, let's summarise the steps:
- Create a folder below your public_html root.
- Make a backup of your live site using Akeeba Backup software. This will create a file with the extension .JPA
- Copy this .JPA file to your public_html/<new_folder> folder
- Copy the file kickstart.php to public_html/<new_folder>
- Using your cPanel, associate the folder public_html/<new_folder> as a new domain or subdomain.
- Using phpMyAdmin, create a new database
- Use your browser to run http://<new domain>/kickstart.php and install your site using your new database.
That's the general overview. Read the
Akeeba documentation which explains things in much greater detail. If anyone else has an easier way we'd love to hear from you.