When working with WordPress, you will find out fairly quick that it can be pretty sensitive during updates and host transfers. This may create tension with the main reasons why you chose to use WordPress for your website in the first place, for example our issue being the Media Library. Our problems occurred during a server transfer for one of our clients. We realized that a lot of people were having this same issue, but no one had truly addressed it. Below are the steps to take when you find the WordPress Media Library not working correctly.

Problem | When trying to upload a new image to the WordPress Media Library it does not work.

Steps we take to solve this problem: These steps were taken and could potentially work at any given step so, you need to see if your Media Library works after each one.

Step By Step Guide Towards WordPress Media Library Not Working Properly With Solutions

Just In WordPress 3.9.1 Media Library Not Working Fix:

PLEASE NOTE: I have not tested this, but I found this for the 3.9 media library not working and apparently it involves the WP_Image_Editor default to GD. Add this snippet of code your functions php file:

function ms_image_editor_default_to_gd( $editors ) { $gd_editor = 'WP_Image_Editor_GD'; $editors = array_diff( $editors, array( $gd_editor ) ); array_unshift( $editors, $gd_editor ); return $editors; } add_filter( 'wp_image_editors', 'ms_image_editor_default_to_gd' );

Source Default To GD

If this does not fix your WordPress library follow this list of solutions that I have developed!

Step 1: Disable all of your plugins and test to see if your media library is working. Now test to see if your Media Library is now functioning: (If it is working then go through and activate each plugin one at a time and see which one it is breaking your media library, then do not use it. Likewise if this does not solve the problem go to the next step)

Step 2: Log into your admin panel.

Step 3: Go to Settings > Media

Step 4: In the first writable field (Store uploads in this folder) it will state that the Default is wp-content/uploads but, it will not register this as “True”.

Step 5: Type “wp-content/uploads” within the field. (Also, make sure that “Full URL path to files” is blank.)

Step 6: Click, Save Changes. Now test to see if your Media Library is now functioning if not go to the next steps:

Step 7: Open up your File Transfer Protocol or (FTP).

Step 8: Go to your wp-content section. This will be listed within your sever at YOUR-SITE.COM/wp-content/

Step 9: Right click or highlight your “uploads” folder. If you do not have one then create one and test to see if your Media Library is now functioning. You need to have a folder here at YOUR-SITE.COM/wp-content/uploads/

Step 10: If you have an uploads folder already, select its “File Permissions”.

Step 11: Set the Numeric Value to 755 or 777 (777 can present a security risk see details below). Now test to see if your Media Library is now functioning if not go to the next steps:

Step 12: Go back into WordPress.

Step 13: Go back into Go to Settings > Media

Step 14: Uncheck “Organize my uploads into month- and year-based folders”.

Step 15: Click, Save Changes. Now test to see if your Media Library is now functioning if not go to the next steps:

Step 16: If your Media Library is still not working there is only one more step that I can fathom. Go back into your File Transfer Protocol or (FTP).

Step 17: Right click or highlight your “wp-content” folder.

Step 18: Select “File Permissions”.

Step 19: Set the Numeric Value to 777. Now test to see if your Media Library is now functioning and hopefully it is by now. Please note if your website is still down, it could potentially one of two things. The first being a plugin that you chose or created. Most free plugins do not take in consideration that your site matters. It is a pain, but do some research on the person who uploaded the theme and be sure that you check their reviews. The second reason could be due to some of your folder permissions — they might have been lost during a host transfer.

Step 20: If these solutions don’t work double check your .htaccess file and make sure this file matches with the theme you have installed on your site. Sometimes if this is not setup correctly it will re-write the path of the uploaded image. This is something you will have to investigate on your own and you can click here to fix your WordPress htaccess file.

Try re-installing WordPress again, and re-importing your themes and plugins. If these solutions still do not work, feel free to contact us and we will try to help.

Be Cautious: Doing some of these steps could potentially open up your website to a security breach, mainly by changing the directories to 777 if you went all the way to step 19 to get your Media Library to function. Don’t worry to much; if you had that much trouble getting it to work your server obviously has a great deal of security within it.

The reason 777 could potentially create a security breach is because the CHMOD 777 means that everybody has access to the folder and can write/read the files. Violators sometimes may take advantage of this. We highly suggest that if you did change the folders to CHMOD 777, to contact your host provider and see if there is any way around this.

