Current time: 04-17-2014, 12:18 AM Hello There, Guest! (LoginRegister)

Post Reply 
Moving from sub domain to main site.
07-09-2008, 08:10 PM
Post: #1
Moving from sub domain to main site.
I have finally uploaded my new Joomla site to a test sub-domain. It is at http://www.now.imnotafraidpublications.com . Soon I hope to transfer it to the main site at http://www.imnotafraidpublications.com . 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"
Visit this user's website Find all posts by this user
Quote this message in a reply
07-09-2008, 09:57 PM
Post: #2
Moving from sub domain to main site.
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/now.imnotafraidpublications.com, then simply rename that directory to /home/yourusername/imnotafraidpublications.com

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/now.imnotafraidpublications.com/logs';
var $tmp_path = '/home/yourusername/now.imnotafraidpublications.com/tmp';

which need to be changed to:

var $log_path = '/home/yourusername/imnotafraidpublications.com/logs';
var $tmp_path = '/home/yourusername/imnotafraidpublications.com/tmp';

3) Clean up after, as desired - make sure that if you still want to have now.imnotafraidpublications.com house a site, that you create a new directory with that name, and make sure that your domain imnotafraidpublications.com is setup in the panel's Domains-> Manage Domains section to use the /home/yourusername/now.imnotafraidpublications.com 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 "imnotafraidpublications.com" installation using a MySQL host you had previously set up (maybe something like "mysql.now.imnotafraidpublications.com". 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. Smile

--rlparker
--DreamHost Tech Support
Find all posts by this user
Quote this message in a reply
08-06-2008, 07:10 PM
Post: #3
Moving from sub domain to main site.
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 ctrockgym.com folder is under a different user (but under the same dreamhost user ID) than development.ctrockgym.com. 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?
Find all posts by this user
Quote this message in a reply
05-01-2011, 11:52 AM
Post: #4
RE: Moving from sub domain to main site.
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 old.mysite.com and then move he new site that is currently on a sub domain to our main site. I hope this makes sense.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: