Blog: WordPress
Rabbit in a magician's hat

When FTP Uploads Are Not Visible in WP Media Library

Avatar for John Locke

John Locke is a SEO consultant from Sacramento, CA. He helps manufacturing businesses rank higher through his web agency, Lockedown SEO.

UPDATE March 23rd, 2018: Add From Server was closed as a plugin on the WordPress repo as of earlier today. No details yet on whether this was an action by the plugin author or the Plugin Review team.

UPDATE March 28th, 2018 The plugin author had the plugin removed temporarily and stated the following:

“Plugin was closed at my request as I got sick of the constant stream of complaints about it not working and reviews to that direction.

If you had the plugin automatically removed from your site, please complain to whomever did that, as that’s a step too far.

The plugin will be re-opened at a future time when I’ve had a chance to add the “THIS IS COMPLETELY UNSUPPORTED CODE FROM 8 YEARS AGO BUT STILL WORKS” warnings.

(Edit: re-opened, I’ll update warnings later)”

– Dion Hulse


UPDATE March 29th, 2018
According to the plugin author of Add From Server, the plugin is not actively supported, but the code works. Use it at your own risk.

If you are looking for alternatives, a newer plugin by another developer, Media From FTP, might be worth checking out, as it appears to work in a similar fashion.


Though this is not a common problem, there are times in WordPress when you may have to upload images via FTP to the server. This might occur during a migration from a server that is out of date or underpowered, where moving the Uploads folder via a plugin does not work as smoothly as expected. But uploading images directly to the target server through FTP produces another intriguing problem. The WordPress Media Library cannot “see” images that are not uploaded through the Media Library uploader, and therefore cannot be selected for use as Featured Images or in future Posts.

The Add From Server plugin imports your FTP uploads into the WP Media Library, and allows you to use them as you would normally.

After you install the plugin, you can set the options for who is allowed to import media from the server, either by user roles or by user name. You can also set the server path to uploaded media, or allow it to search the entire WordPress server install.

Add From Server Plugin Settings Screen

On the Import Media screen, you can drill down to find the media you want to import into the Media Library. There are also quick-jump links to the root folder, the wp-content folder and the uploads folder.

Add From Server WP Plugin Folders Screen

Once you find the images or media you need to import, just tick the appropriate checkboxes and import your FTP uploads into the Media Library.

Add From Server Plugin Selection Screen

Add To Server isn’t a plugin you should need very often, but it is good to know it is there and how to use it.

Avatar for John Locke

John Locke is a SEO consultant from Sacramento, CA. He helps manufacturing businesses rank higher through his web agency, Lockedown SEO.

