Transfer Joomla site from subdomain to domain


#1

I wish to create a sub-domain to do development of a wib site, then when I feel it is ready, transfer the entire site to the parent domain. What is the procedure for this?
I think that I will need to copy the MySQL database to the new domain, then FTP the files into the new domain, but I am not sure how to safely go about this.


#2

as long as the both the domain and subdomain are hosted under the same ftp/shell user you can just use your ftp program to rename:
rename domain.com to tempdomain.com
rename subdomain.domain.com to domain.com
rename tempdomain to domain.com

and you have swtcihed the domain and subdomains file spaces. You could just use the same database.

If you wish to maintain the dev site still you may want to have your user configured for shell access and learn to use the cp or copy command. You can type “man cp” or “info cp” at a shell prompt… hint: you will need the -r option for sure. hint2: using this scenario i would “rm -rf domain.com” right before the copy to empty out the destination.

It’s much faster to use the shell prompt than to use ftp to download and re-upload all the files.

You may want to maintain both a ‘dev’ or ‘test’ database and a live production, but remember many of your admin settings are stored in the database and will not be copied over when you move files. There is an advanced approach here as where you could use a single database with two different sets of tables within–that would allow you to copy tables directly as well using phpMyAdmin.

Remember too if you use .htaccess to limit access to you dev site that you must also deal with that file manually with renaming or copying.

It all just takes a little planning.