As a wordpress beginner, you might encounter this problem where you will be asked to upload a file to your website root directory. In this post, I will outline the following:
- Definition Of Root Directory
- How to add files to your root directory
DEFINITION OF ROOT DIRECTORY
A root directory is the folder named public_html i your cpanel where your platform[Wordpress/Joomla/Drupal e.t.c] installations are saved.For example, if you purchase a new domain name and buy a hosting plan from a domain registrar and you choose to install wordpress, your website files will be saved in the public_html file also called the root directory.
HOW TO ACCESS YOUR ROOT DIRECTORYThere are two ways in which you can access and upload files in your root directory and we will show you hot to go about that for the both of them.
- Via Cpanel
- Via Plugin
- Via FTP
In order to achieve this, you will need the WP File manager plugin which can be downloaded here.
Once you have installed it, activate it and once it has been activated, it will appear by the left hand side of your wordpress dashboard
Click on the the plugin and a list of sub menus will appear, select WP File Manager.
Click on public_html
Click on the first icon that is active from the left hand side and a pop-up box will appear asking you to drag and drop the file or select files.
To access your root directory, take the following steps:
Login to your cpanel by typing your website address/cpanel example journalcps.com/cpanel
Input your username and password. If you do not know where to get your username and password, check the mail that your hosting provider sent to you when you purchased a hosting plan.
Click on File Manager
Find the file named public_html by the left hand side of your screen and click on it
At the top of the screen, click on upload
You can drag and drop or click on select files in order to add the files which you wish to upload.
UPLOADING VIA FTP
In order to accomplish this you have to use and FTP and I will recommend FileZilla. An FTP is a software that allows you to access your server via the app and you can add or delete documents with the software.
Launch the FileZilla app
At the top of the screen, you will see four fields and all the information for these fields will be gotten in the mail sent to you by your hosting provider once you purchase a hosting plan.
Host: Use sftp://Yourcpanelurl for example if the your cpanel url is hik.com/cpanel, I will input sftp://hik.com/cpanel.
Username: Type in your cpanel username.
Password: Type in your cpanel password
Port:In the email your hosting provider sent to you when you purchased a hosting plan, you will see SFTP port, use the number. it is something like this 21098.
Once you are done, click on Quick connect and you will see your website files by the right hand side and your computer files by the left hand side.
Now on the left hand side, click on the file directly under home
Once you have done that, scroll down and you will see the public_html folder. click on it and drag and drop a file you wish to add from the left side to the root directory.
Please if you encountered any problem while following any of the steps above, comment below and we will reach you also share and subscribe to our mailing list.