Have you ever wanted to work on a live website but don't want to disturb your users for an extended period? You can do this with quick work and clever ACL management right on the live site, but for large changes and code work, you really need to do the work on a development version. Luckily for Joomla users, setting up a development site is a simple procedure that will allow you to make improvements at your leisure, then copy them to the live site in a minumum amount of time.

The First Part: Cloning your Website using Joomlapack

In this example, we will be cloning a site called "example.com" that has the folder "public_html" as the joomla root. We will be using Joomlapack, the most comprehensive and completely free backup and cloning tool for Joomla. This is a simple procedure on many servers but some setups result in disruptive errors. If something goes wrong be sure to check out the forums at Joomlapack.net or ask the doctor for help.

We will also be assuming that your host provides cPanel, as any good host should. cPanel is in an all-in-one control panel that allows you to manage files, set up databases, and control almost everything to do with your hosting account. In fact, we only recommend hosts that offer cPanel by default. Our personal picks are Rochen, Bluehost, and HostGator.

 

  1. Download the latest release of Joomlapack Core version.
  2. Install the Joomlapack component via the joomla installer at example.com/administrator.
  3. Open up a new browser tab and go to the example.com's cPanel account, then open the cPanel file manager.
  4. Create a folder in the joomla root of the site called "dev". You'll be able to access it later from example.com/dev.
  5. Go back to the Joomla administration tab for example.com/administrator and open up the Joomlapack component's Configuration screen.
  6. In configuration, you will see a slider for "Basic". Click "browse" to select "dev" as the output directory (the folder you created in step 4). Be sure to click "save" to save the configuration settings.
    For this example, you won't need to mess with any of the other parameters because you won't be moving the backup anywhere. If you were moving it via FTP, you would want to select the archiver engine in the profile settings -> advanced slider as something that compresses the files more so than the default zip format, like gzip.
  7. Click "backup now", which will take you to a screen to set the backup title and description, which you can ignore. You'll get warnings about zip being selected as a format but it doesn't matter either since you are not moving the backup to a new server.
  8. Start the backup by clicking the "backup now" button at the bottom left of the backup now screen.
  9. While it is backing up, don't navigate anywhere in that tab. Let it do its work, it may take a while depending on the site size.

Setting up the Cloned site

A joomla website consists of all of the files in your Joomla root combined with a MySQL database that stores your articles, users, and info for the rest of your extensions. Joomlapack zips up your joomla root and also exports your MySQL database. While your site is backing up you'll have a few minutes to set up the new empty database into which the Joomlapack installer will "dump" your live site's data.

  1. Go back to the cpanel tab and click the MySQL databases icon down towards to bottom.
  2. Create a new MySQL database. You can either create a new user as well or use the existing user. Assign whatever user you pick full privileges to the new database.
  3. Go back to example.com/administrator to check on the backup process. If it is not done, wait. If it says "backup complete", you don't need to do anything else with the old site. Go ahead and close that tab so you don't get confused.
  4. Go back to the cPanel file manager and navigate to the dev folder. You may need to hit "reload".
  5. You will find the backup zip file in the dev folder. Click the box next to it and then click the "extract" icon in the top right of the toolbar. It will ask you where you want to put the extracted files, which should already say "/public_html/dev".
  6. Click the "extract files" button to finalize the extraction. Wait a bit for it to extract, then click "ok" on the dialogue box confirming the extraction.
  7. Open a new tab and navigate to example.com/dev. It should automatically redirect you to example.com/dev/installation/index.php. This is the Joomlapack installer which is very similar to the joomla installer. Follow the steps but make sure you put your new database name, username, and password where it asks.
  8. The final step will attempt to write the configuration.php file to disk, which works about half the time. If it works go right to 16. If not, follow the next steps:
    1. Copy the configuration.php text from the text area box
    2. Go back to the file manager and find the file public_html/dev/configuration.php. Click the box next to it and click the "edit" icon in the toolbar.
    3. Paste the text from your clipboard over the existing text.
    4. MAKE SURE you have a closing php tag at the bottom of the file. For some reason the text joomlapack gives you to copy does not include that final tag. So, make sure the file ends with:
      	}
      ?>
      

      (that's the closing curly brace for the config class, and the closing php tag. Joomlapack only gives you up to the closing curly brace)
  9. In the cPanel file manager, find the folder called public_html/dev/installation. Rename it to "installation_bak".
  10. Open a new tab and go to example.com/dev

What now?

You should have a fresh copy of your live site, complete with users and all of your content! At this point your development site and live site "fork", so you can make any changes you want to the development site and not worry about your users seeing the changes. Be sure to check out my followup to this post where I discuss how to work on your cloned site and copy the changes back to the live site..
 

Doctor's Orders

When used correctly, Joomlapack is a priceless tool for making changes and upgrades to a live site. You will be able to work faster, keep your users happy, and continuously improve your website. This technique is one of the most important tools for Joomla developers and administrators. Check out Joomlapack.net to learn more or ask a doctor for help if you get stuck.
 
Jesse DundonJesse Dundon is a founding partner at Hathway Tech, where he is responsible for project management, training, and overall business strategy. He is a graduate of Cal Poly San Luis Obispo, avid rugby player, and a true scholar of Joomla! and web development in general.

Like this? Tweet it to your followers!

Latest articles from Jesse Dundon

Latest 'tweets' from JomDoc.com

  • Do you use SEF URLs with your Joomla site? Check out this very important post on how do save time in the long run: http://bit.ly/6nvSfv Link Wednesday, 25 November 2009 21:23
  • New Blog: Selecting a Professional Joomla Theme http://tinyurl.com/ykokson Link Monday, 16 November 2009 23:58
  • Cloning a Joomla site for development - not that hard. See the tutorial on JomDoc.com: http://tinyurl.com/yfdzzqh Link Sunday, 15 November 2009 19:28
  • Virtuemart + authorize.net customer information manager = secure customer data storage Link Monday, 09 November 2009 21:02
  • Looking forward to some improvements on the company site. Link Saturday, 07 November 2009 23:17
blog comments powered by Disqus

Getting by with a little help from our friends...

The Doctor recommends Rockettheme if you want a powerful and adaptable Joomla template