Keep Host But Change Domain Name


#1

Hi,

I currently have hosting with Dreamhost. My domain is registered with Namecheap (let’s say, abc.org). I want to keep all my files and databases under abc.org with Dreamhost, but also register a new domain name with Dreamhost as well (let’s say, def.org) and put the files under def.org. I will no longer have a need for abc.org–basically I want a URL change.

Is it possible to just move the files under a newly registered domain name with Dreamhost? If so, how?

Thank you.


#2

Yep. It depends a bit on what your site is (web applications like WordPress can be a little ornery about renaming), but it may be as simple as adding a new domain in the DreamHost Panel, under “Manage Domains”, and copying all the files from your old domain to the new one.


#3

It’s built from the ground-up with HTML and PHP.

By “copy,” do you mean manually copying the files? The files are currently under the Alder web server. I want to put all the same files under a new domain.


#4

Correct, I literally just mean copying the files from the current “abc.org” folder to a new “def.org” folder.


#5

There are hundreds of files to copy. Is there an easier way to avoid the tediousness of copying files one-at-a-time? There also seems to be a 50 MB upload limit (at least with WebFTP).


#6

Two choices… most correct: log in to the shell and use ‘mv’ or ‘cp’

IMO cheesy but easy (assuming both domains are using the same USER on the server… log into the dreamhost panel and edit the domain def.org and set the webpath to /home/USERNAME/abc.org

Be away you might have issues if the ground up php apps were built with anything hardcoded to a url or domain for example. If it were me making the change I would use ssh and check first using a ‘grep -e “abc.org” *’ (without the single ’ ) to see if any files needed to be modified.
[hr]
third choice use an ftp client isntalled on your machine such as winSCP and rename the directories

abc.org -> temp
def.org -> abc.ord
temp -> def.org


#7

A year ago, I transferred this website from a different host to Dreamhost, so I made amends to all things hardcoded (should be softcoded now).

If I were to edit the domain def.org and set the webpath to /home/USERNAME/abc.org, but then deactivate abc.org (which I’m planning to do), would this way not work after the deactivation?


#8

Oh, that’d work too. Might be a bit confusing down the road, but it’ll certainly work just fine — while the web path defaults to your domain name, it can be anything you want. (Doesn’t even have to be a domain name at all.)


#9

Oh, right! And wouldn’t “rename” work just fine as well, so I could avoid the confusion?


#10

It will work fine. Deactivating a domain leaves any server files in place.

Yes, and that’s a better option. :slight_smile:


#11

Thanks, Andrew and LakeRat!