The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

move main domain into separate folder

Discussion in 'General Discussion' started by 101wc, Sep 14, 2013.

  1. 101wc

    101wc Registered

    Joined:
    Sep 14, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi,

    When I create a new account in WHM no subfolder for domain.com is created. This makes quite a mess when you add numerous addon domains, especially when you use something like WordPress on the main account domain, as it's full with WordPress folders AND addon domain folders, eg:

    [domain2]
    [domain3]
    [domain4]
    [domain5]
    [domain6]
    [wp-content]
    [wp-admin]
    [wp-include]
    .htaccess
    error_log
    index.php
    license.txt
    readme.html
    sitemap.xml
    sitemap.xml.gz
    softver.txt
    wp-activate.php
    wp-blog-header.php
    wp-comments-post.php
    wp-config.php
    wp-cron.php
    wp-links-opml.php
    etc.

    How can I manage it so every domain, including the main domain has it's subfolder, so like

    [domain1]
    [domain2]
    [domain3]
    [domain4]
    [domain5]
    [domain6]

    Your help is *very* appreciated, as I'm new to cPanel and WHM, tia!
     
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    If you have root access you can change the root folder of the primary domain in:
    /var/cpanel/userdata/$username/$domain.com
    and then run this to rebuild the Apache configuration:
    /scripts/rebuildhttpdconf
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page