Keep in mind that most host servers have your website compiled on a server, with up to 100+ other customer websites. If they had to create any changes to that server for another client, your website will be affected too. If you mention this error to them they should be able to fix this issue or migrate your website to a different server. This will ensure that your new server will contain different site restrictions or security options allowing you to not use CHMOD 777. Feel free to comment if you find any other suggestions that can be taken to solve the WordPress Media Library to work properly.

Last Resort: If you have tried everything you can always reach out to your hosting service to reset your server. With our hosing service they will automatically run backups, but they will charge us if we have to set our site back. Other hosting companies only do this if you pay. This is why you need to run your own backups on your websites. Each host is different, but again this is the very last step where all hope has been lost! YOU WILL LOOSE EVERYTHING, that is after the day your host ran its last backup. I cannot stress this enough, because 99% of the time you will not have to resort to resetting your server back. Please, consider to contact me directly before you take this step!

Update: This issue also occurs when using WordPress on a MediaTemple dedicated-virtual server. Here is an article we wrote on how to correct this issue on MediaTemple servers.

Update: If none of these steps work and you are using Chrome or IE, try Firefox. This seems to be an issue in IE and Chrome (maybe from these plugins) – Using FF 21 or 22 seemed to work for a few people.

Have any other solutions to “WordPress Media Library Not Working”? Please don’t hesitate to add your solutions in the comments below.

Hope this helps fix your media library!

