key-bo

Registered
Aug 18, 2019
3
1
3
Russia
cPanel Access Level
Root Administrator
Hi. I am root whm. One outer ip address. No dns. There are two accounts: user1, user2.
user1 primary domain example.com
user2 primary domain dev.examle.com
i need switch domains. so that content of https://dev.example.com now can be accessed by https:/ /example.com
How it can be done without copying files, databases etc? htacsess redirect is not an option.
 
Last edited:

Eminds

Well-Known Member
Nov 10, 2016
319
33
28
India
cPanel Access Level
Root Administrator
you can rename the domain name itself ,

go to WHM -> Account functions -> Modify an account , You can easily change the domain name on the account, do not attempt to change the username, that could broke your scripts configuration as databases use that username.
 
  • Like
Reactions: key-bo

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
You'd need to modify both accounts:

1. Modify the example.com account to something other- old.example.com for instance

2. Modify the dev.example.com account to example.com

3. Once that's done you'd need to update details for any CMS installations you have.
 
  • Like
Reactions: key-bo

key-bo

Registered
Aug 18, 2019
3
1
3
Russia
cPanel Access Level
Root Administrator
thnx
this seems more reasonable than previous answer
i'll give it a try.
by updating details for cms you mean that ftp and databases credentials will stay unchanged for account and i have to manually change them in cms config files?
 
Last edited:

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
by updating details for cms you mean that ftp and databases credentials will stay unchanged for account and i have to manually change them in cms config files?
I mean, most CMS softwares have a Site URL or in the instance of wordpress a Wordpress Address that will reflect the previous domain name, you'd need to update that to the new domain name.
 
  • Like
Reactions: key-bo