Primary domain change - error "(XID f4wjpq) The domain ... already exists in the userdata.
Hi All,
I have domains a number of domains (say domain1.com, domain2.com and domain.3 com) with one domain primary.
I need to change the primary domain to another one and when I try to do that I get an error message.
" (XID f4wjpq) The domain "..." already exists in the userdata. at /usr/local/cpanel/Whostmgr/Accounts/Modify.pm line 945. "
Please advise how to resolve it.
-
Hey there! The easiest thing to do would be to search through the files in /var/cpanel/userdata to see if there is already an entry for the domain name you are trying to change to. That would show you what account the domain exists under so you can get that removed. 0 -
Hi cPRex, Thanks for your reply. I went to /var/cpanel/userdata and can see the domain I want to make a primary domain. However I inside /var/cpanel/userdata/username I can only see 2 domains out of 6 listed in cpanel management webpage. What I basically need is making site.com as a primary domain instead of site3.com without removing and domain. If I try to do that from WHM Home / Accounts Functions / Modify an Account I'm getting " (XID f4wjpq) The domain "..." already exists in the userdata. at /usr/local/cpanel/Whostmgr/Accounts/Modify.pm line 945. " 0 -
Thanks for those details - there isn't a great way to do that without removing the domain first, as it already has an entry on the server. It might be best to rename these to fictitious domains and then change them back to what you'd ultimately like them to be. 0 -
OK so this is what I have now: I can't modify\change primary domain. At the same time I can't delete the primary domain (as I understand this is by cPanel design). If I rename the primary domain in /var/cpanel/userdata would that potentially break anything? 0 -
Yes, that would likely break many things as there are many other references to the primary domain on the server. Could you submit a ticket to our team so we can check that out directly on the system? 0 -
Hello, Having same problem, Can't believe we can't change primary domain if it already exists in users account... anyway around it? 0 -
@bananacy - there isn't a way around that - if the domain exists, it can't be created again. It would need to be removed from the system completely before you try and add that to a different area. 0 -
Just to leave here how I solved this issue: 1) nano /etc/userdatadomains Remove the domain from this file 2) cd /var/cpanel/databases Remove all json files from that domain, including the grant_*** files 3) rm -r /var/cpanel/userdata/domain.tld remove the domain dir (replace domain.tld with your own) Then I restore the account from the backup using WHM -> Home / Transfers / Transfer or Restore a cPanel Account Kudos to this script: 0
Please sign in to leave a comment.
Comments
8 comments