Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Wordpress install in addon domain directory issue

Discussion in 'General Discussion' started by marcuszan, Apr 19, 2018.

  1. marcuszan

    marcuszan Member

    Joined:
    Apr 19, 2018
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
  2. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,721
    Likes Received:
    186
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. marcuszan

    marcuszan Member

    Joined:
    Apr 19, 2018
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
  4. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,721
    Likes Received:
    186
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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,
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice