The best way to move an Addon domain out to it's own account?

Metro2

Well-Known Member
May 24, 2006
473
49
178
USA
cPanel Access Level
Root Administrator
I've seen a couple methods described, but I'm wondering what the best approach is to moving an Addon Domain out of an account and into it's own hosting account.

Could someone please share your opinion / experience / preferred method?

Thank you,
M2
 

Spiral

BANNED
Jun 24, 2005
2,020
8
193
I've seen a couple methods described, but I'm wondering what the best approach is to moving an Addon Domain out of an account and into it's own hosting account.

Could someone please share your opinion / experience / preferred method?

Thank you,
M2
* Backup the files, email accounts (if any), and databases for the domain.

(Side Note: If you copy the entry from /etc/passwd & /etc/shadow, you
can re-instate the original password for FTP even if you don't know it)

* Delete the domain from the server

* Create the domain on it's own account. It is preferable to keep the
same IP address as the original account if that is possible.

(Right here is where you can put back the original password from
/etc/shadow if you saved that off earlier)

* Restore files to /public_html under the new account and you may
have to globally replace paths in the files from the old folder location
to the new folder location so you don't get any broken scripts or links

* Recreate the databases, merge in the backed up data, update the
script configs for any scripts on the site that use databases to point
to the new database and usernames.

* Recreate any email accounts and load saved mail files back into
/home/(login)/mail for the new account.

You should have everything back up and running again but have
the addon domain now operating under it's own account.

Actually most of this could be automated fairly easily. Since this is a
common question, maybe I'll just write an addon to full account conversion
script for everyone to use later. ;)
 
  • Like
Reactions: Metro2

d_t

Well-Known Member
Sep 20, 2003
243
2
168
Bucharest
* Recreate any email accounts and load saved mail files back into
/home/(login)/mail for the new account.
You don't need to recreate email accounts from cPanel, just move the mail/example.com and etc/example.com from the old account to the new one then change the owner to new user (note that some files should be in "mail" gorup) This way, the email passwords are keept.

Also, in order to access accounts from horde, you need a symlink
mail/user\@example.com -> mail/example.com/user

Forwards and mail filters are keept in /etc/valiases/ and /etc/vfilters/ - should be backuped and restored with the new domain name.
 
  • Like
Reactions: aadipop and Metro2

ANewDay

Well-Known Member
Sep 11, 2006
86
0
156
USA
Cpanel should release a tool. I've been contemplating on doing this for one of my addon domains for some time.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
11
313
Houston, TX
cPanel Access Level
Root Administrator
Our developers are considering the implementation of a utility to migrate an addon domain out to its own account. I have no ETA on this functionality. (Internal Case 8970).
 

Metro2

Well-Known Member
May 24, 2006
473
49
178
USA
cPanel Access Level
Root Administrator
Funny this was brought back up again - I have to do another one of these today in fact!

Yep, sure would be nice if cPanel ever adds their automated tool to do this in WHM. ;)
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
11
313
Houston, TX
cPanel Access Level
Root Administrator
Funny this was brought back up again - I have to do another one of these today in fact!

Yep, sure would be nice if cPanel ever adds their automated tool to do this in WHM. ;)
If you can create a thread in the feature request forums detailing how you want us to implement this, and post a link to that thread here so we can get some discussion going, that can help expedite this effort. It will also allow us to provide more status updates and allow you to answer any questions our developers have.
 

Metro2

Well-Known Member
May 24, 2006
473
49
178
USA
cPanel Access Level
Root Administrator
Hi cPanelDavidG,

I think you might have me mixed up with one of the folks on here who actually know how to (or said they know how to) create a solution for this.

I'm simply the original poster who was asking for the best way to perform the operation when I started this thread a year ago.

Trust me, if I knew how to implement an automated tool to make converting addon domains to their own hosting accounts, I'd have already done it by now and would be distributing it to everyone. (Not to mention I wouldn't have just done an "addon to full account" migration manually once again).

But no, I'm not that guy who has the answer. I was just the guy asking the original question, and then the guy responding with a comment after you mentioned that cPanel Developers were already considering the implementation of a migration utility that would rid us of this... migrain ;)
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
11
313
Houston, TX
cPanel Access Level
Root Administrator
Hi cPanelDavidG,

I think you might have me mixed up with one of the folks on here who actually know how to (or said they know how to) create a solution for this.

I'm simply the original poster who was asking for the best way to perform the operation when I started this thread a year ago.

Trust me, if I knew how to implement an automated tool to make converting addon domains to their own hosting accounts, I'd have already done it by now and would be distributing it to everyone. (Not to mention I wouldn't have just done an "addon to full account" migration manually once again).

But no, I'm not that guy who has the answer. I was just the guy asking the original question, and then the guy responding with a comment after you mentioned that cPanel Developers were already considering the implementation of a migration utility that would rid us of this... migrain ;)
In that case, feel welcome to create a thread proposing this functionality and leave the desired implementation to everyone else who participates in the discussion.
 

andycwb

Registered
Dec 13, 2010
1
0
51
I'd really like to see this feature as well... I have some add on domains that I'd like to move out to their own domain account and they have lots of email and other configuration with them that would be timeconsuming and error prone to do by hand.
 

bhd

Well-Known Member
Sep 20, 2003
149
2
166
JNB ZA
cPanel Access Level
Root Administrator
Our developers are considering the implementation of a utility to migrate an addon domain out to its own account. I have no ETA on this functionality. (Internal Case 8970).
This would be a very welcome tool. Having had to do this manually several times a one click tool would be a real time saver
 

texo

Well-Known Member
Mar 28, 2007
147
2
168
Agreed that this would be a very welcome tool. We've created a script which does it for us, but it still requires typing in info such as original username, new username and so on and still requires us to create the new account manually. It would be great to have this integrated into WHM.
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
If interested in the aforementioned enhancement, requesting a tool to migrate individual add-on domains out into their own dedicated cPanel accounts, I recommend expressing your unique ideas and suggestions for implementation, detailing how you would like such a tool to work or behave, in the appropriate feature request thread to help ensure proper attention and visibility of your feedback: http://forums.cpanel.net/showthread.php?t=157953