Author Note: If you find this post helpful please share it and thank you for visiting our website! We hope we solve this headache for you and more updates have been added to this list on 2-12-2018. I’ll work on making a detailed step-by-step YouTube video soon.
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
WordPress 4.9.2 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, delete the code you put into your functions php file (that is if you tried it) and follow this list of solutions that I have developed over the years!
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 9 UPDATE ADDITIONS (1-25-2018): If you do have an “uploads” folder add a dash into the folder name by renaming it to “-uploads” and then making a new folder called “uploads”. If something is going on with the current folder this will let you know and your images will be backed up in the new folder called “-uploads”. Next copy/paste your image folders into the new “uploads” folder one at a time. If the old folder or a file in that folder was corrupt you will find out!
Step 10: If you have an uploads folder already or created a new one lets investigate the folder permissions. In your FTP migrate to this folder and right click on the folder to 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: Still have your hair? We will figure this out. Let’s 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 of this directory to CHMOD 744. 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: UPDATE ADDITIONS (2-12-2018): Sometimes you will require more memory with your host as WordPress eats up a lot (GoDaddy seems to have this issue and I highly recommend switching to Bluehost). If you plan on staying with your host navigate to your wp-config file and add the following code:
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );
If this does not work try to increase the memory in the .htacess file by navigating to it and typing in this code:
php_value memory_limit 256M
Still no luck? Let’s try to add the PHP.ini file. Keep in mind this file, by default, is hidden and you may need assistance from your hosting company. If you are using a program, like FileZilla, make sure the show hidden files box is checked (This file will be found in the same areas as the PHP.ini and wp-config files are located):
memory_limit = 256M ; Maximum amount of memory a script may consume (64MB)
Step 21: 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.
Step 21 1/2:Have you recently transfer your website to a new host or copy a theme over to a host? Now your WordPress images are not showing?
Check your cPanel and make sure the database wp_ prefix’s are correctly labeled and has the correct pathing name(s).
This can easily happen with purchased themes or if you started a new host and accidentally altered the mislabeled a database – If your new database prefix’s do not match EXACTLY with your existing media file settings your images will not work.
Likewise, you could have easily missed keyed a 0 (the number) instead of a O (the letter). Ouch!
Step 22: Before proceeding any further please contact your web developer or hosting provider – Sometimes you may have unforeseen issues during WordPress updates that can alter your websites core foundation code and/or table fields. At this point it is easier for a web developer with knowledge of command lines to comb through a website to find strings of code that are broken. If you feel comfortable for the next grind feel free to proceed to the Last Resorts at your own risk.
Step 23:Try re-installing WordPress again, but STOP – Did you backup your website before you thought about re-installing? Make sure to do this first. After re-installing WordPress start importing your themes files and plugins. If these solutions still do not work, feel free to contact us and we will try to help.
Why does this reinstalling WordPress work? Sometimes your downloaded files get corrupted or do not download at all. Normally it is easier to reinstall WordPress than to go through and find the corrupted or missing files.
Be Cautious: Doing some of these steps could potentially open up your website to a security breach, mainly by changing the directories and at step 19 to get your Media Library to function you can try CHMOD 777 in the directory.
The reason people highly suggest to not use 777 as file permissions is that it could potentially create a security breach 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. If your Media Library is still not working there is only one more step that I can fathom.
Last Resort of the Last Resort: Sometimes the best resort is to simply moving hosting and redirect your domain to the new host. Reasons behind this is that many hosting companies split each server up for multiple customers and bandwidth can become spread to thin. It is fairly easy to switch hosts even if you do not have coding experience with the right customer service.
We have found that Bluehost is amazing for transferring websites and they have great pricing. Best of all you get great bandwidth and due to their higher bandwidth it will assist with many of the WordPress Media Library issues you could be having. Best of all you cannot beat their customer service and they will get this issue fixed, even if it is still not working. They are top notch!
Take advantage of this discounted WordPress web hosting starting at $7.99 $3.95/mo. by clicking here.
You will get a FREE domain, FREE site builder, actual 1-click WordPress Installation and 24/7 Support from Bluehost!
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.
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
This is exactly the same problem I’m having. I am stumped!
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
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!
Glad it helped Matt
I am sure its a conflict between I.E. and WordPress
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!
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
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 🙂
Thank you very much, Matt.
There are no writable fields in media. Perhaps the last update remove it but I have no idea what to do at this point.
Hmm… I have been going through and I have not ran into that problem. Reach out to me at [email protected] and with a screenshot. I will see if I can figure anything out for you!
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.
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
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
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 🙁
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?
thank you so much! This was driving me insane but it’s working now 🙂
Useful article! Thanks!
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
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. [email protected]
For the second part please email me your website and I will take a look at it!
Talk to you soon,
— Matt
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
Hmm… Not enough information to go by on this, but I can take a look for you! Please email me your website at [email protected]
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!
Thank you! I moved a site to a subdirectory and the Media Settings still specified the old location.
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.
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’ );
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.
Thankuu so much for this post brother !!
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
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.
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…
Did you ever resolve this? I’d love to help if not.
Thanks!
I don’t where to put this code. may anyone tell me ? thank you
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’ );
This solved my problem! Thank you!!! =D
I was struggling with this error too, I’ve fixed disabling the feature called Media Translation on the Polylang Plugin
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 !
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!
I don’t where to put this code. may anyone tell me?
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!
my problem was that debug mode was ON. the media modal wouldn’t work. all is fine after deactivation of this mode.
toggling setting>media sort by date and year fixed it. Thank you!
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.
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.
the fastest method is contacting your hosting provider and request for renewing you cpanel account. solved.
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!
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!
i think media library not show because using cdn.
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? : )
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!
Updating wordpress solved the issue. Thanks.
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.
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.
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.