50 comments on “When FTP Uploads Are Not Visible in WP Media Library

  1. I just wrote a script to do something similar as I wasn’t sure if this plugin would keep the same file path when importing the file or if it would duplicate the files and place it in the folder for the current month/year. I also wouldn’t want it to import thumbnails. Anyways, for those wanting to take a look at the developer way of fixing the problem, I put up an article on my site.

    https://www.getrouty.com/blog/import-files-into-wordpress-that-arent-in-the-media-library/

  2. Hi Nick:

    When I’ve used the plugin, it sets the paths to whatever the importing server is, setting things correct.

    Thanks for sharing your solution. If I recall correctly, Add From Server may import thumbnails and their variations, so that can be a pain.

  3. Thank you for this post! This plugin was just what I needed to “find” the file I could see in FileZilla but not in WP. Have a great day!

  4. I am using this plugin but not able to active it, it’s showing a fatal error.
    I am using WP 4.7 and I think this plugin for 4.0.

    Any suggestion how I can use it?

  5. Hi Shashank:

    One thing you might do is set up a staging site and see if the reason Add To Server is throwing a fatal error is because of a plugin conflict.

    It sounds like this plugin is not meshing with some other components in your site.

    What I would do is set up a staging environment, and use WP_DEBUG in the wp-config.php file to see if you can see where the fatal error is appearing.

    If you can, deactivate plugins until the error disappears. Use Add From Server to add your images into the Media Library.

    Deactivate Add From Server. Reactivate your other plugins. Move your staging site back to production.

    Your fatal error may also be a conflict in your theme. If that is the case, follow the same steps as outlined for the plugins, just swap out a different theme.

    Thanks,
    John

  6. Thanks for this, John. I was on chat for over 20 minutes with tech support at my hosting company. Tech support is slow so while they were trying to fix the problem I found this and fixed it myself. And BTW, tech support had to escalate and create a ticket for someone to get back to me. So Add From Server worked well.

    Thought I’d mention that I was going to sign up for your email list but when I pressed on “Sign Me Up” nothing happens. Browser doesn’t even try to connect to anywhere. I use Firefox, the latest version. Thought I’d let you know.

    Juan

  7. Hi Juan:

    I’m glad you found this useful. Add to Server has saved my bacon a few times.

    I checked out the bug you were reporting with the email signup. I also use Firefox. It seemed to work for me, but there is a slight delay between hitting the button and the confirmation message appearing.

    I use MailChimp for signups, and this is an embedded form. The page doesn’t reload, I believe it uses AJAX to send the info over.

    I didn’t notice anything not working, but thanks so much for pointing that out. I will investigate further, as there may be something I’m not aware of happening.

    Have a great Easter.

    John

  8. I downloaded all the WP website through FTP. Now when I uploaded the website, it is not showing a single product. Can you please help me out?

    1. Hi Ahmed:

      Can you be more specific about what you are trying to do? Correct me if I’m wrong here, but it sounds like you downloaded a WordPress site (the files) using FTP, and then uploaded it on another server.

      If that’s the case, you need to make sure that you are also moving the database from the original site to the new site.

      There are a couple of ways you can do this.

      The easiest ways to do this are to use tools to move the database. One tool that works for moving WordPress databases is WP Migrate DB Pro. What this tool will do is move all the tables from your original site to the new site, and also do a search and replace on the URLs. If you are building more than one site a year, it is worth the investment, based strictly on how much time it will save you.

      Another way to migrate sites is to use a hosting service that moves the entire site for you. WP Engine is a host that does this for you. Purchase a hosting plan from them, and use their Migrate to WP Engine plugin to move the entire site.

      These are the two options I recommend above all others.

      If I misunderstood your original question, please let me know.

      Thanks,
      John

      1. Thank you for the response. But in my case my files have been deleted from the hosting. I have all the files in my PC.

  9. You will still need the original database. This is where all the information about your products, navigation menus, and pages is stored.

    Usually the database is exported as a .sql, .xml, or .gz file. If you do not have the original database, and the original site has been deleted, you are unfortunately starting from scratch.

    If you do have the database from the original site, you can import it into the new site in a variety of ways.

    Part of this will depend on what your current hosting looks like. If you have a cPanel, or if you have access to phpAdmin, you can import the database directly using these directions. You may also check with your hosting service to make sure their version of cPanel/phpAdmin follows the same patterns.

    Some hosts allow access to phpAdmin without having a cPanel (like WP Engine). Other hosts have a stylized cPanel (like Bluehost).

    However, all this is dependent on having the original database.

    Hope this helps point you in the right direction.

    Thanks,
    John

  10. This plugin only uploads about 10 or so images, then it just stops. Any thoughts on what that may be?

    Tried it again and it gets to 14 images.

    (I am attempting to upload 400 images, about 75kb each, which I have already uploaded to the server and each time it just gets through a few images, then just stalls.. no error or anything – if I check my hosting cPanel after it stalls, it even shows no further load on the CPU as compared to when it is uploading the first few images before stalling).

  11. Hello C:

    It’s difficult to say without more information, but my instinct says it might be your hosting account choking. If you are on something like HostGator, the $8 GoDaddy general hosting, or another shared hosting plan, your server may be throttling because it is running out of resources.

    I would check with your hosting provider and see if they have some insights. The plugin is working to begin with, so something is stopping it from completing its set of tasks.

    Thanks,
    John

  12. I tried this plugin. But it hasn’t got activated for my WordPress version. It asked the latest version of WordPress. But I am worried to upgrade the WordPress version as it might create errors. Is there any other solution to this?

    1. Hi Kamalesh:

      Using Add To Server is one of the quickest and easiest ways to get your hidden media uploads visible in the Media Library.

      Addressing your concern with updating your version of WordPress, this is something you should be doing, preferably on a staging site. Hosts like WP Engine make it very easy to test your updates away from your live site.

      You should make a plan to keep WordPress, your themes, and your plugins updated on a regular basis, as there is more harm in leaving them as is then there is in regular maintenance.

  13. Thank you. this was a bit tedious, but helped me get the images to link up properly in Media Library. Seemed what I was dealing with was unique to most!

  14. Hi John, thanks for the article! I’ve installed the Add from Server plugin to my WordPress site, but it isn’t showing the files…I’ve gone into my hosting site (Bluehost) and the files are showing up there, so I know the FTP worked. Any thoughts?

    1. Hi Sam:

      Once you install Add From Server, you’ll want to navigate to Plugins > Installed Plugins > Add From Server > Import Files.

      You should see some links to the various folders on your server. You will want to go to the Uploads link, and drill down into the specific folder where you want to import images from. WordPress uses a year/month system to manage image uploads, so go to the appropriate folder(s) next. Choose the specific image files you want to import into the Media Library, and click the Import button.

      That should get you what you need.

      Thanks,
      John

  15. Add From Server has been removed from wordpress.org. Presumably because they found it contains a vulnerability. Not safe to use any more.

    Does anyone know of another plugin that does the same thing?

    Regards

    1. Hi Terry:

      Looks like it was just closed in the plugin repo yesterday. Not sure if that was an action by the Plugin Review team or if the plugin author decided to retire the plugin himself due to time conflicts. (Maintaining a plugin for free is very time consuming, and no doubt the upcoming changes to WordPress pose specific challenges).

      I’ll put a note on this post reflecting the latest changes, and update when it’s know why the plugin was closed. (If the plugin was abandoned, occasionally other developers will adopt them, and take over maintaining them, but not always).

      In the meantime, I’ll be looking for other plugins that may do the same thing. Off the top of my head, I don’t know any other with similar functionality.

      John

  16. Hi John,

    Thanks to your post I solved my problem in minutes, not hours! Thanks! Also, I was so impressed with Media-From-FTP that I even contributed money! That doesn’t happen often.

  17. I deleted an admin user that created a ton of content, media etc on the site in prior years. I did not move the content over to a good admin user. Big mistake!
    I was able to restore pages and posts and I got most of the images showing up just by manually uploading media into the uploads folders from a backup. The backup was too old to use for everything but had the missing media. Now the media is showing up on the site as it should but is not showing in the media library. I was hoping that the actual db would contain the information on the media and that I might be able to manually edit the database to assign media to a working admin from the deleted admin. My reading is killing that hope but I will go rooting around in the db to see if I can find it.
    Barring that, is it possible to use Add from Server to go into the uploads folder and select all files and do an add? Or would this colossally foul things up? My hope is that it would not attempt to add media which is already in media library and is fine and would only add what is not already there… it would need to add it to the same folder it is currently sitting in for the links to work. Any hope with this?

    1. Hi Pam:

      You should be able to add back the images to the Media Library using Add From Server. You’ll want to target the original files. AFS will default to showing all the variant image sizes your specific theme created.

      Thanks,
      John

  18. So, I did a back up without the database. I tried to upload using FTP. Files are uploaded but it looks like I’m stranded because the original hosting is no longer available – deleted. What do I do?

    1. Hi Lucky:

      If you didn’t back up the database, you are in trouble. The database contains all the content of your site, and any theme options you had on your old site. You should try and contact the old hosting company and see if they have a backup (but they might not).

      Without a database, your only other option is to rebuild from scratch. Your old site may have some pages on archive.org aka the Wayback Machine. This usually doesn’t have every page from a website, but it may save you a little bit of work.

  19. This worked! Thanks for the info. I even imported the xml wordpress export and the media images still wasn’t showing up. This plugin however worked! 🙂

    1. Hi JoJo:

      Glad to hear this worked for you. These days, I try to use automated site migration tools (like what [eafl id=”7221″ name=”WP Engine” text=”WP Engine”] has), but I know that’s not always possible. Add From Server saved my bacon more than a few times in the past!

      – John

Join the Conversation

Your email address will be kept private. Required fields marked *.