Skip to Content

WordPress Media Library Not Loading — Here’s Why

WordPress Media Library Not Loading — Here’s Why

When a web page takes too long to load, you get the spinning wheel icon. The WordPress media library not loading or loading forever is not a new issue. It is a recurring one.

In this article, you will learn what causes this issue and how it can be fixed. 

 

WordPress Media Library Not Loading

If your WordPress media library is not loading properly, deactivate all your plugins and check if the problem is resolved. If yes, one of your plugins is causing the issue. If you can’t fix it in WP, changing the file permissions of your wp-content folder should get your images loading.

 

Fixing File Permissions in WordPress

Start here because it’s the fastest troubleshooting method there is.

If this is the issue, you’ll be up and running in minutes, regardless of your media library size.

File permissions are set in your WordPress hosting account.

These permissions control who can access the directory and what they can do once they’ve accessed it.

Using the file manager in cPanel is simple enough.

Go to your public_html folder, click into the “wp-content” folder, and in there, the “Uploads” folder is where your media library is stored and controlled.

The farthest column that’s titled “permissions,” is where you can change the values.

This should be set to 0755, which is the default in WordPress.

This tells the server to make the files in that folder readable and executable to the world, but only the user (logged in) has permission to write to the directory.

If this is set to anything other than 0755, you’ll run into problems with the WordPress media library not loading, or you’ll get it to load images, but you won’t be able to upload new media.

Without write permissions, you’ll get an error message like:

Unable to create directory wp-content/uploads/

Without read and execute permissions, images won’t load.

Glitches can happen for a number of reasons, such as a server misconfiguration either by changes you make yourself or bad code in plugins or themes.

Or was it just an innocent accident by your web host performing a server update?

A file permission of 0644 makes your “files” readable and writable to you. Not to the rest of the world.

It doesn’t work for directory-level permissions (WP-Content > Uploads directory), because the executable permission is missing.

Change ### (whatever the permissions are for your uploads directory) to have the file permission be 0755.

Go back to your site, clear the cache, and reload the image library.

If the file permissions were set to anything other than 0755, the media library should load fine once the file permissions are corrected.

 

Theme Compatibility Issues in WordPress

If you’ve made a theme change or just updated WordPress, it’s possible codes are conflicting between your active WordPress theme and one or more of your active plugins.

If you suspect a theme update is the issue, take these steps:

On the left sidebar menu, click Appearance, then Themes. See what themes you have installed.

The default WordPress Theme is used for troubleshooting, even if you hate it.

It is the official WP theme released by the WordPress Team.

If you have it installed, activate it, then go back to your media library and reload the page.

If you’ve already deleted it, install and activate it because if there’s going to be a theme that doesn’t have bad code, it’s the one that WordPress developed.

If your media library loads on the WP default theme (Twenty Twenty-One), then your theme is causing a conflict.

Check to see if your theme has any updates available or if there’s an update to the WordPress core framework available.

Common wisdom would have you believe that updates should be installed as soon as they’re available.

There are two sides to that coin.

If you update instantly, you’ll be in the first group to find bugs.

If you wait a few weeks, others running the same theme will be affected first.

The developers can patch the issue and then roll out a new update to fix the error.

When you’re best to make updates depends on your theme’s popularity.

If you’re on a custom theme or one that’s been in use for a decade, chances are there’s no big user base testing out new updates.

The good news…

Most theme issues that stop your media library from loading will be plugin-related.

 

Troubleshooting Your Plugins

Return to your appearance menu and activate the theme you can’t get the media library to work on.

Then go to your plugins menu on the left sidebar and click “Installed Plugins.”

You don’t need to check every plugin individually to see if you strike it lucky.

There is a bulk edit option you can select to deactivate every active plugin in a few clicks.

Do that.

Check the box beside “plugins” in the primary menu bar to “select all” of your plugins.

Then click on the box labeled “bulk actions” to open the dropdown menu.

From here, select the “deactivate” option, then click apply.

Go back to your media library, reload the page, and see if it loads. If it does load, it’s an incompatible plugin, causing the media library to malfunction.

Now comes the tedious part of trial-and-error troubleshooting.

Activating each plugin individually, reloading your media library page each time.

Don’t do that yet, though…

 

Clear and Purge Your Cache First

Troubleshooting and testing only work when you start with a clean test environment.

To ensure there are no temp cookies on your browser or cache versions on your server, you need to clean things up before testing plugins.

Both in your WP dashboard and your browser.

In Chrome, it’s the three dots on the top right, then from the “more tools” option > “Clear Browser Data.”

The part you need to clear is the “cookies and site data”.

You’ll know it’s cleared when you’re prompted to log back into WordPress.

If you don’t have a cache plugin installed, you need one.

Go to plugins, add new, search for “W3 Total Cache” by “BoldGrid,” and install and activate that one.

Go through the setup wizard, essentially clicking the next button while it does its thing.

Once done, a new section will be added to your side menu labeled “Performance,” showing all the options for the W3 Total Cache plugin.

Click on “Dashboard,” then click the “Empty all caches” button.

Now, go through your plugins, activating them individually, starting with your most recently active ones (there’s a button to put your plugins in that order on your plugins page)

You’ll find it goes faster, having two tabs open—one for your plugins page, the other for your media library.

Activate a plugin and reload your media library. Repeat until you can’t.

The last plugin you activate that stops your media library loading, that’s your offending plugin.

Deactivate it, see if there are updates available, or try deleting the plugin and reinstalling it in case the new version has updates.