How To Fix WordPress Media Library Not Working

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.

Hope this helps fix your media library!

Matt Valvano

Author Matt Valvano

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.

More posts by Matt Valvano