Upload Website through FTP with FileZilla
In this article we'll show you how you can upload your site from your local computer to a web server and make the site available to Internet visitors from around the world.
We will also show you some notable FileZilla options so you can make the most of this excellent program.
Choose FTP User Account
We assume that you already have your own domain and it is properly configured to work from a certain hosting folder.
We also assume that you have created an FTP user with access to the same folder.
But you can also use the CPanel user credentials (username and password) to access the home folder through FTP.
So let's clarify the differences between these two FTP users:
- CPanel user has access to the home folder of your hosting and through FileZilla interface you can navigate between all hosting folders.
- The manually created FTP user have access only to the site folder and its subfolders, it does not have access to folders of the same or higher level.
- If you change CPanel password you must update also the FTP site manager with the new password otherwise FileZilla will stop working with the CPanel user account.
This is a sample folder for our website:
In FileZilla Site Manager you can see the two accounts we talked about above:
The CPanel user has access to the entire hosting and we navigate by clicking on directories and returning by double-clicking the top-up folder:
Click on a directory to enter inside of it:
Double click on top-up folder to return:
Following the above explanations, let's navigate to the website's folder.
In this particular case the path to the website folder is:
(yours will surely differ).
Now let's open a new tab in FileZilla, in the Site Manager we select example user and then click Connect button.
FileZilla opens only the site folder because example user has restricted access only to this folder:
Upload the website from the local computer
We are ready to upload the files and folders on the server.
Select all content in the local site folder, right-click on the selection and choose Upload from the menu.
The site is already on the hosting server:
Let's load our subdomain in a browser to check if the site is working correctly:
Your site is now available for the global Internet audience.
Save and refresh before uploading
I want to share with you a particular situation when working with FTP, in which, if you are not careful, you could lose a significant amount of time.
You are editing a file on the local computer, you have your FTP properly connected to the correct hosting directory, you upload the file and yet the changes are not visible.
You check the code in the editor - no mistakes, upload again and again - nothing. Why?
Two possible reasons:
- Make sure you have saved the file in the local editor.
- Before upload right-click in the FileZilla local section and select Refresh from the menu in order to upload the edited new version of the file instead of the same cached copy of the old version.
FTP rewriting options
When you decide to upload a new copy of an existing file, FileZilla will ask you what action to perform:
The most logical solution is to mark the Overwrite if source newer option and mark the Always use this action option.
With these options FileZilla gives you the advantage if your site consists of hundreds of files and you have made changes to only several of them to select the entire site, to click upload, and thanks to the above listed options, only the modified files will be uploaded.
Thus way, you will not upload a file into wrong directory nor will you forget to upload an already modified file.
Directory and File Permissions
A vital element of the hosting security are the permissions of the directories and files which we can manage through the FTP program and now you will see how.
In the right pane of FileZilla, right-click on any directory and select File permissions from the menu:
Right click on the index.html file and select File permissions again:
You see that the permissions of the files are different from those of the directories.
The website security is a large theme and it gets out of the reach of this article.
But if you need to set up different permissions of a directory or file now you know where and how to do it properly.