A few days ago I covered how to clone a Joomla website so you can work on it without disturbing your users on the live site. In this followup I will give you some pointers on proper procedures while developing on the cloned site and show you how to move those changes back over to your live site.
Depending on how your website is being used and how long you anticipate to be working on the cloned site, you will take vastly different approaches right from the beginning. This is extremely important because you will lose all benefits of the cloned development site method if you mess up here! Follow these few quick pointers for both cases, then check out your specific case for detailed info.
- Make sure you are on the correct site - since your clone and live site are so similar, make sure you are on the correct site during administration, FTP activities, or front-end editing and reviewing of changes. Look for that "dev" in the url.
- Be very strict with access to the dev site - user accounts will still work on the clone, so be careful who you tell about it. You don't want admins or users going and changing things without your knowledge.
- Backup, backup, backup. Just do it. 99% of the time you won't need it. 1% of the time it will save your life.
Case 1: The live site is not being updated during development on the cloned site
What this means is that you have a site that is not getting any content additions, user comments, user accounts, newsletters, or any other changes while you are under development. This is usually the case for smaller websites, portfolio sites, and company websites.
If you are confident that your live site is not going to change during development, you can follow these steps, and you are done!
- Proceed with changes on the development site. Feel free to install extensions, add articles, add menu items, change templates, all to your heart's content.
- When you are done, open up your cPanel file manager and navigate to the root directory of your development site (we called it "dev").
- Select the checkbox next to every folder and file in the dev folder (or hit the select all icon)
- Click the move icon. You'll see a dialogue box asking where you want to move your files to. Simply delete the "/dev" part, which will set "/public_html" as the target directory.
- Click "move files" to start the move. This will overwrite all of the Joomla files in the root folder, which is exactly what you want it to do. It's not a big deal if something goes wrong because you backed up again first, right?
- Check out your live site, it should be the new one now. Your clone will now be in the root folder working off the new database. You're done.
Case 2: The live site will be changed during development of the cloned site
This is the most common case for sites that allow user registration and commenting, have writers posting new content regularly, or have admins that make little tweaks here and there continuously. The workflow is a little more difficult but will still save time and cause minimal disturbance to users on the live site.
When you start work on the dev site, you must record every single little thing that you did. Create a checklist that you can refer to later. This includes installing extensions, creating menus and menu items, listing file changes, etc. Here is an example:
- Installed new template
- Configured by setting style 3, setting template as default, choosing CSS menu option.
- Created new menu called "left menu"
- Create menu items: blogs (goes to blog extension homepage), my blogs (goes to "my blogs" page), "new blog" (goes to "new blog" page)
- Changed bottom of newtemplate/css/template.css (see commented changes)
- Then deleted the template and installed a new one
- etc...
- Compile your list, remove items you ended up not using, and be sure you have access to all of the extensions you need to install.
- Take your live site offline through the global configuration or add a note on the homepage that you will be updating the site for a few minutes.
- Do all of the database actions you did in development first. This includes installations, adding menu items, etc.
- Copy over the files from the dev site that you changed. You can either do this within each file by only copying the individual lines you changed, or copy over the entire file you changed (for example template.css).
- Once you have done everything on your list, you should be good to go. Take your site back online or remove the update message.
Doctor's Orders
If you follow these procedures when working on a development site you will be able to easily move the changes back to the live site with a minumum amount of disturbance for your users. You will be able to test out changes, add new features, and continuously improve your web presence.




Jesse Dundon is a founding partner at 
