WordPress Plugin “Add From Server”

I’m in the middle of getting this site live, and thought I’d write a post on the process of getting my media imported from my old blog to this blog. I didn’t realize, when I started this process, that if I imported my media files directly to the \uploads directory, that none of the media would be visible in the Media Library in WordPress to edit or alter. All of my old blogs *do* work though, because the literal URL to the media that is in the blog is correct. However, I can’t *see* any of them in the media library so browsing to one is impossible as well as the easy re-use of any images if I want to re-use something.

Cue “Dr. Google”

As with most things I need to find, my first instinct is to google the issue. “How to update Media Library with images via FTP”

It was easy enough to find solutions and most of the posts I saw on this subject all seemed to recommend the same plugin, called “Add from Server“. Strange, that either means there aren’t many plugins for this or this one is truly excellent. So, I figured it’s recommended a few places so it’s worth a try.

Here’s what my uploads directory looks like (several years of media history in place, with MM folders underneath).

And this is what my Media Library looks like, stuff in the current month and last month folders only (which are actual recent things I uploaded the normal way). Nothing prior to Sept 2017 is showing, but it’s all there in the Uploads directory.

Off I went to add the plugin and try it out. My goal: have this drop down list show all of the same month/year folders that are visible in my uploads directory.

My Hesitation

The only hesitation I had that I couldn’t find addressed in the blog posts I read was this: I have already uploaded my media via FTP to the uploads directory, in the year\month format that they were in, in my previous site’s WordPress install. All of my blog posts already reference this pathname. I’ve already gone through all of my posts to make sure the URLs are valid, and I didn’t want to have to do that all over again.

It sounded to me like this will “copy” the files from where you uploaded them into the appropriate directories. Hmm. Do they get copied into the current system date’s year/month folder? I don’t want the URL references to all change!

My fear was unfounded. It turns out this specific question is on the plugin page itself:

What does this mean? In my case, I already uploaded all of my media into the YYYY/MM folders. Since they are already in something within the “uploads” folder structure, this plugin merely adds it to the Media Library, which is exactly what I want to happen. If I had FTP’d the files elsewhere to a generic folder, outside of wp-content\uploads, then it would COPY the file to the uploads folder AND add it to the Media Library. Nice!

Using the Add From Server Plugin

I found using it to be a little clunky, but it works, bottom line. There are only 2 settings to choose from, and I didn’t change them. There was a setting for user access control and root folder access. Neither applies to me since I am the only user on my site.

I initially didn’t know where to find the plugin to use it other than go back to the Plugins page; then I realized the link to use it is under Media. Makes sense!

I don’t know if I’m making it harder on myself, but it seems you can only upload from one folder at a time, not from a folder and all subfolders. So, with the years of media images I have, it’s a bit tedious. However, I really don’t want to mass upload another way only to find all of the image URLs are different somehow and have to update 200 blog posts! So, I’m working through one year/month at a time. Tedious.

That’s what I mean by it feels clunky.

What to watch out for

There are 2 things I have learned to watch out for as I continue this process through to adding my Aug 2017 images.

Don’t FTP existing thumbnails to the new server!

Once again, rookie mistake. I copied all of the content in the uploads directory verbatim, I didn’t think about thumbnails. On the first few folders I ran through this plugin, I realized it recreates the thumbnails. So I had thumbnails of thumbnails. LOL… yeah, it wasn’t pretty!

What does this mean? This is what my uploads directories look like, for one image, example “Happy-New-Year-Snowman.jpg”. I don’t know why I have so many thumbnails for my images in the first place but clearly it’s too many. For each of these things imported to the media library, WordPress (or the plugin) auto created thumbnails for each image again, on top of this. My new site creates 3 thumbnails per image it appears so instead of this image coming in and having 3 thumbnails, it imported all of these AND 3 thumbnails per image so there were 27 files, not 4 files in total. Ugh. Glad I noticed that early. Thumbnails are kind of an invisible thing, you don’t see these in the Media Library, they are meant to exist in the background.

How to fix? I manually deleted all of the XXXxXXX files out of every folder so I was just copying in the “real” image file. Painful, but true.

Don’t forget to tick the “File Time” option to keep same YYYY/MM!

This is one setting I *wish* was in options, so you could default it in every time. I want the imported date to be based on the File Time, not today (Current Time). I was merrily flying along importing one folder at a time and then missing one and didn’t notice right away. Oops.

If you leave it at the original setting, which is Current Time, even though I’m “importing” my 2011\01 folder for instance, and the files physically are staying there, in the Media Library, the files all showed up as Nov 2017! Yikes. It must use a UTC date because it’s not even Nov 1st, 2017 yet where I live.

I didn’t test but if you’re using the method where it also copies the file, I am guessing Current Time will also put it in the current YYYY\MM folder just like it is listed in Media Library which isn’t what many would like to see I imagine!

Anyway, I only made that mistake once so far and then deleted that media and copied it in again. NOTE: remember to FTP those files somewhere before deleting from the media library as that, of course, deletes the files entirely. Fortunately I still have on my computer all of the files I had downloaded from my previous site’s upload directory and didn’t lose anything but depending on your situation, you might need to watch out for this if you have to correct the problem.

That being said, it wouldn’t really be that big of a deal. The files are in the right folders, but for me, to have everything piled into one “media library” month of Nov 2017 would be a pain in the butt to deal with since it’s so many old files. It doesn’t actually hurt anything to leave it the way it is if you had to.

Here’s what the first few months look like in the Media Library dates drop down list now that I have done a few months. Nice! Once I’m done, I can uninstall the plugin as I don’t need it any longer.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top