7. Using FTP clients
This guide explains how to connect to a WordPress site using an FTP client, and once connected, how to edit and transfer files.
This guide covers:
- FTP Basics
- FTP Clients
- Connecting via FTP
- Transferring files
- Creating local directories
Use the index on the left to quickly navigate to specific topics.
7.1 OverviewCopy chapter anchor to clipboard
File Transfer Protocol, FTP, is an easy method of moving files to and from a server and provides greater file management flexibility than the default WordPress uploader.
FTP transfers can be accomplished in three ways:
- FTP clients – Applications specifically designed to conduct file transfers.
- Command line FTP (Advanced) – Remotely connecting a computer to a server and issuing commands from the command line. Requires knowledge of the WordPress command line interface, wp-cli.
- Browser FTP – Connecting to a server and managing files over the internet. Speed, reliability and other limitations makes browser FTP the least efficient method.
This guide specifically covers using FTP clients, and does not explore command line FTP or browser FTP.
FTP, alone, is not a secure method of transferring data, so most hosts use a variety of encryption tools and security protocols to protect FTP transfers. All FTP activity for WPMU DEV hosted sites requires an SFTP or SSH user and all data passes through the Secure Shell (SSH).
Members with sites hosted elsewhere should inquire with their hosting providers regarding the type of FTP security they provide.
7.2 FTP ClientsCopy chapter anchor to clipboard
FTP clients are the most popular method of transferring WordPress files because they are not difficult to use, require no advanced technical knowledge and are not hindered by the limitations built-in to the WordPress uploader.
With an FTP client you can:
- Create, add and remove site files (plugins, themes, php, etc.) and directories without ever logging in to the site.
- Bypass WordPress limitations regarding upload size or type.
- More easily maintain local copies of site files or even entire sites
- Organize and schedule file transfers.
In addition to transferring files, FTP clients can also be used to create or edit files, although most do not have exceptional editors built-in. If you integrate a quality code editor with your FTP client, however, it becomes a useful tool for creating or modifying files and quickly making those changes live.
7.2.1 Choosing an FTP ClientLink to chapter 2
Any popular FTP client will provide all the file transfer functionality most users need. That said, there are a couple of factors to consider:
- Operating System – Some clients, like Filezilla, work with PC, Mac and Linux systems, while other clients only work with a single operating system. Be sure to choose an FTP client that works with your OS.
- Skill set – Some clients offer advanced features that most users do not require. Advanced users should compare clients to determine what advanced features they support.
- Cost – There are several very good free and open source FTP clients, and there are paid products offering additional security or administrative features. You can pay for an FTP client if you wish, but it is not necessary.
The following are links to some popular FTP clients:
7.2.2 FTP User InterfaceLink to chapter 2
Most FTP clients have similar interfaces, and it will be helpful if you understand their basic layout before you connect a site.
The panels, or panes, on the main transfer screen are discussed below.
- Quickconnect bar – The Quickconnect feature at the top of the screen allows users to connect to a site directly from the main screen by entering their FTP credentials into the fields provided.
- Message log – Also called the Connection Status panel, requests from the FTP client and the server’s responses will appear here. This dialogue can be useful when troubleshooting a failed connection.
- Local Site – The Local Site pane, on the left, shows copies of site files that are stored on your computer. Files stored here can be uploaded to a site by dragging the file and dropping it in the correct Remote Site folder.
- Remote Site – The Remote Site pane, on the right, shows files currently on your website. Site files can be downloaded to the Local Site by dragging the file and dropping it in the correct Local Site folder.
- Transfer queue – The transfer queue displays the file transfer process as it happens and the available tabs break down transfers into three groups, accessed by clicking the respective tabs:
- Queued files – Files that having been selected for transfer but which have not yet been moved.
- Failed transfer – Files that failed to transfer successfully.
- Successful tranfers – Files that were successfully transferred to or from the remote site. The Direction column indicates if the files were being moved to or from the Local Site.
FTP clients have many more features than those covered above. Users should explore their clients and consult the applications’ usage documentation to become truly proficient.
7.2.3 Transferring filesLink to chapter 2
To transfer a file to or from a server, simply double-click the file to be transferred. Alternatively, you can drag and drop a file from one pane, Remote Site or Local Site, to the other. The file being transferred is the Source file, and the location where it will be saved is the Target file.
Double-clicking a file in the Remote Site pane will initiate a transfer (download) from the server to the local computer, and double-clicking a file in the Local Site pane will initiate a transfer (upload) from the local computer to the server.
In both cases, a modal will appear that displays both the Source and the Target file paths. You can use this information to double-check that the right file is being moved to the right location.
Click OK when you’re ready to begin the transfer.
7.3 Creating FTP/SFTP UsersCopy chapter anchor to clipboard
FTP/SFTP users must be created on your host’s servers. If your site is not hosted by WPMU DEV, the first step is to locate and follow your hosting provider’s guidance on creating FTP/SFTP users.
WMPU DEV encourages the use of SFTP (Secure FTP) which enhances security by passing FTP transfers through the Secure Shell (SSH). All WPMU DEV hosted sites connect to FTP clients in this, more secure, way. If your site is hosted elsewhere, check with your host to determine if SFTP connections are supported. If not, you can still connect via conventional FTP and we’ll secure things on our end.
SFTP users for sites hosted by WPMU DEV are created in the SFTP/SSH tab of each site’s Hosting Dashboard or by following the guidance in our Creating SFTP/SSH Users guide.
7.4 Creating a new connectionCopy chapter anchor to clipboard
An FTP or SFTP username and password are required to create an FTP connection. If you haven’t created such a user, see the Creating FTP/SFTP Users section of this guide before proceeding.
Begin by collecting the following information about the user and the relevant website:
- Host – The name your hosting provider uses to identify your site, also called the host address or connection address. Usually resembles the site’s domain name and may even be identical, but not always. Be sure to confirm the site’s FTP hostname with your hosting provider.
- Username – The username associated with the current FTP/SFTP user
- Password – The password associated with the current FTP/SFTP user
- Port – Provided by the host. The FTP port is often displayed on a site’s dashboard in the same area as the FTP user information, but not always. Contact your host’s support team for assistance if you do not know your site’s FTP port.
With the above information at hand, open your FTP client. With Filezilla, as with most FTP clients, a “quick connection” method is available. Enter the FTP/SFTP user credentials listed above into the appropriate fields and click Quickconnect.
Once connected, the primary site folder will appear in the Remote Site panel on the right side of the screen. Opening the site folder will reveal the public_html folder, where most WordPress site files are located.
The next step will permanently save this connection to the client’s Site Manager, so connecting in the future only requires a few button clicks.
While connected, click the File button and then select Copy current connection to Site Manager.
This will open the Site Manager and automatically populate the site’s connection information to the appropriate fields. Enter a name for this connection in the blue highlighted field.
If you are creating a conventional FTP connection–not SFTP–verify that the Encryption field is set to Use explicit FTP over TLS if available. If it isn’t, click the dropdown menu and select that setting.
Click Ok to save the new connection to your FTP client. Connecting to this site in the future will only require opening the Site Manager, selecting the site and clicking Connect. You will not need to re-enter the connection information.
We strongly recommend creating a local site directory for all of your sites, because it simplifies file management and reduces the chances of misplaced files. The next section can guide you through quickly setting up a local directory.
7.5 Local DirectoriesCopy chapter anchor to clipboard
A local site directory is simply a folder on your computer that mirrors the file structure of a specific website. Properly configured, the local directory will open, automatically, whenever the FTP client connects to its parent site. The file structures of the two directories appear side-by-side on screen, making FTP file management significantly more efficient.
The benefits of local directories include:
- Efficiency – It’s far easier to move files from a local computer to a server and back again, and to do so with confidence, when the file structures in both places match.
- Synced browsing – With synced browsing, as you navigate through either directory, the opposite directory will automatically navigate in the same manner so the file or folder currently active in one pane is readily available in the other.
- Directory comparison – A feature that uses color coding to highlight differences between synced directories.
The image below shows how synced browsing works. The Local Site panel on the left displays a local directory called mysite.com that was created and synced with a website directory that appears in the Remote Site panel on the right.
The green highlighting in the Remote Site panel indicates files and folders that match in both directories.
The two files and one folder highlighted in yellow in the local directory are highlighted because they are not present on the remote site. You can also see this discrepancy indicated in the data highlighted in red which confirms that, indeed, the local site has two files and one directory that are not present in the Remote Site directory.
7.5.1 Create a local directoryLink to chapter 5
Navigate on your computer to wherever you want the local directory to exist, then right click, select New Folder and give the folder a name.
It is not necessary for this folder’s name to match the Remote Site name.
In the example below, the user created a folder called WordPress Sites and within it created a folder called mysite.com, which will become the default local directory for a specific site. Later, if the user wants to create more WordPress sites, new subfolders can be created and designated as the local directories for those sites.
Open the folder that will serve as the local directory. With that folder open, right click the address bar and click Copy address. This will copy the Local Site path, which needs to be pasted into the Site Manager.
Select the desired site from the list of saved connections and then click the Advanced tab. Configure the highlighted fields using the guidance below.
- Default local directory – Insert the path to the local directory created for this site.
- Default remote directory – This path seems to give some people trouble, but it is quite easy to locate.
- Connect to the site
- Copy the path exactly as it appears in the field next to the field label Remote Site:. For example, the path a user would copy from the site below is simply
- Paste the path into the Default remote directory field in the Site Manager.
- Use synchronized browsing – Enable this feature by checking the checkbox.
- Directory comparison – Enable this feature by checking the checkbox.
Click the Ok button to save the new configuration. Disconnect from the server and re-connect to see the new features in action.