The WordPress Media library is a very powerful and useful tool that allows users to easily upload media files and then insert those media files into posts, pages, products, etc.. In the case of Divi and other similar page builders, the media library integration is even more intertwined as URLs can’t always be used to populate content in the way they can with default WordPress.
While the media library should be your go-to method of adding content such as images, videos, sound files to your website, instances do arise where it can’t be used. The most common case is that you are working on a site where the server’s upload limit is set very low and you can’t upload files over 2MB, for example. I know what you are thinking… “Just login and change the server settings or contact the host to have them raise the upload limit for you.” This is easier said than done sometimes, especially if the host has strict guidelines on server resources or if you are working for a client and don’t have access to the proper settings or permission to call the host on the client’s behalf.
In this tutorial, I am going to show you how to upload large media files to the uploads directory of your WordPress installation via FTP, and then pull those items into your media library for use within the site.
— VIDEO INCLUDED —
Connect to the website via FTP & upload the media file
The first thing you will need is FTP access to the site in question along with an FTP client like FileZilla, Cyberduck or similar. I am not going to go completely in depth about FTP usage in this tutorial, but there are plenty of resources out there for you to learn.
Once you have connected to the web server via FTP, you will want to navigate to the WordPress site’s uploads folder. Typically the uploads folder resides under wp-content >>uploads>>year>>month and the path will look something like this: /yourwebsite/wp-content/uploads/2018/02. Depending on what month you would like the media file to be nested under, select based on your needs. Typically this will be the most current month, but you may have the need to organize in a past folder.
Now that you have accessed the site via FTP and located the desired uploads folder, it is time to add your media. The file that I am going to upload is a 9.2MB image from unsplash.com. Typically having an image file on your site of this size is a no-no but I am going to use this for display purposes. To add the image make sure that the proper uploads folder is selected and then simply drag and drop the file on to the FTP client. In this case, using FileZilla, I dropped the folder where it says “Empty directory listing” in the image above.
Now that the file is added you will see it in the uploads folder on your server:
Install the “Add From Server” plugin and import the media file into your WordPress Library
Okay, now the desired media file resides on the server and in the proper uploads directory. The only problem with this is that by default the media file won’t appear in the WordPress Media Library by default unless it is added using the native media uploader.
In this case, since we were unable to add the file using the normal method, we have to take more steps for it to appear in the library. As you can see in the image below, I do have some goodies in my media library, but the image I added via FTP of a starry night and some mountains is missing even though it is in the proper uploads folder on the server.
In order to add this file to the Media Library, you will install the “Add From Server” plugin from your WordPress dashboard and plugin repository. Once it is installed, activate the plugin.
Now that the Add From Server plugin is installed and activated, you will see a new option under the Media Menu. “Add From Server“. Click on Add From Server and you will be brought to a screen with several website directories to choose from. In this case, we are going to click on the “Uploads/” directory.
After you click on uploads/ you will then select the year of the folder and then the month that you uploaded to. Once you are in the proper location, you should see the media file that you uploaded via FTP. Select the item and then click “import”.
Boom, just like that the file is now located in your Media Library and can be used throughout the site in pages, posts, modules, products and all that fun stuff.
— Watch The Video —
In summary, we as web designers and developers are faced with all kinds of different scenarios and obstacles on a daily basis. The beauty of working with a dynamic CMS like WordPress is that we have many tricks and tools at our disposal (like the Add From Server plugin). While uploading media via this method might not be the ideal way to go, it will hopefully get you through a tough spot in the future as it has me several times before.
If you have any questions or comments, please feel free to leave them below. We love receiving your feedback!
Thanks for reading!