For this Ask a SuperGeek, I’m tackling a question that comes up pretty frequently when I’m working with clients who aren’t familiar with internet jargon. That is, most of my clients. Because who would be familiar with internet jargon if you didn’t have to be??
Anyway, that question is: What is FTP?
In most cases, when you sign up for web hosting (such as the excellent SiteGround), you will get an email welcoming you to their service that will include some information to access your hosting account via FTP.
But the majority of website owners probably skip over that part, because when you have a WordPress website, you don’t really have to think about FTP. Most web hosting services offer automatic installation of WordPress, and everything else is usually done through the admin interface. So knowledge of FTP is generally only required when there’s something wrong with your website, which of course, we hope there won’t be! But there are other reason you might want or need to access the files of your website via FTP.
But let’s go back to the beginning. What is FTP?
FTP is an acronym for File Transfer Protocol. So basically, it’s a method to transfer files to and from your website.
WordPress websites are made up of two types of components: a database, and files.
Most of the content you create via the WordPress admin is stored in the database: pages, posts, categories, tags, comments, options and settings, etc. But there are also files that make up things like the WordPress core, your theme, plugins, and images. So you can broadly think of the database as the home for dynamic content on your website, and the files as the home for the style and functionality of your website.
FTP allows you to access these files. So if, for instance, you need to troubleshoot a plugin that has broken your website, or you were messing with the functions.php file to implement some cool new hack you found online (no, it hasn’t only happened to you!), you will probably want to use FTP.
Generally, to use FTP you will need an FTP client, which is an application installed on your computer that will show the files of your website much like the Finder (on Mac) or Windows Explorer (on Windows).
(You can also get to the files of your website through the “File Manager” section of your cPanel, but it’s generally slower and more complicated to do it that way.)
Once you download and install the FTP client, you will be able to log in to your FTP account using the details your friendly web host sent you in that “welcome” email I described earlier. You did keep it, didn’t you? Good!
Once you are successfully logged in, you should see a listing of all the files and folders that make up your WordPress website. You won’t see the database, because that lives in a different place.
Some tasks you might want to use the FTP client for:
- Troubleshooting plugins: Open source software is a beautiful thing. And the fact that there are so many WordPress plugins you can utilise to help you do just about everything on your website is not a privilege I take lightly. But one downside is that it’s impossible to guarantee complete compatibility with every new WordPress core or plugin update that happens. This means that sometimes, a plugin update or conflict may cause your site to break. And when that happens, it may break as subtly as a tiny piece of code being visible on the front-end of your website, or it may be as horrific as your entire site being replaced by a “white screen of death.” Either way, the steps in this article will have you covered so you can troubleshoot and fix those pesky plugin problems.
- Troubleshooting themes: Theme issues don’t tend to crop up as often as plugin issues, but they can happen. If you have updated a theme and something has broken on your website, you may need to get in via FTP to fix things, or at the worst to roll back to the previous version of the theme.
- Fixing code errors: It’s totally understandable that you might get so into customising your WordPress website, that you enthusiastically enter the Appearance>Editor page of your WordPress admin, and paste a bit of PHP code into your functions.php file that you found in an online tutorial. But if you mess up that PHP file in the WordPress admin, chances are that your website code is going to totally freak out, and break your website. Don’t be too hard on yourself – everyone has to learn somehow! And if you’re confident enough to try stuff like that out, I kind of want to meet you. I think you’re probably awesome. It’s all cool though, because by this point you know how to log in via FTP, right? So you can just fire up that FTP client and fix that sucker right up. Perfect!
- Optimising images: It may be an off-label use of FTP, but I have found it to be really useful to batch-optimise images. Often, my well-meaning clients will upload images via the WordPress media browser that are way too big. On the internet, it’s important to maintain the smallest file sizes possible, without sacrificing too much quality, in order to optimise the loading time of your website. Not all clients realise this, and not everyone knows how to optimise their images before uploading them. So it has sometimes come down to me to streamline these images, and because the FTP client presents them in a file structure, it makes it easy to batch process them and re-upload, maintaining the same file name to avoid broken links.
I hope this has been a useful overview of what FTP is, and what kinds of things you might do with it.
Do you want to learn more interesting tidbits about maintaining your WordPress website? Then I have the course just for you: How to Customise and Maintain Your WordPress Website. Check it out!