If you are managing technical work of your website then a lot of time you heard this two terms “Upload file to the root directory of your website” or “Upload file to the public_html folder“, I’m right. Well, both these terms have the same meaning and referring to do the same thing.
Root directory means the folder which contains all the file of software (like a window, C-drive is the root drive of window) and
Public_html, if you working on a server (hosting) then root directory refers to a public_html folder (we can say, its a C-drive of the Cpanel, where all installed file of the WordPress is stored).
It does not matter which taxonomy “Upload file to the root directory of your website” or “Upload file to the public_html folder” you are using to upload a file. If you need to upload files to the Server, then you have to find the root directory first and that’s we are exactly going to do in this article.
The Primary purpose of this article is to explore the way to,
- How to find root directory of WordPress website
- How To upload the file to public_html folder
So, let’s us start.
How To Find Root Directory Of WordPress Website
The root directory is the folder that stores all the files for your website and that folder name is public_html on the server (Cpanel). By default, it’s your primary domain folder.
For example, If “exmaple.com” is your primary website name then your root directory is “public_html/”
But, when you add Addon domain to your Cpanel, it will create a new folder in your “public_html” folder.
For example, Suppose I add “example2.com” in my Cpanel then “public_html/exmaple2” Is my root folder for “exmple2.com” domain.
Note: The document root for a subdomain is a bit different. If your subdomain is “abc.example.com”, then the document root folder would be “public_html/abc”.
- Login your Cpanel and open your File_Manager.
Note: Hitechwork.com is my primary domain, so the root directory of hitechwork.com is “public_html” by default.
As I told you, all the new domain or subdomain, You will add in the Cpanel, it will be added, under the public_html folder.
- Have a look at below screenshot.
All the new domain is added in the public_html folder.
Note: You can also install WordPress into subdirectory WordPress during installation.
If you are not sure about the root directory of addon domain then you also can check it by;
- Login you Cpanel and click on Addon.
Note: Addon domain is an additional domain which you host on the same server.
- Here you can see you all addon domain and its root directory expected your Primary domain.
addon domain root directory you can also edit the path or redirect website A to website B if you want.
Quick table guide to understanding Document Root Structure
|Domain type||URL path||File Structure|
In this way, you can find root directory of WordPress website.
So, let move to our next step.
How To Upload File To The Root Directory Of website
There is a lot of methods to upload the file to the root directory, for example by using FTP account, From Cpanel, From inside the WordPress.
Below is some case when you need to upload the file to the root directory.
- When you have to Upload XML sitemap file to WordPress
- When you have to Upload robots.txt file to WordPress
- When you have to verify website with HTML file Upload method
- Or have to verify third-party service like zohomail, mailer lite, MailChimp etc.
To upload a file, click on File_Manager in the Cpanel and find the root directory where you want to upload the file.
Note: Here I’m going to upload the file to the root of my primary domain.
- Select the root directory and click on upload.
When you click on upload a new window will be open with upload option.
- Select the file that you want to upload and hit the submit button.
It’s done. you file is in the root folder.If you are using WordPress then you can use a plugin called File Manager. But sometimes this plugin does not work because your hosting not allowed to upload files due to security reason.
- Install and active File Manager Plugin on WordPress.
- Click on File Manager, Select the root directory and upload the file
If you don’t have an access to Cpanel and this method do not work then you can use FTP account method. To get the login detail of FTP account, contact your hosting provider.
So, in this way, you can upload the file to the root directory of WordPress website.
Remember to share this post with anyone who might benefit from this information, including your Facebook friends, Twitter followers and members of your Google+ group!
Also Support Us By Liking Our Facebook, Twitter, and Google+ Page.
If you have any suggestion or problem about “how to find root directory of WordPress website,” then please feel free to comment below.
Latest posts by Harvinder Singh Sharry (see all)
- How To Find Root Directory Of WordPress Website & Upload Files - January 2, 2018
- Removing URL From Google Console In Bulk By Using Chrome Extension - December 18, 2017
- What Is Robots Meta Tag? It’s Syntax And Different Values - November 18, 2017