WordPress files and folders are the heart and soul of WordPress. Here you’ll find everything from the core code of WordPress to plugin and theme files, media, and everything in between. While you might need to access these files on a daily basis, knowing how to access and navigate the file hierarchy can come in handy when troubleshooting or carrying out WordPress security and hardening procedures.
There are several ways through which we can access WordPress files. The most common, however, is FTP, or rather one of its more secure siblings – FTPS or SFTP.
What is FTP?
FTP is a protocol for transferring files over a network. It was first introduced in April 1971, making it over 50 years old. While 50 years is a timespan that in IT borders infinity, FTP has not only withstood the test of time but continues to be one of the most used ways to transfer WordPress files.
How FTP works
FTP is used to transfer files between two hosts – the local host and the remote host. The local host is referred to as the client, while the remote host is the server. An FTP connection is established through an IP or DNS name and a username and password. It’s worth noting that there are some exceptions to this rule, which we will discuss shortly.
Am FTP connection consists of two channels. The first channel is called the command channel and is used to send and receive commands, while the second channel is called the data channel and is used for data transmission. As an FTP user uploading files, you will not see these two separate channels and, as such, do not have to worry about it. Nevertheless, it is interesting to know.
FTP vs SFTP
FTP is great, but it lacks security. As we said earlier, you do need a username and password to connect to FTP; however, the credentials and the data transfers are sent in clear text with no encryption at all. As mentioned earlier, some FTP connections do not even require a username and password to connect to. These are known as anonymous FTP.
FTP’s security woes are addressed through SFTP, which uses SSH, and FTPS, which uses SSL/TLS encryption. Out of all 3, SFTP is the most secure and commonly used.
How to setup FTP
If your website is hosted with a WordPress web hosting provider, you’re more than likely to have access to FTP. Most service providers use SFTP, although in some cases, you’ll also find hosting providers that offer FTPS. Whichever version of FTP your service provider uses, the process to connect and transfer files will be largely the same. It is highly unlikely that your hosting provider will use FTP or anonymous FTP.
To get started with FTP, you will first need to find your login details. These should include the IP or URI, username, and password.
Next, you will need to install an FTP client, which will allow you to connect to the FTP server and browse its folders. FileZilla is perhaps one of the most commonly used FTP clients out there and is pretty easy and straightforward to use. You will need to make sure you install the client version, since they also offer an FTP server version. Both are free and are available for systems running Windows, Mac OS X, and Linux.
If you’re hosting WordPress on your own servers, you will first need to install the FTP server. The process for this will vary according to the server’s Operating System and, if you’re running Linux, the distribution that you’re running.
How to navigate WordPress directory using FTP
Once the FTP client is installed, you will need to configure your login details and connect. Common login issues include using the wrong port and typos, so do be wary of that. Once you log in, you will see two directories – one is the FTP server and the other is your computer.
This makes it easy to locate and transfer files between the two machines. Either way, you’ll be able to find WordPress PHP files, security files such as .htaccess, and everything in between within the web directory on your server, which by default is the one on the right.
Pros and cons of FTP
While FTP is an aging technology, it is still by far one of the most widely used methods to access WordPress files. Even so, as FTP has withstood the test of time, one of the things that it has going for it is that it simply works. SFTP and FTPS address the security concerns of FTP, but even so, its age is starting to show and FTP clients do not have the fancy and easy-to-use interfaces that are prevalent in more modern technologies.
Other methods to consider when accessing the WordPress files
FTP is great, but there are other options available for connecting to a WordPress site. Which one you use will ultimately depend on your setup and what is available to you. Some of the available options are also more friendly towards users who are beginners, making them more accessible.
Tip: If you do not feel confident connecting to your live website’s FTP, you might want to try connecting to a test environment first. Many hosting providers include such test environments with hosting plans. Alternatively, you can set up your own virtual WordPress environment and use that instead. It might not be a super easy task to set up your own virtual environment from scratch, but the lessons you’ll learn along the way will be invaluable.
You can access WordPress files locally by navigating to the web server’s directory if you’re physically at the machine. The exact location will differ depending on the Operating System and web server being used but can typically be accessed through the file explorer that comes with the operating system.
SSH is an acronym that stands for Secure Shell. While SSH has a few different implementations, we are interested in the remote command line. This allows us to access a WordPress server through an SSH client such as PuTTY. Windows also has a built-in SSH client; however, this is an optional feature that you must install separately.
If your WordPress server has CPanel installed, you can access your WordPress files through the File Manager. Here you create, copy, and move files and folders and update permissions, among other actions.
You can also use a WordPress plugin to access your WordPress files, with quite a few different ones available. Features tend to vary from one plugin to another and can include viewing and editing files and directories among other features.
To FTP or not to FTP?
Which method you use to access WordPress files will largely depend on what is available to you at any given time. FTP is quite widespread, with FTP smartphone apps making it possible to access WordPress files right from your phone. Of course, an FTP server needs to be configured on the machine that hosts WordPress; otherwise, you will not be able to connect.
Luckily, a few other solutions are available that can help you make sure you can access your WordPress files from virtually anywhere, regardless of your setup.