Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.
This object is in archive! 

Tool that allows me to easily convert local addon domains into their own cPanel accounts

Feature Importer shared this idea 16 years ago
Completed

As a Reseller, I want a tool that allows me to easily convert local addon domains into their own cPanel accounts, so that I can easily split accounts with existing addon domains into multiple cPanel accounts.


I have had a few people ask about taking an addon domain and *easily* making it a main account. It would be great if we had something like a transfer tool for addon domains. Basically create the new account and transfer all the files over. Right now they have to delete the addon domain add the new account then ftp (or scp rsync etc) their files to the new account.


This is a feature that has been migrated over from the cPanel Forums. All previous comments and discussions concerning this feature can be located at:

http://forums.cpanel.net/f145/tool-migrate-addon-its-own-full-account-please-157953.html

Best Answer
photo

https://documentation.cpanel.net/display/ALD/Convert+Addon+Domain+to+Account

This feature is included in cPanel & WHM version 56 as a first iteration. That means that we are not completely done with development for the feature. We will continue working on this for 58 to more round out our feature. I have included a list of things we are converting and things that we have not yet gotten to. Thanks eveyone for your support.

Data migrated

The Convert Addon Domain to Account feature allows users to migrate the following data:


  • DNS records
  • Document root
  • Email (Email accounts, Email autoresponders, Email user filters, Email forwarders, Domain forwarders, Mailing lists)
  • MySQL®DatabasesDatabase users
  • Redirects

Data not migrated

The Convert Addon Domain to Account feature does not allow users to migrate the following data:


  • EmailHorde/Roundcube dataWebmail
  • Installed applications
  • MultiPHP settings
  • SSL
  • Subaccounts (FTP accounts, Subdomains, Web DAV accounts)
  • Any additional data not listed above

This is available in cPanel & WHM version 56. Comments are now locked, but if you require any assistance you can open a ticket with our support team, email benny (benny@cpanel.net) or ask on twitter (@cpaneldev).

Replies (89)

photo
6

How would you want to handle the files.


1) Transfer all the files from the document root of the addon domain?


2) Transfer some of the databases?


3) Transfer all the forwarders and email settings?

photo
3

The files, forwarders, and email settings could be done relatively easy. Databases, though ... not so much. Databases would likely need some manual intervention to determine which ones should be moved.

photo
2

The ability to automatically transfer email accounts & email forwarders, with their settings of that addon domain would be important too.

photo
5

The domain and relate subdomains, files in the document root, email accounts, email forwarders, etc... Anything specific to the domain would be ideal. It would be possible to include databases as well if a list of databases was provided.


Something like, "Please choose which databases are associated with this add-on domain: (list of databases)." The issue you are going to face no matter what is that script configuration files will need to be updated manually but this is an issue we all face now even without such a tool to help us out at all.


Copying the databases and any users for those databases, re-naming them for the new account, and then applying the old permissions and passwords would be ideal as well, but unsure how feasible it would be in an automated fashion.

photo
2

that is not big job to do it manualy ... :s

photo
8

It's also not a big job to create virtual hosts manually, to install Apache manually, or to do a myriad of things that cPanel handles for us. If you want to do it manually - you can - the tool certainly isn't going to prevent you from doing it manually.

photo
1

I would also like to see the ability do the reverse too.

photo
4

It would be good to converted parked domains (including mail) into a separate account as well.

photo
2

Domains, emails, subdomains and files makes sense. Databases no.

photo
2

Cool, I would like also the opposite convert a cPanel account into a simple addon domain.

photo
1

Yes it looks not that complicated and will make webmasters and other apps very easy to make the job in both ways, split or merge.

Split:

1. Select added domains to split.

2. Select elements to split (files, ssl,db, etc) would be like selecting the elements in an account transfer.

3. Script runs new user process like any other new account

4. New account created.

6. Moves files, changes permissions

7. Changes database name to new user prefix warns about this. Changes apache configs as on any account delete and account create.

8. Done, account splitted.

Anyway I manually do this...


Merge will be very similar, not complicated to put on a script/ feature I think, hope this feature sees a green light soon.

photo
10

A couple other options that would be good to have along with what luigidelgado posted


1. Option to take a backup of the original account before anything is done.


2. This is probably a given, but remove the addon domain.

photo
1

For "almost atomic" operation, create a temporary new domain name and move the addon domain content to the temporary domain. Once completed, remove the addon domain and rename the temporary domain to the new full domain.

photo
1

As long as a feature is added to this so that you could select specific MySQL databases to be transferred, this would be amazing! Features should include:-


- Transfer addon domain to (newly created by script) cPanel account

- Transfer all files from addon domain document root

- Select specific MySQL databases from former cPanel account to transfer

- Transfer any subdomains from this addon domain

- Possibly more I've missed out!


This would be very helpful for me and many others!

photo
2

IMHO useless feature, which profit for the business?

photo
1

