• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Why is there no public_html anymore?

banknote

New Pleskian
Why is there no public_html and public_ftp anymore under File Manager and FTP for the new domain that I created at Plesk?

All my other domains have public_html and public_ftp folders under File Manager and FTP software, but not the last domain that I created. Why?

At the bottom of each domain page it says:

Website at public_html IP address XX.XX.XXX.XX System user username

But for the last domain I created it says:

Website at domain.com IP address XX.XX.XXX.XX System user username

As you can see the difference is that instead of PUBLIC_HTML not it has the DOMAIN name in there and no public_ftp folder. Why?
 
The public_html and public_ftp directories never have been part of the default Plesk configuration. If these directories show up in your domains they are either migrated from cPanel (which does use those directories by default) or you have created a custom configuration for your server. The default document root for domains in Plesk in httpdocs.
 
Kaspar. Neither "httpdocs" shows up under my domain and many other "items" folder such as "www" , "cache", "bin", "php", "ssl" etc. do not show up either. Please take a look at the screenshot I maded for comparison between two different domains on my account at Plesk:
 

Attachments

  • plesk_1.jpg
    plesk_1.jpg
    172 KB · Views: 13
[...] many other "items" folder such as "www" , "cache", "bin", "php", "ssl" etc. do not show up either.
What do you need those directories for? With the exception of bin and etc, those aren't default Plesk directories either. So those aren't created by default when adding an new domain in Plesk.

Not sure why there isn't a httpdocs directory on your domain on left in your image. But it seems there is an directory named after your domain that functions as the document root.
 
I didn't know all those things. httpdocs folder is usually empty. What does it stand for and is used for or by?
 
Each domain has a directory that's referred to as the 'document root'. This is the directory on a web server where all the files for a website are stored that are publicly accessible. The 'document root' directory can be named differently depending on what server software (control panel for example) is used. For Plesk the default 'document root' is named httpdocs, for cPanel it's usually named public_html. Sometimes it's just called www. But it could also be named something completely different. It would convenient if was always named the same, but that's unfortunately not the case (as you've noticed). As far as functionally is concerned it doesn't really matter what the 'document root' directory is called.

For you (based on the screenshot you posted) it seems that for one domain the document root is named public_html and for the other domain it's a directory named after the domain name. As long as your websites work (i.e are accessible) then it's fine.

As for for the other directories ("cache", "bin", "php", "ssl", etc) those are created and used by the webserver to store data for specific tasks or functions. For example the "logs" directory is used to store domain (access and error) logs. The "error_docs" is used by Plesk to store the default error pages for a domain. The webserver (usally) creates those directory automatically when needed to store data/files. No need to worry if a couple of directories are present on one domain but not on another domain. The webserver will created additional directories when needed.
 
Last edited:
That's great, thank you. Would you be able to please advise me on how to replace multiple (hundreds or even thousands) of www with a subdomain. handle after moving all the HTML pages from the website's root to a subdomain (as in subdomain.domain.com)? Is there an easy and quick way to do it? My host's (LiquidWeb) support did that for me recently such as a couple years ago, but they seem to not know how to do that anymore.

Change URLs for all pages located under a certain subdomain from: https://www.domain.com/anyfilename.htm
Change to: https://subdomain.domain.com/anyfilename.htm

Thus only a bulk replace www with a specific word in the subdomain name for thousands of pages all at once.

That would be great if you know the answer on how to do it or at least can point me in the right direction.
 
I hope that Plesk has this functionality. Let me explain the best I can:

1. I want to move many HTML pages from website root to a subdomain. The reason is SEO (long story).
2. I will move the HTML pages myself via FTP from the website root to a subdomain.domain.com
3. Yet the hundreds of thousands of links embedded into each of the HTML pages will have to be manually changed replacing www in the URLs to "subdomain name" so that all the pages can have functional link backs to each other and work as a website.

Change the URLs from: https://www.domain.com/anyfilename.htm
Change the URLS to: https://subdomain.domain.com/anyfilename.htm

Only replace www with subdomain, for example in real life (still an example):

Change the URLs from: https://www.culturegallery.com/pageaboutwriters1.htm
Change the URLS to: https://gallery.culture.com/pageaboutwriters2.htm

Thus replacing www with gallery in thousands of pages all at once. The pages that are (would be) located at the https://gallery.culture.com/

That's a job for several years for me, which I can't do.

This is why I am looking for help how can this be done all at once, with some kind of code or software. It was done before, but I did not collect the instructions on how they did it for me.
 
Base on your screenshots, the one on the right was migrated from cpanel, thus why it has the public_html (plesk, does not use public_html, only if you've migrated from cpanel would it showed up).

As for subdomains, by default, the subdomains will be configured to use your /homeDir/sub.domain.tld

You can, however, change it by going to Hosting & DNS > Hosting and changing the document root to whatever the new path is.

Now, in your HTL pages, if your HTML code is hardcoded to use www.domain.com/whatever, then you will need to go in and edit your HTML to replace the www.domain.com/whatever to be sub.domain.com/whatever. There is no way around that. You might be able to create a script that will go into your HTML files, find everything with www. in it and replace it with sub. but sometimes script can do things you don't expect it to do.
 
Back
Top