SOLVED Expert help please: Create Director for Rood Website

Operating System & Version
Sorry, can't work this out!
cPanel & WHM Version
94.0.19

MBX

Registered
Feb 26, 2022
4
0
1
London
cPanel Access Level
Website Owner
Hello

Can I please have some help as follows, I'm a cPanel novice but can work my way around.

My cPanel root folder on my host contains my main website files and folders along also with the folders for various subdomains. (There are no add on domains)

I want organise the file structure from, to:

From:

//root
- main website individual files
- main website folders
- sub-domain folder 1 with all contents
- sub-domain folder 2 with all contents etc

To:

//root
- main website folder - files and folders (so with all contents for main website)
- sub-domain folder 1
- sub-domain folder 2 etc

In other words, my main website is treated like a subdomain folder, in that it doesn't have anything else in it other that it's own files and folders

The objective is to make FTP access much easier and cleaner

I think the way to do this is using the create/modify domain facility, but I wouldn't attempt this without help.

I hope this makes sense.

Many thanks in advance

K
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,235
2,423
363
cPanel Access Level
Root Administrator
Hey there! I think what you'd want to do is the change the document root for the main domain. That way you wou ld have the main domain here:

/home/username/public_html/main_domain

and the subdomain here:

/home/username/public_html/sub_domain

If that's what you're looking to do, the following article will help with that:

 

MBX

Registered
Feb 26, 2022
4
0
1
London
cPanel Access Level
Website Owner
Hello:

Firstly, my apologies, the title should read: Expert help please: Create Directory for Root Website :)

And thanks for this.

I'm a user of cPanel through my paid ISP, a very well know one - I may not be allowed mention it here, unsure, so not a licensee of cPanel.

So the options available to me are only:

cPanel / subdomain / then:

- I have moved one subdomain into a new folder (creating and using file manager) and will move the rest in there too, as the main domain allows me no options, as attached.

This was the only workaround I could manage.

What I'm looking for is to create a new folder for the main domain - say called "prod" and to put all the domain code there so main domain redirects/uses this foldwe - as per image 2

Untitled.png



Advice appreciated.

Thank you.

K
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,235
2,423
363
cPanel Access Level
Root Administrator
Thanks for that information. If you only have cPanel access you wouldn't be able to perform the document root customization as I mentioned. You'll be limited by what the host is willing to do, so you'd have to reach out to them to see if they are willing to make that change for you. If not, you'll need to stick with a more standard directory structure.