Moving from sub domain to main site

I have finally uploaded my new Joomla site to a test sub-domain. It is at . Soon I hope to transfer it to the main site at . Can anyone help me with the proper procedure to do this. Do I need to do a new Joomla install and proceed just like I did when I uploaded to my sub-domain?

Any help would be appreciated.

Rex Bernard

“Listen to someone’s stories and they will think you are a very interesting person”

The main thing you need to consider here is whether or not you want to retain the “one-click installer”'s ability to “automagically” upgrade the Joomla! installation in the future, and that is only relevant if you installed this instance of Joomla! using the “one-click” installer.

If you used the “one-click installer”, and you want to keep the Joomla! installation in a state to be upgraded by the one click installer, then you should probably just create a new “one-click” install of Joomla! (and optionally export your data/content from the old database into the new one).

Note: Much of what follows could also apply to a “one-click” installation, if you are very comfortable with the linux command line and want to go through the machinations below to “trick” the “one-click installer” by renaming directories a few times at upgrade time, but that approach seems contraindicated. If you are that comfortable with the command line, it would be far more work to jump through the hoops required to have a “moved one-click installation” upgraded by the installer (move the “new” installation into the location the “once-click installer” is expecting it to be, have the “one-click installer” do the upgrade, and then move everything back) than it would be to just manually upgrade it yourself - so I won’t go into that! :wink:

If, however, you manually installed Joomla! yourself, or if you used the “one-click” installer but don’t care about using it to upgrade the installation later, there is a better way to approach this!

The “easy” (elegant?) way to do this requires only three steps:

  1. Rename a directory - Using your situation and assuming the “test” installation is in the file system at /home/yourusername/, then simply rename that directory to /home/yourusername/

  2. Edit your Joomla! installation’s configuration.php file to change the paths to the new directory in the two locations where the full path is defined. These are in the following lines:

var $log_path = ‘/home/yourusername/’;
var $tmp_path = ‘/home/yourusername/’;

which need to be changed to:

var $log_path = ‘/home/yourusername/’;
var $tmp_path = ‘/home/yourusername/’;

  1. Clean up after, as desired - make sure that if you still want to have house a site, that you create a new directory with that name, and make sure that your domain is setup in the panel’s Domains-> Manage Domains section to use the /home/yourusername/ directory.

That’s really all there is to it!

That said, there are a few things you should consider:

  1. Links in your content to other locations on your own site should use relative rather than absolute urls so that when you move stuff around lilke this they don’t break.

  2. You will be using the same database for the new installation that you were using for the old. This is good because the content remains intact, you may (or may not) find it messy to have your new “” installation using a MySQL host you had previously set up (maybe something like “”. There really is no reason to change it, but if you want to you would have to create a new MySQL host name in the panel (just an alias - it’s really the same place!), and then change the dbhost variable in configuration.php to reflect the new host.

Reading back over this, it seems complicated, but it is actually much easier to do than it is to explain! This is the way I stage, and launch, all my Joomla! based site, and it works really well.

Of course, you can also avoid the whole renaming aspect by substituting changing the directories the domain name and the subdomain used by the various installations in the panel (Domains -> Manage Domains -> Edit Hosting) to much the same effect, but you will end up with directory names that don’t directly correspond to the “sites” they represent. This doesn’t keep them from working at all; it just makes it harder for me to keep things sorted and can be confusing a year or so later! I just find it easier to maintain a direct mapping between the names of the directories I am using to host a domain, and the actual domain name - YMMV. :slight_smile:

–DreamHost Tech Support

I have a joomla installation on a subdomain, but I don’t see that the directories are mapped in such a way that this will work. The folder is under a different user (but under the same dreamhost user ID) than But it seems I should be able to copy all the files via FTP from the dev directory into the live directory (move rather than rename), update the joomla config, and Bob’s my uncle? Does that sound right?

How would these directions differ for a Drupal site? I currently have a test site on a sub domain. My hope is to move the current site to something like and then move he new site that is currently on a sub domain to our main site. I hope this makes sense.