About The Author: Matt has a very extensive experience of print and web design. He is an effective team player known for creativity, flexibility, distributing skills, managing, working with others and producing high quality, effective works of art within a deadline.

  • Steve SKP

    Hi Matt, this is a great list but unfortunately did not help :s

    I am using Word Press 3.52 and I do not have the file path in Media Settings

    All plugins disabled and back to default theme still does not help

    Can you offer any other suggestions?

    Thanks
    Steve

    • hfrank

      This is exactly the same problem I’m having. I am stumped!

      • Steve SKP

        Hi Frank, I resolved the issue by using Firefox – seems to be an issue in IE and Chrome – I am now using FF 21 and 22 and its working perfectly :)

        Hope it helps you too

        • http://ideasandpixels.com/ Matt Valvano

          Awesome Steve SKP,

          I have been looking for the solution since you posted this!

          Maybe when WordPress updated to 3.52, it attempted to fix some of these problems. If I learn anything else about this update I will add them.

          hfrank ~ Did Steve SKP’s suggestion work for you? If so, I will toss it in as an outside possible solution!

          • Steve SKP

            Glad it helped Matt

            I am sure its a conflict between I.E. and WordPress

  • Raymundo Marqueda

    Thanks Matt, i was having this problem with my WP installation and the WP better security Plugin, wich does not rename the folder in the media settings, i did it manually and averything worked perfectly again. This is the only site that describes everything on a step by step basis. Incredibly understandable!
    Thanksa llot for your information and keep the good work! Thumbs UP!

    • Khandaker Toihidul Islam

      Hi, I had also same problem. Now It is solved follow the steps:
      1. admin panel -> setting-> media then empty the Uploading file input boxes

  • http://robcubbon.com/ Rob Cubbon

    I found this really useful. Fixed my issue around steps 3 and 4. I’d just created a test site in a subdomain and the uploader stopped working. It turns out I had to amend the path in Settings > Media :)

  • Nikola

    Thank you very much, Matt.

  • http://forusnaturals.com/ Isa

    There are no writable fields in media. Perhaps the last update remove it but I have no idea what to do at this point.

    • http://www.valvanocarpeting.com/ Matt Valvano

      Hmm… I have been going through and I have not ran into that problem. Reach out to me at sayhello@ideasandpixels.com and with a screenshot. I will see if I can figure anything out for you!

      • http://forusnaturals.com/ Isa

        I had a long thing all written out to send to you but then I checked and updated to WP 3.6.1 today and it seems like its working for now. Thanks for getting back to me.

  • Guenter

    I have the problem that I am on version 3.6.1 can not access the library to update from a page out, I get when clicking on “Add File” only an empty window viewing with the left hand navigation, but does not work. So I can not add images or galleries in my pages. A post on the forum has not helped me so far. Vielleich you can help me. My page: http://www.fogerty.de

    • http://www.valvanocarpeting.com/ Matt Valvano

      Hey Guenter,

      Looking into this I have not ran into this problem with updating any of our WordPress sites. Will the drag and drop feature not work? Seems kind of odd that you get to this point, but then nothing is able to be done.

      It almost seems you had a bad 3.6.1 WordPress download or a plugin was not updated yet for WordPress 3.6.1 and is causing some problems. I believe it is this because your images are pulling in fine from your upload folder and it is only the up-loader function that is not working.

      Personally, I would backup your entire website/server. Deactivate all of your plugins and test to see if it is working. If this is not the case then you need to re-install wordpress.

      MAKE SURE everything is backed up then click Desktop > Uploads and re-install it.

      If that does not work let me know,
      — Matt

  • Kris

    Your didn’t help me either.
    In my case it looked like this:. It started i don’t remember when, around a year ago. Every time i update WP it works fine, but only right after updateing….when i’m back f.e. after few days the problem is again…now i updated to 3.6.1 and is the same…i could add images right after update and now i can’t again :(

    • http://ideasandpixels.com/ Matt Valvano

      This is extremely odd. Normally when you update nothing else should change, within the major parts of the files.

      We just had a problem that could cause this issue as well (Possibly similar to what is going with your site), but a conflict with a JavaScript markup from a plugin. This plugin’s JavaScript ended up taking over the main theme’s JavaScript and stopped the entire website from working.

      Are you able to look into this or would you like us to take a peek?

  • ChristyS

    thank you so much! This was driving me insane but it’s working now :)

  • http://dezayo.com/ dezayo.com

    Useful article! Thanks!

  • Nils

    Hi Matt

    I need your advice urgent, I have tried your steps and still doesn’t work.
    My problem is now that all pictures stored in Media are gone, how can I retrieve them back?
    and in Media settings I removed the URL as you mentioned and now when I want to fill the URL field back how it was, the URL field is not visible, what can I do to make it visible again?

    thanks in advanced

    • http://ideasandpixels.com/ Matt Valvano

      Hey Nils,

      Are you able to access your website through your FTP? Once open navigate to your uploads folder. The steps I listed above should not have deleted anything. It will be in your httpdocs > wp-content > uploads

      Two things may happen:
      1) You may just need to right click on uploads and open up the permissions, then to set it to 777. This should re-activate your photos to be viewed.

      2) If nothing is in here you will need to call whomever host your website. Ask them to reset your website back to the last save point, but every host normally allows this to happen with little to no cost.

      If it is the second option and you are hesitant on what to ask or tell your hosting company, please contact me through my personal email. matt@ideasandpixels.com

      For the second part please email me your website and I will take a look at it!

      Talk to you soon,
      — Matt

  • Dries

    Hi

    I just started a site and set everything in order. now i want to upload images in my library but tis doesn’t work. the image loads, chrunces and than the image doesn’t show. Only the name like “DSC099891″

    I have done everything above, but nothing seems to work. i’ve just 2 plugins yet en those arent the problem. reinstalling doesn’t solve the problem, nor al the other things mentioned above

    Can someone help me?

    Thanks in advance!

    Dries

    • http://ideasandpixels.com/ Matt Valvano

      Hmm… Not enough information to go by on this, but I can take a look for you! Please email me your website at matt@ideasandpixels.com

  • Deadko

    my problem: In media library page, i paginate pages 1 to 2, to 3, to 4 and then cannot forward to 5, 6, 7 …etc..only can see the images selecting by month
    any solution for this, thanks!

  • tom

    Thank you! I moved a site to a subdirectory and the Media Settings still specified the old location.

  • J. M. Brink

    Matt, this doesn’t seem to work for my particular case. I pray you can help me pin this down. I have a WP-MU using subdomains.
    only in the subdomains has the media library gone MIA.

    •The files are on the server.
    •The files are uncorrupted.
    •If I go to the media library and select that I’d like to edit the image (rotate, scale, etc) I can view it — but aside from that, no.
    •New images are affected.
    •Redirecting the downloads does not change anything.
    •New subblogs have the same issue.
    •File permissions have been check, rechecked and changed in all manner of permutations — no change. they’re back to normal now (755 dir 644 files)
    •Doesn’t matter the browser, nor the media upload settings (which have to be done from network-admin > sites > edit > settings
    •New files upload fine except not being visible.
    •Using 3.8.1

    not actually sure when the problem started, first discovered it the last or next to last week of Feb.
    I have only one .htaccess file and it’s in the main site dir.
    I have confirmed all plugins disabled. I even nuked the plugins directory just to be certain and disabled them all from MySQL.
    I’d restore from backup, but given that even new sites are suffering this issue I’ve little confidence that doing so would make the slightest difference; besides that it seems overkill for what has got to be a setting issue in the database or in some .php file somewhere.

    the site is http://universal-nexus.com one of the subblogs is a snapshot used for experimenting http://sandbox.universal-nexus.com it’s what I’ve been working from to try to resolve the issues. I’m looking for any help I can get. The WP support forums have not only not given me anything but a laundry list of people having the same issue with various revisions of WP 3.x, but my own post has had 0 response from users or software admins alike.

    • http://ideasandpixels.com/ Matt Valvano

      I had this posted inside the article, because there was not a fix for this until now. If you found a solution let me know and I will add it and if you do not have a fix as of yet, try this:

      PLEASE NOTE: I have not tested this, but I found this for the media library not working and apparently it involves the WP_Image_Editor default to GD. Add this snippet of code your functions.php file and if it does not work email us on our contact form:

      function ms_image_editor_default_to_gd( $editors ) {
      $gd_editor = ‘WP_Image_Editor_GD';

      $editors = array_diff( $editors, array( $gd_editor ) );
      array_unshift( $editors, $gd_editor );

      return $editors;
      }
      add_filter( ‘wp_image_editors’, ‘ms_image_editor_default_to_gd’ );

      • http://universal-nexus.com/ J. M. Brink

        I would love to try that, but I can’t — I’m sorry, I forgot I’d posted here before so didn’t say, but I fixed it. For whatever reason, my .htaccess wasn’t rebuilding itself properly, and a bit of copy/paste of the default stuff from wordpress.org finally sorted it out.

        thanks.

  • Mridul Kabra

    Thankuu so much for this post brother !!

  • john harper

    hello i have a problem.

    images have uploaded successfully in media gallery.

    But when i am trying to add these images in new page, gallery is not showing.

    what is the problem and where

    • Jaap Veenstra

      Same here. I says uploading is not working, but the files are showing in te main-library. Just not the library when I want to insert an image. The field is completely empty.

      The other weird thing is: when I go to the main library outside an article and I want to attach an article to the photo’s, I get scrambled code. I cannot find any article.

      • http://www.alpha-audio.nl Jaap Veenstra

        Got the error again. Seems like it came out of the blue. Have no idea how to fix this. Disabled all the plugins, gave 777-permission to the uploadfolder and activated the stock-theme. No difference. Even ‘repaired’ the database. Seems like a kernel-foult in my WordPress. But even after installing 3.9 and updating to 3.9.1 doesn’t work. Please help! I’m at a fair at them moment and would love to report…

        • mrgingrich

          Did you ever resolve this? I’d love to help if not.

          Thanks!

          • Piden Hem

            I don’t where to put this code. may anyone tell me ? thank you

        • http://ideasandpixels.com/ Matt Valvano

          PLEASE NOTE: I have not tested this, but I found this for the 3.9 media library not working and apparently it involves the WP_Image_Editor default to GD. Add this snippet of code your functions.php file:

          function ms_image_editor_default_to_gd( $editors ) {
          $gd_editor = ‘WP_Image_Editor_GD';

          $editors = array_diff( $editors, array( $gd_editor ) );
          array_unshift( $editors, $gd_editor );

          return $editors;
          }
          add_filter( ‘wp_image_editors’, ‘ms_image_editor_default_to_gd’ );

          • Fanny

            This solved my problem! Thank you!!! =D

    • Diego

      I was struggling with this error too, I’ve fixed disabling the feature called Media Translation on the Polylang Plugin

  • Carole

    I do NOT recommand you follow step 5 unless you want all images gone from your site in a second. In case you read this and it is too late, I suggest you use the pluggin WP Original media path in order to reverse the effect !

    • mrgingrich

      Why would all of your images be gone? Did you resolve this? If not, let me know and I’ll try to fix it for you.

      Thanks!

      • Piden Hem

        I don’t where to put this code. may anyone tell me?

    • http://ideasandpixels.com/ Matt Valvano

      You will not loose your files following step 5. I believe your files are being stored elsewhere on your host. Do you have access to your FTP (File Transfer Protocol)? If so let one of us know and we will help you out if you cannot get this resolved!

  • parabolika

    my problem was that debug mode was ON. the media modal wouldn’t work. all is fine after deactivation of this mode.

  • jskkujawa

    toggling setting>media sort by date and year fixed it. Thank you!

  • http://google.com/+DayMilovich Day Milovich

    open your ftp. set permission to folder /uploads #recursive to all subdirectories to CHMOD 744. then set all files in folder /uploads recursive to 644. never ever change folder to 777. i am indonesian.

  • Dan

    I had tried all the fixes I found on blogs and forums for this problem, including those in this post, to no avail. I was nearly desperate when I suddenly found a strange “j” at the start of the wp-config.php file (that is, the file literally started: “j< ?php …" ). So I deleted that "j" and the problem was fixed. Can't say how that "j" got in there but it was making the media library not to work while everything else in my WP worked fine.

  • http://google.com/+DayMilovich Day Milovich

    the fastest method is contacting your hosting provider and request for renewing you cpanel account. solved.

  • http://www.lisaburger.com/ Lisa Burger

    Ah. I made a poor decision that caused this problem and wanted to share in case someone else does it, too.

    Moved a client’s WP to a new server. Everything appeared to “worked” except the media library…all the media entries were being listed in the Media area of the Admin dashboard.

    But no thumbnails were available via the WordPress Admin dashboard. You could see the images if you put the absolute url in the browser. File permissions were fine. And images were on the server in the right spot.

    Here’s what I accidentally did…

    Old database from the original server still used the traditional wp_ prefix for all of it’s tables. When I setup the new database, I choose a random prefix to replace the table names. For grins, let’s pretend I used abc_.

    Did a database dump, and without thinking about it first I did a global search and replace for wp_ to abc_. That replace clobbered a bunch of entries in the postmeta table that had the string wp_ in them. This is what caused Media Library to not display images correctly.

    Once I undid that search and replace in that table the Media Library was fine.

    The solution: When you do the global search and replace, use `wp_ to `abc_. Then it’ll only grab table names, not the individual items within the tables.

    ALSO CRITICALLY IMPORTANT, read this article: https://wordpress.org/support/topic/wp-admin-you-do-not-have-sufficient-permissions-to-access-this-page

    If you use a different prefix, there are a handful of database entries from the backup that must be hand modified, or you won’t be able to login to the dashboard as shared by mbolsinga: “…check inside two tables to see that certain field names are also changed. So, using the same prefix as above, in b2_options, the field wp_user_roles has to be changed to b2_user_roles. And in the b2_usermeta table, the fields wp_capabilities, wp_user_level, wp_user-settings, wp_user-settings-time, and wp_dashboard_quick_press_last_post_id should all have the prefix b2_ instead of wp_.”

    Anyway…I did not see anyone mention this in the many websites while trying to figure out why my Media Library was broken. If you did this mistake, go back to your original backup and start over completely. Cheers!

    • http://ideasandpixels.com/about-ideas-and-pixels Matt Valvano

      Great insight Lisa! I’ll have to write up an addition for this in the future to fix this using command lines. I agree prefix’s tend to be a pain, especially when a user has to transfer a site. Thanks for addressing this issue for the backend user!

  • http://kasurnet.com Kasurnet.com

    i think media library not show because using cdn.

  • Ron Hogue

    Thank you, thank you! You saved me HOURS of time. wp-content folder settings were 711 instead of 755. As soon as I updated (recursively) my images appeared. Did I say think you? : )

  • Ann Plough

    Thanks Matt! You just saved me a ton of work and a huge headache and I am so grateful! After a few hours of trying to fix the problem using other suggested methods on the web, your post brought me straight to the point with adding the new code. Sending HUGE appreciation your way from Finland!

  • Victor Manuel Larios Zarate

    Updating wordpress solved the issue. Thanks.

  • Fãžy

    hi, I have a problem with uploading picture via google drive wp media to media library. When I upload directly to my media library it’s normal view (can see picture), but when I upload from google drive wp media to media library the picture is not display well, it’s like a blank one. So please help this issue.

  • http://tapinfinity.com Val Silver

    Hi Matt, I am having this problem and it just got worse because when I made the media settings choice to default, it broke the link to all my featured image, header slider, widget images and additional images in the media library. The original problem was that I just could not access new images that were in the library but not seeable. When I made the change to see if that helped, the option to reenter the original setting disappeared and now I can just set image sizes, not the path. I am beyond frustrated. I appreciate any wisdom you may have.

  • Robert Shields

    Step 1 Should be the following: Rename your ‘uploads’ root level folder to ‘- uploads'; create a new ‘uploads’ Root Folder with the correct file permissions set and then move the sub-folders found in your original ‘uploads’ folder (now called ‘ – uploads’), to your newly-created ‘uploads’ folder. This was the only thing that corrected the problem for me.

  • Sanjeev Pratap Singh

    The same thing happened on windows local host…
    I have added support for images to my theme…
    When I uploaded pictures,it get uploaded to the folder but it shows me error in gallery section”Please try again later.”
    So how to fix it on local host..