Not necessary.

photo
1

protocol wrote:

I would also like to see the ability do the reverse too.
I have several clients in the reverse and main situation. Though it isn't impossible to merge or separate addons it is time consuming especially when you only need to do it once a month or so. I personally would like to see this feature.

photo
1

This feature would be very nice for moving addon domains that have lots of email traffic to minimize as much down time as possible. Depend on how your accounts and settings are configured, you would loose valuable emails that some companies would like to avoid loosing.


There are also those that use there domain to host customer emails and see thousands of emails an hour. Being able to minimize domain downtime and seamlessly move email acount would be a huge benefit to lots of web administrators.

photo
1

cPanel is a control panel for years, I cant understand that why didnt they implemented such an important feature before.

account => addon and addon =>account both very importand features.

Behind the manual operations, there is no way for moving email account data from/to addon domain.

And the work (move files, db, email forwarders etc) is not a small work to do manually for a reseller. FTP costs hours for reseller.

photo
5

I came here after searching the forum, where this feature has been requested since 2010. (http://forums.cpanel.net/f145/tool-migrate-addon-its-own-full-account-please-case-8970-a-157953-p5.html)


This feature should have been implemented years ago, and IMHO is one of the most important features that cPanel is lacking.


It is a very lengthy process to manually backup and restore all files of an addon domain into a new cpanel account (website data, database, email accounts, forwarders, cron jobs). It requires changing ownership of files as well, and can become a real pain, if you get it wrong.


I have had this requested by customers a few times now, and they expect service, so we have to sit down and do it, or end up with a disgruntled customer... so pardon me when I say, I am a slightly disgruntled cpanel customer, especially knowing that you have this feature in "planning phase" for years now.


Make this happen, there is a reason it is so high up in the list.

photo
1

Guys, correct me if I'm wrong but isnt this just a case of:

  1. grep DNS

    /var/cpanel/users/* | grep -vE "DNS=|XDNS" | cut -d= -f2 | awk {'print

    "/scripts/wwwacct "$1" "substr($1,0,7)" t3mp4321"'}

photo
1

I want to see the ability do the reverse too.

photo
1

Just wanted to bump this one. This would be a very useful feature. Simply a "convert from add-on to full cpanel" , it grabs the document root for said add-on domain, all emails, and simply provides a checkbox list of mysql databases to move.


Granted of course these databases would need to be dumped and re-imported into new database names to match the appropriate cPanel user I think this is the most straight forward way to accomplish such.

photo
1

I get requests for this from clients all the time, this would be a very useful feature.

photo
1

Hello,


A lot of clients have asked us for this tool in the last 2 years.


Would be great to see it implemented.

photo
1

The request under discussion here is the ability to promote an Addon Domain, and related assets, into its own cPanel account. Requests, votes and discussions for the reverse (consolidating accounts) need directed at the following request: http://features.cpanel.net/responses/as-a-reseller-i-want-the-ability-to-easily-merge-multiple-cpanel-accounts-and-their-addonparked-domains-into-a-single-cpanel-account-so-that-i-can-easily-c

photo
4

Hello,


Everything that is obviously owned by the addon domain should be migrated, that's e-mail accounts and forwarders.


Anything that is accessible from the addon domain account web path folder should be copied and not moved, the user can delete unwanted files but not restore files if they were shared by multiple addmin domains.


Anything that is not sure should be proposed : databases should be shown as a list with checkboxes or something similar, databases should be renamed to have the new user's prefix for database and usrname and password should be kept if possible.


A warning about database connect files needing to be updated should be given.


This type of change is a pain to do on a daily basis, not highly complicated but is alot of waisted time over the years.

photo
1

The ability to automatically transfer email accounts & email

forwarders, with their settings of that addon domain would be important

too.

photo
1

mocha host is a big hosting i also use their all feature. In their setting have option that you want to use for a handle ad don.

photo
1

There is a new feature of a WHM plugin called "Restore Manager" that makes it possible to easily convert an addon domain to become its own cpanel account. Here's a video of how it works:


http://www.youtube.com/embed/c096y6ntRgo


Here's their website:


http://rem.gk-root.com/Overview


(Scroll down a bit and you'll see this feature is called "Extract addon domain to new account".)


We own several licenses of this plugin for the last year, and this is a new feature they just added a week ago. (We've been using this plugin to allow our customers to manage their own restores of files from cpanel backups.)


BTW - I think cpanel should purchase this entire plugin and make it core. Everything it does is something WHM/cpanel should already be doing...

photo
2

If users have to start to pay extra for every new feature they need, why would they pay the cPanel license in the first place instead of using a free or open source panel alternative?

Personally I think something as delicate as this should be implemented by cPanel itself. I had very bad luck with third party plugins in the past, and this is not only for cPanel but software in general. A core feature implemented by the software itself, let it be a browser, or OS, usually has support from the official developers and just works. With third party products you better be sure the company or developer behind is serious, otherwise when updates come they will break and when you need support you are left dry.
I like cPanel addons and there are allot of them which do nice things but only of they do something new and unique, not if they try to complement or do something better of what cPanel already does or is supposed to do, in this case restore account which seems more or less what the backup feature is supposed to do.
I don´t think this is what users want. They probably want a button in WHM where they can convert an addon domain to a cPanel account. A migration feature, not a restore feature which probably involves some backup and restoration process.
Personally I don´t know why cPanel developers could not implement this in 2 years. Instead they try to implement and partner with external companies like Attract (uggh) to put some affiliate links on cPanel. If they think cPanel is done and can´t benefit from new features then they should look what users actually need. Its the little things like this which are really, really helpful for admins and hosting companies. And honestly its not hard to implement either. Any medium coder could do this, its just a script that moves and copies, data, sets permission, etc. The problem with doing this is that everytime cPanel has an update it will break or can have problems with cPanel so it should be officially developed by them. I even had problems with their backup feature and migration feature before, so something like this is more sensitive and I would not feel good about using an external plugin for this that needs root permission on a server.
Why cPanel developers almost implemented 0 features requested here is out of my knowledge, maybe they are understaffed or just lazy, because big features requested like better DNS clustering, this and allot of other stuff is here for years without even a chance of coming. If they expect third party developers to do everything then they should expect cPanel servers widely hacked on the Internet as users install gazillions plugins and addons could have security holes on them.

photo
2

I just got a notification that status is now "Planned"! Any ETA?

photo
1

Great news, a cPanel implementation of their own shall be better than what third parties could do....

photo
4

stormy wrote:

I just got a notification that status is now "Planned"! Any ETA?
It's on the backlog for 2014. That's the closest ETA I can give right now.

photo
2

Nice, this is something that would help users allot. I had this need several times, when customers becomes resellers and wants to move addons to accounts or when they want to separate accounts from addons to its own account. This is actually something that popups in support tickets allot, how to migrate the addon to a real account. And its painful for the user as well, because you cannot actually add the real account until the addon is removed, which means he suffers downtime when having to remove the addon and then transfer the files and config.


A way to automate this from WHM would solve this problem from everyone. Good to hear this feature will come eventually.

photo
2

Yes, it would be very nice.

photo
2

We need it.

photo
2

Please cPanel, do it and save us our time!

photo
2

Can't believe we're still waiting for this.

photo
2

Yes, what are you waiting for...

photo
1

5 years in the making...!

Good lord!

photo
1

cpanelnick wrote:

How would you want to handle the files.


1) Transfer all the files from the document root of the addon domain?


2) Transfer some of the databases?


3) Transfer all the forwarders and email settings?

Transferring the files and email data from the addon domain to the new account. I think it would be bast to not do any databases by default, and if databases need to be transferred be able to specify. There should also be a warning indicating the need to update configuration files to point to the new database.

photo
1

Dylan Botha wrote:

Guys, correct me if I'm wrong but isnt this just a case of:


  1. grep DNS

    /var/cpanel/users/* | grep -vE "DNS=|XDNS" | cut -d= -f2 | awk {'print

    "/scripts/wwwacct "$1" "substr($1,0,7)" t3mp4321"'}

This will fail, as it should, due to the presence of the domain on the server already. But I love the use of awk here, so thanks for the post.

photo
1

This would save us from a lot of headaches.


+1

photo
1

Hello,


A lot of people have asked us for this tool in the last 2 years.


Would be great to see it implemented.

photo
1

Any update on the timeline Kenneth Power?

photo
1

Any new when this tool will be launched ?

Regards,

Satta Matka

photo
1

would love to know when this is going to be implemented its been far too long...

photo
1

Kenneth Power wrote:

It's on the backlog for 2014. That's the closest ETA I can give right now.
Do you have any potential update on an ETA for this update?

photo
2

It's on hold until easy apache 4 comes out as they have made huge changes to the way domains are managed. I guess as it's in planned stage it will be one of the first things to be included in 11.52 as 11.50 will soon be released.

photo
1

Moderators Note: This is not the place to promote third party services.

photo
1

Again, it was not a promotion @Admin, it is a tool to accomplish the above mentioned task;


- Removed -

photo
2

It does not matter whether it accomplishes the task that this feature request is about or not, you were still promoting a product. You were promoting a tool that requires a paid monthly subscription, simple as that. Were it free, the moderator may have allowed posting the link to it, but this is a feature request, meaning people what it included (for free) in cpanel.

photo
1

Yes, I understand the meaningful part of this. The intention was, if someone looking for a tool to accomplish this task (maybe an one time use) , this plugin would help(until cPanel includes the feature with it). Anyhow, thanks for looking into this.

photo
3

All of your comments on feature requests ("Tool that allows me to easily convert local addon domains into their own cPanel accounts", "Ability to easily merge multiple cPanel accounts and their addon/parked domains into a single cPanel account", "DNSSEC" and "Backup to Google Drive/Dropbox") have been solely to link to products that your employer sells.


You are only here to try and drive sales of your employer's products and make money, not help people.

photo
1

Edward Dore, Thank You for looking into all of my comments. I am a new member joined today. When I saw some of the feature requests that WHM/cPanel users requested, which as a solution we give, I thought I could help them with the Product we give. As you mentioned, I had commented on the topics "Addon domain to main Account converter, DNSSEC and cPanel backup solution". Please be informed that we are not limited to 2 or 3 products and if my intention was sales, I would have commented all of our products and their links here. :)

And as a note, I am working as a Systems Administrator at Admin-Ahead, so why should I do sales here?. Yes, perhaps if I had commented with a proper explanation of the links, this would not have happened. I understand "This is not the place to promote third party services" and I never intended to do that.


Thank You again.


photo
3

Just my 2 cents, I'd appreciate people that link to alternatives while we receive official support for features like these one.

photo
1

Looking Forward to the release of this :) Waiting in anticipation ...

photo
1

In searching the web, I find lots of users and threads where cPanel clients have been BEGGING for this feature over 5 YEARS now. Easy Apache or not, the users (read: PAYING CLIENTS) of cPanel pay a lot of money to use this software. No internal account migration tool after all these years of waiting is a shameful display of a blatant "lack of interest in customer service". I'm VERY disappointed that after all this time, a highly requested basic feature has STILL not been implemented.

photo
1

Note how it states "Planned"

photo
1

How long does that status fly? I wish I could have had 5 years to "plan" my wedding. Seriously, the code for account migration is already there. Are you saying this feature should warrant even 5 months much less 5 years when all the basic code is already written?

photo
1

It may say "Planned" but that doesn't really mean much unless they give more information. Is it planned in the next release, or in 10 years?


This was originally requested back in 2010: https://web.archive.org/web/20130621081226/http://forums.cpanel.net/f145/tool-migrate-addon-its-own-full-account-please-case-8970-a-157953.html

photo
1

Exactly! Thank you Sherwin_flight

If I took 5 years to make my clients happy I would have been out of business a long time ago. This is irritating and *not* the first time I have needed and searched for this feature over the years -

photo
1

oops - double post

photo
1

Our programmer did fix this in a couple of hours with programming using your API.

We have been using the script for many years now and it's working like a charm.


Strange that my programmer can fix this so easy, but cPanel cannot.

If you need to get something done, it's always best to do it yourself :-)

photo
1

Heya, don't share that script anywhere or anything... ;-)


But seriously, if you did feel like sharing it, a lot of folks would appreciate it. But no worries if you don't. :)

photo
1

Heya, don't share that script anywhere or anything... ;-)


But seriously, if you did feel like sharing it, a lot of folks would appreciate it. But no worries if you don't. :)

photo
1

Thanks for sharing that info. Knowing that makes it feel more like incompetence. Previously, it just seemed negligent.


You should think about capitalizing on that script and sell it for $10 or so. You'd probably make a million the fist week ...

photo
1

It is programmed to our systems, but I will talk to our ceo who did the scripting.

Also I see there are company today offering this tool to 4$ pr.month already....

photo
2

Now I found out why so many people double post (spam).

When I comment it's just "loading" and finally your comment does not show and push "Comment" again :p Sorry guys. Please fix cPanel!

photo
1

How would you expect mysql databases to be handled with this process?

photo
1

The migration tool would open a short form where you could select the already made new account that the add-on domain is migrating to so that the database name prefix can be updated along with ownership permissions, serialized data updates and probably more I am unaware of.


Again, this is less difficult than moving a bunch of sites at once with the existing "Transfer Tool" that can transfer between 2 foreign hosts in unrelated data centers.

photo
2

Hello,


Thank you all for your input on this item. We have been investigating a simple commandline tool as a first deliverable. The sticking point that we seem to keep hitting is how to be smart about the databases and database users.


We are currently thinking of letting the reseller select which databases and users go with which accounts. This get tricky when a db user is attached to more than one db. If one db is sent to the new account and another stays with the old account, then where does the user go?


We would likely use a backup file to do the addon account migration. This will prevent having to worry about data changing mid stream.


As far as converting an account to an addon domain. This idea would be better discussed in https://features.cpanel.net/topic/as-a-reseller-i-want-the-ability-to-easily-merge-multiple-cpanel-accounts-and-their-addonparked-domains-into-a-single-cpanel-account-so-that-i-can-easily-c


I would like to hear your input on the concept!


Thanks,

Travis Ellis

photo
1

When we switched from Plesk we had a lot of databases that were not using the standard cPanel naming convention. Since that works, I would say for databases just leave the names as they are so applications don't need changes and will keep working.


Same for database users that only have access to databases that get moved.

If someone wants to change this after the move, there are tools in cPanel already for renaming databases and users may need to be re-created - I don;t think you can rename users...can you?

If there are users that have access to databases that will get moved and databases that stay behind then I would say for now just stop and throw an error message detailing the issues so they can be fixed by hand before processing again.

This would get the feature out quickly for most users and database users that have multi-database access are often created by power users that may be able to manually create and delete users to fix it before trying again.

photo
1

Correct me if I'm wrong, but should any account migration be based on moving old to new? If yes then shouldn't that require a new username for the new account? You asked:

  1. If one db is sent to the new account and another stays with the old account, then where does the user go?

The old user stays as the old user, and the addon domain is moved to the new account with a new username. Isn't this very similar to how the transfer tool works now? If updating the database serialized data, and paths is the biggest problem, perhaps the code in this Wordpress plugin will help. I use it regularly to move sites to new domain names, hosts with varying home paths etc;

Duplicator: http://lifeinthegrid.com/duplicator

photo
3

Travis, about the databases, there is a very easy solution IF you move away from your "simple command line tool" idea, and instead provide an GUI with some fields to fill out in the cpanel/whm.


First, let the user choose the domain and the cpanel username for the new account, then let the user choose which database(s) to migrate to the new account, and then ask for new database username(s) and password(s). That way, the only thing that needs to be done after the conversion from an addon domain to a full cpanel account is update the username(s) and password(s) in the file(s) that use the database(s).


We use a "simple command line tool" to do most of the work now, and it

took less than a day to create it! It's really frustrating that cPanel

has not come up with anything at all in all those years, and that you, Travis, now tell us you are "investigating" a script that anyone who knows bash can write in a day.


Me, 2 years ago in this thread: "This feature should have been

implemented years ago, and IMHO is one of the most important features

that cPanel is lacking."


Me, now: "This feature should have been

implemented YEARS ago, and IMHO is one of the most important features

that cPanel is lacking."

photo
1

What would likely solve this would be to map databases to both usernames and domain names. But even with this, there will be issues. What if you manually move files between addon domain folders (i.e. /domain.com-test and /domain,com)...

photo
3

You also need to update applications that reference the old file path.

photo
3

I'm not sure that databases should be migrated.


If they are, I would have a tool to select databases that need to be migrated.


You would select the databases that need to be migrated. These would then be created with the new username prefix if username prefixes are used, or otherwise a new name would be requested.


Once the migration is done all you would have to do is :


1) Rename databases in scipt config files

2) Delete the databases from the original account.


A message should clearly inform the user of the steps he has to do manually.


I think it would be wrong to delete existing databases or database users as a single database could be used by multiple scripts on multiple domains.

photo
1

with regards to the database USer i would suggest that the migrated site is the one that would just need to recreate users and permissions for the the DB IF it exists on other databases in the main account and seems liginca since the db username MUST change anyway since they all contain the root username of the account, so that sort of thing would have to be edited updated manually, but thats way easier then the current process!

photo
1

ok - i can do the database manually if necessary but please distribute something.

photo
1

Heck, at this point (as one of the first users to request this over 5 years ago) I'd be happy even if I just had to handle exporting / importing / migrating the databases myself and have just a basic "Addon to Master cPanel" account changer, just to get *any* forward movement on this feature.

photo
1

This tool already exist for years, maybe cPanel needs to buy this company and their programmer(s).

I used it more than once and it works. It's a shame cPanel doesn't have this standard.


http://admin-ahead.com/cPanel-Plugins/Add-On-Domain-to-Main-Account-Convertor-cPanel-WHM-Plugin.html

photo
1

edit: doublepost

photo
2

Hi, i see this idea has been shared 7 years ago, and has the status 'planned'. Is there an eta on this?

photo
2

Any update. Needed this feature a few times.

photo
2

Seems that all the sarcastic posts, pointing out that cPanel is not taking this (or possibly all) feature requests serious, have been deleted. I just wanted to say - please keep them coming! I get an email with a copy each time, and it is encouraging to know there are quite a few people that would like to see cPanel create a much wanted feature. Also, it may make cPanel take this more serious, as they have to constantly delete posts that make fun of them.


cPanel - This feature would take a skilled programmer less than a week to create. If you do not have skilled programmers, or those that you do have are busy with other tasks, HIRE ME!

photo
3

I do not think that cPanel team doesn't take this serious, but people also have to understand that the software in itself is old, there's legacy code which if you make big changes, can introduce big bugs in the system, therefore you have to be careful when changing it.


Sure, if you have a completely isolated environment, you can probably build it in 1 week (or less) - but put the complexity and uncertainty of stuff that might break on top, and it will take a lot longer time.

When cPanel ships something it really has to be bug-free, they're affecting a lot more servers than people expect.


cPanel are working towards easier integration of features like this, but it requires some structural changes to make this happen, and to get rid of the old code, to be able to easier improve in the future, and make it future proof.


This feature is planned indeed, there's no ETA on it, because currently there's getting features into cPanel that is much more important, but these features are also making it possible to move towards features like this.

People have to think in a bigger picture, we're not just talking about a simple feature (even though it might seem like it) - but you have to make changes to multiple parts of the application to make it awesome, and you have to ensure that it works perfectly.


Also just because a feature has 417 upvotes doesn't mean it's most valuable. If a feature will 300 upvotes brings more value on the long run for a bigger part of cPanel users, then that one might get priority before.


I like this feature a lot, but it's not something at least I rely heavily on. To be honest, creating a new account and move the files, do a chown on the files.. It doesn't really take long, no need to use ftp, rsync, scp when you copy files internally on the file system.

You could even create a simple bash script that does this using the API if you need it so much.

Remember this won't take care of databases etc anyway, so it's deleting the domain, create a new account and move the files, chown them.


There's features (with less upvotes) that will benefit me every day, and benefit all my customers every day. Which I believe is way more important.

photo
1

I think you have no idea how lengthy a change from Addon to full cpanel account can be, especially, if you are not an expert in bash commands.

For example: Imagine an addon has 100 email account, and has 20 subdomains each with their own website and database.

It would take you days using GUI tools only.

First, you would have to sync each mail account to a temporary mail client, then move the inbox/sent/etc to a local folder, then setup the mail accounts on the new cpanel account and relink them with the temporary mail client using IMAP, then move the inbox/sent/etc. back into the accounts so they get re-uploaded.

You would have to download all the files for all subdomains, then upload them again, once you created all the subdomains in the new account.

You would have to export and import all databases, as well as setup new database users and then modify all the files that were using the old database (user-)names.

I only described a few things that would have to be done, there are actually more steps involved to complete this task, and I know I described an extreme case, however, with this feature such a case would take no more than a couple of hours (possibly even less, if moving files instead of creating a backup first) and it would only require one to set a few parameters.

Also, not a single CHANGE would have to be made to cpanel in order to create this feature, so your argument about legacy code, etc. is pretty much invalid. This feature can be programmed using the newest/best coding standards without having to worry about the rest of cpanel's code.

photo
1

- You can use the API to fetch email accounts as well as sub-domains


- Emails are just files on the file system, you don't have to sync each mail account to a temporary mail client (lol at that one).

- You do have a list of domains that needs to be moved, therefore you can store a backup of those directories really easy (or extract them from a backup)

- This migration won't include Databases, because databases are not linked to domains, but to accounts. There's no way for cPanel to know which databases you want to migrate (unless they make an interface where you select which databases to migrate (suddenly code change ;))


Sure they could just start rebuilding cPanel from ground up. But that's not how it works. They have to integrate it in a friendly way (else people would just do it manually anyway). So they have to work with legacy code and implement ways to migrate stuff between accounts.


Believe me, it's not simple.

If it was simple, you could easy create it yourself using the cPanel API? I can't see why it's so hard?

photo
1

I think you should read a few more (of my) comments here... and maybe you should ask Kent how easy he thinks this task is.

There is no rebuilding from the ground up required to add this feature. In fact, you can get a monthly subscription to a plugin developed by a 3rd party, that can do this right now.

You can do a lot, if you know how to access an API and how to use ssh/bash commands. As mentioned earlier, we use a script I programmed to do most of this work, but for the average cpanel customer who does not have (API -) scripting knowledge, moving an addon to its own account is a hard task.

photo
2

In case you are wondering, the migration done by hand is a nightmare. No matter how skilled you are...

photo
1

What I do is make a backup of ~/etc/addondomain.tld to ~/etc-move/addondomain.tld and ~/mail/addondomain.tld t o ~/mail-move/addondomain.tld


I then create an account with addondomain-new.tld


Then I move the files accross, dump and recreate the databases with new users (keeping the same passwords) and move /home/olduser/mail-move/addondomain.tld to /home/newuser/mail/addondomain.tld and /home/olduser/etc-move/addondomain.tld to /home/newuser/etc/addondomain.tld


Make sur that the owners of files are right (using chown -R --from=olduser:olduser newuser:user * and chown -R --from=olduser:mail newuser:mail *


I then delete the addon domain and rename addondomain-new.tld to addondomain.tld


I haven't had any issues doing it this way. It's a pain but it works.

photo
1

Convert Addon Domains into cPanel accounts? Why make that a Feature when it can be easily done via CLI.

ie. grep DNS /var/cpanel/users/* | grep -vE "DNS=|XDNS" | awk {'system("/scripts/wwwacct "$1" " substr($1,0,8) " staticpassword ")'}

photo
1

Dylan, the feature request section has a bug since a few years, which makes it appear as if the post has not been submitted, and clicking Comment more than once will submit your post more than once. It was pointed out by Morton in this thread a few weeks ago.

To answer your question: Because that piece of code wouldn't do all that is required. A few examples: Most Addon domain have their own email accounts, so they need to be transferred, as well as forwarders. The databases that are used by the addon would have to be transferred into the new account, and then they'd have to get new names with the new cpanel user prefix, and new database users with the correct cpanel user prefix would have to be created.There may be cron jobs related to the addon.The DNS Zone for the addon has to be removed from the original account, so it can be created/owned by the new one.


There are quite a few things to consider when changing an Addon to a cpanel account, however, it's no rocket science and the feature should have been developed by now.

photo
1

Fair enough - point taken. I see my multiple comments. Whoops!

photo
3

Hi everyone,


Sorry for the noise with the fraudulent accounts. We have had a user register multiple accounts with different throwaway email accounts. We know it was the same users considering they all used the same IP address to connect with.


This feature is something we have plans of working on. We have an idea of how to get this done. But the team that would do it is busy working on Two-Factor Auth. We can provide a simple script that would do the migration, it would have to handle the issues of Databases without clobbering anything. It would pull from a cPanel Backup file to do the migration. This will prevent files from changing during the migration.


Thank you for your continued patience,

Travis

photo
1

Great to know! So... can we assume that one of the next improvements after Two-factor auth could easily be this old feature request?


I had to migrate one addon domain to it own cpanel account a couple weeks ago... And can tell that when the addon is complex enough (several databases, dozens of email accounts), it is very annoying doing such a migration. I'm evaluating the possibility to disallow creation of addon domains for new customers, which, is not the best approach, I know. But until you develop the migration script, I won't want to migrate more addons anymore :)

photo
2

I've already gone and done that " disallow creation of addon domains " instead replaced them with cpanel accounts, so in affect it become a reseller package.

photo
1

That's actually the best solution at this point Darren. However, it would ruin quite a few sales models, as people would only have to get a new account/package, if they run out of space.

photo
1

Hi everyone! Are there any updates? I need to migrate almost 100 addon domains to their own accounts... I have no words to describe this! At this point, any homemade script is helpful! Thanks!

photo
1

I had the same problem, some hosts want $10 per domain for SSH access on a reseller server. So even if you have WinSCP or Putty its of no use without the extra charge. I found a solution that allows you to FTP server to server. https://multcloud.com It is free up to 10TB transfer. (This also allows you to backup on dropbox / Google Drive etc. as well.)


I upgraded from a shared to a reseller hosting and asked my host to transfer the accounts. The problem was I could not move the wordpress files onto the individual domain accounts without SSH. This can be done with server to server FTP. You will have to delete the addon domains first in order to setup individual cpanel packages.

If your host kept your username prefix the same (yourservername_) worpress will work straight away, you might need to log into wordpress and update the permalinks though. If the username is different you will have to change this in your wp_config.php file or backup and move the database to the individual domain account's phpMyAdmin


I sincerely hope this helps as I know the drill.

photo
1

You will have to manually edit the configuration file with the new database name and user of the transferred addon domain that will exist as its own cPanel account. You will also have to manually edit any other configuration files where the file paths may need to be updated. This tool can cause extended downtime for a site if clients do not know how to update their configuration files.

photo
1

Wow this feature is now In progress. Congratulations to cPanel team.

photo
2

Nice to see it is In Progress. I will be following up this one.

photo
2

Me too. Then I can un-install a third party addon I have. Also please add this feature with an API hook so that we can use it via WHMCS.

photo
1

Me 44too (#442). Need this feature, it's very annoying to not be able to add the domain to another place even if inactive due to "error already exists".


I only hope you release it BEFORE you terminate the x3 theme because if you do that I will never get this feature because I'll never upgrade cpanel to a version in which does not allow you to use the x3 theme.

photo
1

Will look for this feature rolling out, It's Really really useful according to me when we have to create new from addon domain.

photo
1

Looking very much forward to this feature becoming a realization. I only wonder if it will be compatible with CloudLinux 6.7 and EasyApache 3, since currently CL 6.x is not compatible with EA4.

photo
2

Cloudlinux 6 currently has a beta version of EA4 compatibility so it shouldn't be too long now.


https://cloudlinux.com/blog/entry/beta-easyapache-4-released-for-cloudlinux

photo
1

so this is just for cloudlnux? I certainly hope not.

photo
2

Definitely not! It will be part of v56 on all of our supported operating systems. In case you want a quick look, I posted a tiny video to twitter yesterday, that gives a basic overview of its operation: https://twitter.com/cpaneldev/status/712024671433011200

photo
1

I hope it can also move conf files from /usr/local/apache/conf/userdata/..... from the old to the new path

photo
1

Nope it's for all supported OS's of cPanel & WHM

photo
1

Well, if it's for all supported OS's then it should be a yes since that's on a supported OS.

photo
1

Sorry I replied to the wrong comment. I can get you that specific info.

photo
1

Makes more sense - thanks then :)

photo
1

I still don't understand how this will work without having to update site configuration files manually? For example, a WordPress site with a database called cpanel1_wrdp is an addon domain. The addon domain is then set up as its own cPanel account called cpanel2. The database is copied over to the new cPanel account and the database now becomes cpanel2_wrdp. The wp-config.php file will manually need to be updated with the new database name, correct? Similarly, in a Joomla configuration file, the following is specified:


public $log_path = '/home/cpanel1/addondomain/log';

public $tmp_path = '/home/cpanel1/addondomain/tmp';


If an addon domain is moved to a new account called cpanel2 then the above file paths need to be changed in the Joomla configuration file (along with the database name) otherwise the site will not come up. Surely not everyone will realize they will be required to update these config files. Does this not have disaster written all over it? Here is my addon to cPanel account guideline:


Addon domain turned into a separate cPanel1. Download the content of your addon domain to your local PC.2. Backup any associated database(s).3. Go into the original cPanel and remove the addon domain from under the Addon Domains icon. (You do not need to delete the original content or original databases.)4. Create a New Account inside your WHM. Fill out the form, using the old addon domain name as the Domain. Click the Create button.5. Once the new cPanel is ready, upload the content of your old addon domain to this new cPanel, in the public_html folder. (When using FTP to upload, connect to the cPanel's IP address and login with the new cPanel's username and password.)6. Login to the new cPanel and restore the database backup(s).7. Reconfigure any database connections. (The database name and username have likely changed.)Your site will only be down as long as it takes to complete these steps. No need to change your name servers.

photo
1

Web applications are outside the scope of cPanel's support - they're offering a tool to convert addon domains to primary domains - whatever you're running on the domain is your responsibility.


I'd also recommend expanding your guidelines - you should be including things like FTP accounts, Email accounts, Fowarders, User level filters, domain level filters, SSL certificates..... the docroot is only a small piece of the puzzle.

photo
2

As for the databases - cPanel has that database naming scheme, but it is not required to actually run. When we migrated from a Plesk server to cPanel the database names of the accounts were kept the same as they were on Plesk. There is a lot that can be done in code that can't be done in the UI.

The path names are a bit more complicated, but I guess a replace could be run on all text (PHP, perl...) files in the account and could take care of some of these issues.

A bit more difficult if these paths would be stored in the databases, but probably doable.

photo
1

This tool will not edit any web application files, it will only extract the domain's configurations, create a new account using those configurations, and copy the content associated with those configurations. Any paths defined, or databases defined, in the code itself will need to be updated manually by the admin.

photo
3

Hi,


The application will continue to work for applications like wordpress if you choose the move function in the database section. This works because the system remaps the databases and db users to the new account. This means that the connections are still the same and the configuration file can stay the same.


Thanks,

Travis

photo
1

>>This tool will not edit any web application files, it will only extract the domain's configurations, create a new account using those configurations, and copy the content associated with those configurations. Any paths defined, or databases defined, in the code itself will need to be updated manually by the admin.


And herein lies the crux of the problem in my opinion. The tool sounds great in theory but unless people know what changes to make in the configuration files, this can cause issues. Just my 2 cents on the matter. Thanks.

photo
1

Unless you just move the databases, then all the connections are the same.

photo
1

Check out :


https://twitter.com/cpaneldev/status/712024671433011200


You can choose to move or copy the databases, if you choose copy you can then just edit the config files so they have the right name.

photo
1

This feature is confirmed as part of cPanel & WHM version 56 which will go to CURRENT as soon as next week. You can find a quick previous on the cPanelDev twitter account:


https://twitter.com/cpaneldev/status/712024671433011200

photo
2

https://documentation.cpanel.net/display/ALD/Convert+Addon+Domain+to+Account

This feature is included in cPanel & WHM version 56 as a first iteration. That means that we are not completely done with development for the feature. We will continue working on this for 58 to more round out our feature. I have included a list of things we are converting and things that we have not yet gotten to. Thanks eveyone for your support.

Data migrated

The Convert Addon Domain to Account feature allows users to migrate the following data:


  • DNS records
  • Document root
  • Email (Email accounts, Email autoresponders, Email user filters, Email forwarders, Domain forwarders, Mailing lists)
  • MySQL®DatabasesDatabase users
  • Redirects

Data not migrated

The Convert Addon Domain to Account feature does not allow users to migrate the following data:


  • EmailHorde/Roundcube dataWebmail
  • Installed applications
  • MultiPHP settings
  • SSL
  • Subaccounts (FTP accounts, Subdomains, Web DAV accounts)
  • Any additional data not listed above

This is available in cPanel & WHM version 56. Comments are now locked, but if you require any assistance you can open a ticket with our support team, email benny (benny@cpanel.net) or ask on twitter (@cpaneldev).

photo
1

The scope of this feature has been increased in cPanel & WHM version 58, which was just released to the CURRENT tier. You can read about the update in the release notes.

Replies have been locked on this page!