Wordpress install in addon domain directory issue

marcuszan

Well-Known Member
Apr 19, 2018
64
5
8
Netherlands
cPanel Access Level
Root Administrator
Hi,

I am new here, did a short introduction but this is my first real post.
I am struggling with a clean setup regarding primary domain folder being in /public_html
and the addon domain being placed in this folder as addondomain.com
I read a lot about this and people suggested a fix like this:
======
vim /var/cpanel/userdata/USERNAME/DOMAINNAME.COM

Change USERNAME with your cPanel account name.
Change DOMAINNAME.COM with your Primary domain name.
Step 2 – Update Documentoot

After editing file, search for text documentroot and change path as per your requirements.

documentroot: /home/USERNAME/public_html/PRIMAIRYDOMAIN.COM

Step 3 – Rebuild and Restart Apache

After making changed, we need to rebuild Apache configuration file and restart Apache server. Use following command to do it.

/scripts/rebuildhttpdconf
service httpd restart
=========

This works as it places the primairy domain nice next to the addon domains so they are on the same directory level, however, when I use the cpanel wordpress installer plugin for the primary domain, it still installs wordpress in /public_html and not in public_html/primairydomain.com

Is there any fix for this ?

thanks in advance,
Marco
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hello,

You are correct, I just tested this and the cPanel>>Site Software>> WordPress installer will not recognize custom documentroots for the primary domain. I've opened an internal case CPANEL-19918 for our development to look into. I do want to point out that this is a customization and unfortunately we can't always guarantee that customizations will work as intended. The case if actioned will be updated in our when available. You can check them here: Change Logs - Change Logs - cPanel Documentation
 

marcuszan

Well-Known Member
Apr 19, 2018
64
5
8
Netherlands
cPanel Access Level
Root Administrator
Thanks for the quick reply.
I am leaning towards creating seperate accounts for each domain in WHM right now to keep it more clean and simple, instead of using the addon domain feature
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hello,


That's possible as well, though the issue with the document roots does not affect addon domains, it's the primary domain that experiences the issue. If you want to create separate accounts to place them all in public_html you wouldn't experience any issues.


Thank you,