Move Joomla from subdomain to main domain


#1

I did a search but couldn’t find an exact answer. This is probably an easy question, but I’m not very familiar with any of this.
I created a subdomain and installed Joomla so I could play around with it a bit and recreate my site. Now that I am finished, I would like to make my subdomain my main site.

So I currently have:
www.mainsite.com
joomla.mainsite.com (the subdomain)

How can I move all the content in the subdomain to the main site and have everything still work? I know Joomla references a database, so I’m thinking if I just renamed the directories, all the paths would get messed up. Any suggestions?


#2

There is a thread talking about moving Joomla from a subdirectory to the root folder of a directory. The same issues should apply, none of which are too terrible.

http://discussion.dreamhost.com/showthreaded.pl?Cat=&Board=forum_troubleshooting&Number=57267&page=&view=&sb=&o=&vc=1#Post57267


#3

Thanks. I saw that thread, but it was so long and the OP was trying to do something a little different.

So, it is as simple as moving all the files to the main folder and changing the htaccess and configuration.php files? I guess I can give it a shot. I’m also using SEF so got rid of the htaccess file. Hope that doesn’t complicate anything.


#4

I posted the bits I think are significant below. Basically you’ve got the process right, but there is the possibility of some 3rd party components giving you grief such as a document manager. The biggest thing you’re going to run into is the problem with Google being mapped to urls that are no longer available.

You can use 301 redirects to make sure humans get to the right location, but the spiders may not be totally happy which can result in broken links in search engines. Not a huge deal to some people. but usually is for someone going to the trouble of using SEF links.


My experience moving Joomla up from a subdirectory was almost painless for 5 different domains, and I didn’t have to trust my shell skills with what I thought of as a critical operation. Obviously it’s really important to make some backups since nothing is guaranteed.

Even though it might make a system operator cringe, I performed a drag and drop operation using my ftp program. Then I removed the subdirectory reference from my .htaccess and configuration.php files before uploading them, and browsed to the root directory of my domain. Success!! By the last site, the entire operation took about 2 minutes to complete.

I’ve still got some issues with Google trying to index pages from the old directory, and have had some difficulty in getting the things correct so that the spider doesn’t give me errors. The site works fine though. If you can perform these steps, you can manually upgrade Joomla. I don’t always trust automatic updates, even though it’s probably just a script executing a file copy.


Since I use Firefox, I figured I’d look into some of the available extensions for it. FireFTP is a pretty capable plugin, and I verified that it supports drag and drop operations like I described. While it supports file resuming, it appears to have the glaring oversite of no functional file queueing system. It’s available on the Mozilla site https://addons.mozilla.org/firefox/684/, and here’s the plugin home page: http://fireftp.mozdev.org


#5

When I went through it I used https://webftp.dreamhost.com/. I was initially concerned that it would not handle the all the files in the recursive copy command, but it worked out very well for me.


#6

Thanks for the info and things to look out for. I’m going to try and do the move tonight.