Whether you're manually installing a CMS like WordPress or you just need to edit a file, you might find that the easiest way to get access to your site is via FTP (File Transfer Protocol). Basically FTP allows you to access the files on your server in much the same way as you would access the files on your computer, organised into folders and sub folders. You can then upload new files to a certain folder, or download files onto your computer, or even edit the contents of a file while keeping it live on the server.
STOP! Please note that changes made to live files will happen immediately on your website. If you're not sure what you're doing, it's best to download a copy of the file first and edit it on your computer until you're happy with the result. You should always make a backup copy of any files you are about to edit online, just in case.
Find your FTP information
To log onto an FTP server, you need a username and password. With my host, Hostgator, the FTP information for my primary domain is the same as the login information for my cPanel. In theory, your host should send you FTP details in a welcome email, if not you may be able to find the information from a knowledge base article or their support staff.
- FTP Host/Address: (your IP address or domain name)
- FTP User: (cPanel/FTP user name)
- FTP Password: (cPanel/FTP password)
- Port: (your host may have a default port listed, if not you can leave this blank in your FTP client)
- Path/directory: (leaving this blank will log you into the top folder of your domain)
Free FTP Tools
Once you have your FTP information, you'll need some way to connect. A popular free tool to use is FileZilla FTP Client, this allows you to upload and download files, change file permissions, and restructure files and folders. Enter your FTP information at File > Site Manager and click connect.
You can also edit files in your usual text editor (Notepad or whichever you use) by using FileZilla to navigate to the file in question, right-clicking it and choosing View/Edit. The file will be downloaded and saved locally before being opened in your chosen editor, once you save the file FileZilla will ask you whether you wish to reupload it and whether you'd like to delete the local copy.
If you're looking for a text editor with FTP built in one completely free option I can recommend, after using it for 3 years, is PSPad. Using a proper editor makes it easier to edit code, since everything will be color coded making it easier to understand. See the difference between viewing this code in notepad and in PSPad.
You can enter your FTP information in the FTP tab in the left column of PSPad, navigate to the file in question, open and edit it right there on the server.
Uploading files via FTP
Using FileZilla (most clients will work in a similar way, but FileZilla is the most common) there are two ways to upload files and folders. Whichever method is used, step 1 is to connect to your server and navigate to where you want the files to go. You can create new folders to organize your files, if needed, by right-clicking in the file browser screen on the right and choosing "create directory".
The basic idea is that you place any folders that need to be uploaded into this right-hand screen. You can do this either by navigating to the source folder in the left-hand screen and dragging across the relevant files, or right-clicking them and choosing upload. You can also navigate to your source files outside of FileZilla, say using regular Windows Explorer, and then drag files straight from Windows into the right-hand FileZilla screen.
Downloading files via FTP
Once you've mastered uploading, downloading is easy. Again you can navigate to wherever you'd like to save the files in the left-hand FileZilla screen, then simply drag them across from the right, basically the opposite way to how you'd upload a file.
You can also right-click files in the right-hand screen and choose download.
Editing files via FTP
As mentioned above, there are two main ways to do this; using a client like FileZilla to download and open a file, or using an editor with built-in FTP functionality.
It's recommended that you use the first method, since any changes made will not go live on the site until you reupload the file so problems can be fixed first. However if you're making a tiny change and you're 100% confident that nothing will explode, I prefer using the second method since it's slightly quicker and more convenient.
Try both methods, and see which works best for you.