How to Upload Files to WordPress via FTP?
Updated 5 days ago
In this article, we’ll explain step by step how to upload files in bulk to your WordPress site.
It’s true that WordPress has a file upload method through its "Media" section, or by inserting images directly from a post or page. However, this process is slow and tends to have the occasional error. Besides, it isn’t the best option for uploading files "in bulk" (bulk), or, put more simply, "in large quantities".
Why is it better to upload via FTP instead of using the standard Media Library?
Uploading files in bulk via FTP makes two things easier: uploading large numbers of files and uploading large files.
You only need to consider that uploads through the WordPress Media Library have always been limited to a maximum file size. The maximum upload size is not set by WordPress, but by the PHP configuration and your hosting provider; you can check it on the media upload screen, where the allowed limit is displayed. Many older installations also do not accept files larger than two megabytes.
If you need to upload a hundred or more files, or very large files, the recommended method is to do so through FTP.
An FTP client: Filezilla
FTP is a file transfer method, which allows you to access your server’s hard drive, where your site’s files are stored.
In case you’re interested, the acronym FTP comes from File Transfer Protocol, meaning file transfer protocol. You need two things to take advantage of this protocol: first, a "client," which is another way of saying "software that connects to the server" (we recommend the free Filezilla), and second, your access credentials (that is, your username and password; if you don’t have or remember them, send us a ticket).
Configuring your site in Filezilla
The following screenshot shows the software, or client, used to connect to your server (for this guide, we use Filezilla, but you can of course use any program you like). The first thing to do is click the first toolbar button, as shown in the image.
A new site configuration window will open. In the fields highlighted in the screenshot below, you’ll need to enter the following information: the server (e.g., ftp.yourSite.com) and your access credentials, meaning your username and password.
Once inside the site, you can browse the remote folders as if they were on your PC. In WordPress, files are stored in yoursite.com/wp-content/uploads/year/month. Example: yoursite.com/wp-content/uploads/2019/01
You can upload the files wherever you like, preferably in the current year and month. If the folder hasn’t been created, you can create it by right-clicking and selecting the "create directory" option, as shown below. If you haven’t uploaded any files through WordPress this month or this year, those folders may not appear.
To upload the files, open the remote folder where you want to store them, then drag the files from a window of your file browser into it. Filezilla will take care of the rest.
It’s worth noting that the left-hand Filezilla window, which I blurred so as not to confuse you, is a local file browser (think of it as Windows File Explorer). You can also browse there to the folder containing the files you want to upload, then drag them all to the right-hand window. The same applies in Filezilla: you can drag them from a Windows File Explorer window or from within Filezilla itself. It makes no difference.
I know how to use FTP; however, the files I uploaded aren’t visible in my WordPress
This is the main issue we want to address: by default, WordPress will never recognize files uploaded via FTP as its own. They simply won’t appear in your Media Library.
You haven’t done anything wrong; WordPress works this way, keeping a record of uploaded files in its database so it can display them in the Media Library. Since we used FTP, it doesn’t know about those files... YET.
We’re going to introduce them properly, and to do so we’ll use a free plugin called "Add From Server".
Once you’ve installed and activated the "Add From Server" plugin, go to your Media Library and look for the "Add From Server" option, as shown in the screenshot below.
A file browser for your server will open, only this time within WordPress itself. You’ll see something like this:
Keep in mind that Add From Server is not designed to import media in batches, so it’s best used for individual or large files; for bulk imports, we recommend WP-CLI (see the alternative methods).
The plugin will display a list of the files that will be added to the library, along with a success message. If something goes wrong, make a note of the file in question and try again.
When you return to your Media Library, you’ll see all the images uploaded via FTP.
Alternative methods
There are optional ways to upload files in bulk to your WordPress site and register them in the Media Library, which I’ll describe below.
Another option is to use Import Images from your Server, a paid plugin that lets you perform these tasks through a somewhat friendlier interface.
If you’re a tech whiz and command lines are your thing, you can import files into your Media Library using WP-CLI. The command...wp media import...lets you create attachments from local file URLs.