As a WordPress user or professional, you’re probably always looking for ways to manage WordPress sites more effectively. In fact, I’m betting you already seek out tools that allow you to automate backups and safely bulk update your WordPress site.
Another area where you can speed up your WordPress management is uploading images to your site. Instead of using the native WordPress Media Library uploader to upload images, a faster solution for some situations is to bulk upload images to your WordPress site via FTP. I mean, the WordPress Media Library uploader is fine for uploading small numbers of small files…but it’s not always your best option if you need to upload huge numbers of files (or just huge files!).
For example, if you need to upload a whole heap of WooCommerce product images all at once, I doubt you’re going to want to manually upload every single image file via the WordPress Media Library. That’s where FTP offers a better way. But, if you want to bulk upload files to WordPress via FTP, you’ll need to complete a few extra steps to actually use those files inside WordPress. That’s what this post is about!
Why You Can’t Just Bulk Upload Files and Call It a Day
Ok, so if you know the basics of FTP, you probably realize that you can already upload files to any location on your WordPress site’s server via FTP.
So…
Why can’t you just upload all the files that you want to the wp-uploads folder and start using them in your WordPress site right away?
Alas! It’s not that simple. See, all files need to be registered with WordPress in order for you to directly use them from the WordPress interface.
So, bulk uploading files to WordPress is actually a two-part process:
- Upload the files via FTP like you would normally
- Register those files to the WordPress Media Library (I’ll give you two ways to do this)
Here’s how to do everything…
How to Bulk Upload Files to WordPress via FTP
To get started, I’m going to quickly run through the process of how to actually upload files via FTP.
I know that many of you already understand this process – but I want this post to be accessible to readers of all knowledge levels, so I’m going to cover everything from start to finish nonetheless.
With that being said – if you already know how to upload files via FTP, click here to jump straight to the guide on how to register those files to the WordPress Media Library.
Step 1: Bulk Upload Files to WordPress via FTP Program
Here’s what you’ll need to connect to your site via FTP:
- An FTP program – I like FileZilla (it’s free!)
- Your FTP credentials – you need a username and password to connect. You can get these from your host.
Once you have that information, open your FTP program, enter your credentials, and connect to your site:
Once connected, navigate to your wp-uploads folder:
Then, upload the files you want to add to WordPress. You can either create a new folder (that’s what I’ll do) or use the existing Year/Month structure that WordPress uses for files that you upload through the WordPress Media Library:
At this point, your files are on your server. The files are in the computer:
But if you go to your WordPress Media Library, you still won’t see any of those files.
That’s because, as I mentioned, the files that you just uploaded aren’t yet registered to the WordPress Media Library yet.
To register the files, you can choose one of two methods:
- Free Add From Server plugin – easy for anyone to use, even total beginners.
- WP-CLI – for WordPress developers/power users. Casual users beware!
I’ll tell you how to use both below…
Step 2.A: Register Bulk Uploaded Files With Add From Server Plugin
For an easy way to register files to the WordPress Media Library, you can use the free Add From Server plugin.
To get started, install and activate the plugin. Then, head to Media → Add From Server.
There, use the interface to navigate to the folder where you uploaded your images:
Once you enter the folder where you uploaded your images via FTP, you should see a list of those files. Click the box to select all files and then hit the Import button:
You should see a success message:
And that’s it! You can now use your files inside the WordPress Media Library.
If you ever need to bulk upload more files via FTP, all you need to do is repeat the process.
Step 2.B: Register Bulk Uploaded Files With WP-CLI
If you know your way around WP-CLI and want a more streamlined way to register files to the WordPress Media Library, WP-CLI actually includes a command to import files to the media library.
Specifically, you’re looking at the wp media import command.
You can either import specific files or use regex to import all files of a certain type.
For example, using:
wp media import ~/Pictures/**\/*.jpg
Imports all of the jpg files from the Pictures folder.
One advantage of using WP-CLI is that you can attach files to certain posts, add alt text, titles, captions, and more.
Another neat thing that WP-CLI lets you do is import and register an image from an external web URL.
If you’re interested in using WP-CLI for this, I suggest reading the full developer page for a more detailed look at everything the import command lets you do.
Bonus: How to Bulk Upload Files to WordPress via ZIP File
For a non-FTP way to bulk upload images or other files to WordPress, I found a neat bonus plugin called Upload Media by Zip.
This plugin allows you to upload a single ZIP folder to your WordPress site. Once you upload that ZIP file, the plugin will automatically extract all the files contained inside and register them to the WordPress Media Library
Once you install and activate the plugin, you get a new Upload and extract a ZIP archive option in the WordPress Editor:
If you click that button, you can choose your ZIP file, as well as whether or not to delete the ZIP file after uploading:
After uploading the ZIP file, you’ll see a success message of all the files that were extracted:
And all the files that upload in this manner are automatically attached to the post.
You can also upload a ZIP file outside the WordPress Editor by going to Media → Upload Zip Archive:
This plugin doesn’t give you quite as much flexibility as FTP, but it’s easy to use and might save you some time if you find yourself often working with ZIP files.
Wrapping Things Up
Knowing how to bulk upload files to the WordPress Media Library via FTP can save you time when you’re working on your next WordPress site.
Remember, to do things properly, you need to complete two parts of the puzzle:
- Bulk upload your files or images via FTP
- Register those files to the WordPress Media Library via the Add From Server plugin or WP-CLI
I hope you enjoyed this guide, and I’d love to hear how you implement these strategies into your workflows!
Zack Barton
Thank you. We’re excited to try this… Especially after manually uploading many thousands of product images into the faulty uploader, only to receive error after error for hours on end. Much appreciated!
Johnny
I had never any luck with FTP. So I installed File Manager plugin instead and this did the job.
Michael
The ‘Add from Server’ plugin is no longer available (as of 23rd March 2018).
Mark
As of today (6/14/18) it’s been re-added with a disclaimer.
Zach
I use x10hosting and FileZilla. How do I get my hosting address into the code of “Add My Server” so it pulls my images from the x10hosting location? Hope that makes sense. Thanks.
Nils
I recently wrote a german blog post about the “Add From Server Plugin”. Now I can add the information about the WP-CLI option and the Upload Media by Zip Plugin I didn’t know before. Thank you!
Amy
Thank you for this article it is very helpful!
Question: Do you recommend storing all images in one folder instead of the default year/month structure? Does this affect the speed of the website in any way to have them all in the same area? (I read this is why WP designed it this way.)
Colin Newcomer
Hey Amy, I’ve never heard that. And it seems like unless you’re storing an absurd number of files in a single folder (like hundreds of thousands), you’re unlikely to have any performance issues.
I don’t want to give a definitive answer either way because I’m not an expert, but my understanding is that it’s not something 99.99% of WordPress users ever need to worry about.
If it’s really something you’re concerned about – you can still use FTP to bulk upload files to different folders (or use the same year/month structure).
Justin Wilson
I use WP Media Folder (a media manager) from JoomUnited. It does all sorts of things like organise images into folders with various Cloud storage integrations (DropBox etc), and in particular has an import from FTP’d files. To me, WP Media Folder is what’s missing from the basic and limited WP media handling.
Eugene Kopich
Nice! I didn’t know that WP-CLI is capable of doing it…