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!

Change default public_html dir?

Discussion in 'Bind/DNS/Nameserver' started by Teodor Dumitrescu, Jan 13, 2016.

  1. Teodor Dumitrescu

    Teodor Dumitrescu Registered

    Joined:
    Jan 13, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    Reseller Owner
    Hello guys,

    I changed hosting contract to a higher level of services and gained access to cpanel and created a user in WHM portal.

    After that the default html folder is not /var/www anymore but /home/newuser/public_html.

    How can I change it back?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,880
    Likes Received:
    89
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello :),

    cPanel is creating default document root under the path as mentioned /home/USER/public_html/ and it is default. You need to upload your site content under pubic_html directory of your user.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    You can't change the document root for a cPanel account without root access. However, even if you could, you should use the "/home/$username/public_html" directory and modify any scripts with hard-coded paths away from the older directory structure.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Teodor Dumitrescu

    Teodor Dumitrescu Registered

    Joined:
    Jan 13, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    Reseller Owner
    Is it possible using a SSH conection or terminal to configure it the way it was? The application I have on the website somehow relates to that folder /var/www.
     
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    You will need to update the configuration file for the script with the correct document root. You may want to consult with the developer of the script to determine what in particular you must change.

    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