Dave Navarro, Jr.

Father, Web Developer, Journalist, Film Maker, Creative Soul

cPanel: Moving your root domain into the PUBLIC_HTML folder

Dave Navarro, Jr.   November 30, 2017

In cPanel, by default, the root domain of your account is the “/home/$account/public_html” folder.  Addon domains and subdomains are placed into subfolders within that folder.

My preference is to place the root domain in a subfolder as well.  But there is no simple way to do that in cPanel or WHM.  But it can be done.

Using SSH, log in to your cPanel account.  Then go to the /var/cpanel/userdata/$account folder.  So if your account name is “bill” then you could “cd /var/cpanel/userdata/bill”.

Edit the root domain files, so if  you domain is “bill.com” then you would edit the “bill.com” file and the “bill.com_SSL” file.  Change the “DocumentRoot” value to where you want the domain files to live on your server, ie:  “/home/bill/public_html/bill.com”  (make sure the folder exists).

When you are done editing both files, run “/scripts/rebuildhttpdconf” and restart Apache.

Filed Under: Web Server

Where to Find Me on the Web

Facebook
Flickr
GitHub
Topeka WordPress Meetup
Twitter
YouTube
Vimeo
WordPress

Adobe Stock
Pond5
Shutterstock

Blog Categories

  • Code
  • Coding
  • GridPane
  • Plugins
  • Review
  • Themes
  • Web Server
  • WordCamp
  • WordPress

My Favorite WordPress Developer Products

Advanced Custom Fields
Code Snippets
Custom Content Shortcode
Custom Post Types UI
DesktopServer
Genesis Theme Framework
GridPane Cloud Server Management
Instant IDE
Meta Box
Post Meta Inspector

Copyright © 2023 · Dynamik-Gen on Genesis Framework · WordPress · Log in

Running Dynamik Website Builder child theme on the Genesis platform.
Copyright © 2019 Dave Navarro, Jr.