Duplicating a Joomla Website on 1and1

Posted by {"display_name"=>"greg", "login"=>"greg", "email"=>"greg@udon.org", "url"=>""} on November 06, 2010 · 2 mins read

The first place to look for general steps to make a duplicate copy (at another directory and URL) of an existing Joomla site is here - http://docs.joomla.org/Copying_a_Joomla_website

This is intended to be a shorter version of what's described above with some specific steps for 1and1.

I'm working with a 1and1 linux developer account which means I have ssh access.  Make sure there are no changes being made to the site during this process.

1. Use the 1and1 admin interface to create a new MySQL database for the new website. This can take 5-10 minutes so start it now.

2. Copy source directory contents to target directory.
cd <src-dir>
tar cvfz <target-dir>/sourcefiles.tgz *
cd <target-dir>
tar xvfz sourcefiles.tgz

3. Make a backup of the existing Joomla sites MySQL database. Use the 1and1 phpMyAdmin tool to do an export.  I choose the default no compression option and saved the results to an ascii file on my local PC (good to have a backup of the db - it saved me work the first time I did this - see below). If you've never done this before, 1and1 has an FAQ on how to export and import MySQL databases using phpMyAdmin.

4. Import the database you just exported to the newly created MySQL db.
- Remove the "CREATE DATABASE" and "USE" lines near the beginning of the exported database sql file
- Start phpMyAdmin on the new database
- Choose the icon for the SQL query window in the upper left hand corner (see the online help if you can't find this)
- Paste the exported sql from the source database into the window and hit Go
- Watch for the status of the import in the main browser window, you should see the number of lines executed

5. Critical first step to using your new site. Login to the new Joomla sites' admin interface (http://<site>/administrator). Browse to Site > Global Configuration and change the MySQL parameters Hostname, Username, Password. If you don't do this first, you'll be editing the old sites database from the new sites admin GUI.

You now should be all set to use your new site.