Primary domain change - error "(XID f4wjpq) The domain “...” already exists in the userdata.

glmanager

Member
Jun 14, 2022
12
0
1
Chatswood
cPanel Access Level
Reseller Owner
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.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,053
1,748
363
cPanel Access Level
Root Administrator
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.
 

glmanager

Member
Jun 14, 2022
12
0
1
Chatswood
cPanel Access Level
Reseller Owner
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. "
 

Attachments

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,053
1,748
363
cPanel Access Level
Root Administrator
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.
 

glmanager

Member
Jun 14, 2022
12
0
1
Chatswood
cPanel Access Level
Reseller Owner
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?