You’ve moved your website to a new host, or perhaps you’ve manually uploaded a batch of images via FTP to save time. Everything seems to be in order—you can see all your images in the wp-content/uploads
folder on your server. But when you check your WordPress Media Library, it’s empty, or most of your images are missing. The problem is a common one: your image files are on the server, but your WordPress database doesn’t know they exist. Manually re-uploading every single file is not a viable solution. This guide will show you how to regenerate media library from uploads folder quickly, safely, and efficiently.

The Problem: A Disconnected Database
When you upload an image through the WordPress dashboard, two things happen simultaneously: the image file is saved to your server, and a corresponding database entry is created. This entry is what allows WordPress to display the image in your Media Library and on your posts.
When you manually upload images via FTP or migrate a site without using a proper migration plugin, the database entry is often not created or is corrupted. The files exist, but the database has no record of them. As a result, your WordPress Media Library doesn’t show the images, and you can’t insert them into your posts. The solution is to force WordPress to scan your uploads folder and create the missing database entries.
The Right Tool for the Job
While there are manual methods to achieve this, the safest and most reliable way is to use a specialized plugin. We recommend Media Library Recovery because it’s designed to do exactly this: it scans your server, finds all the media files not in your database, and gives you a simple way to register them.
Step 1: Back Up Your Website (Critical)
Before you run any kind of database operation, you must have a full, recent backup of your site. Use a reliable backup solution like UpdraftPlus or Duplicator to save both your files and your database. This is your safety net in case anything goes wrong.
Step 2: Install and Activate the Plugin
From your WordPress dashboard, navigate to Plugins > Add New. Search for “Media Library Recovery,” install it, and activate it. The plugin has both a free version and a PRO version with more advanced features.
How to Regenerate Media Library from Uploads
Once the plugin is activated, you’ll find a new menu item. Navigate to Media > Media Recovery.
- Run the Scan: The plugin’s interface will immediately begin to scan your
wp-content/uploads
folder. It will show you a list of all media files that are on your server but are missing from your WordPress database. - Verify the Files: Take a moment to review the list. This is a great way to confirm that the plugin has found all the images you were expecting it to. If you see images that you don’t want to recover, you can simply uncheck them.
- Initiate Recovery: Select all the images you want to recover. Then, click the Recover button. The plugin will now create a new database entry for each selected image file.
Why This Method is the Best Way to Regenerate Media Library from Uploads
- Safety: This process is safe and reliable. It works by creating new database entries, not by manipulating existing ones, which minimizes the risk of data corruption.
- Speed: The plugin can process hundreds or even thousands of images in a matter of seconds. This is a huge time-saver compared to manual re-uploads.
- Efficiency: It ensures that your database and your file system are in perfect sync. This is crucial for site performance and for search engines to properly index your images.
- Metadata: The plugin will also attempt to add common image metadata, such as file names and dimensions, to the new database entries.
What to Do After Recovery
Once the plugin has finished, you can check your Media Library again. All the previously missing images should now be visible and usable in your posts and pages. You may also need to:
- Clear Your Cache: Your browser, caching plugin (WP Rocket), or CDN (Cloudflare) might still be showing you an old version of your site. Clear all caches to ensure you are seeing the most recent changes.
- Check for Broken Links: If you had a site migration, some of your content might have broken links to your old domain. You may need to run a search and replace to fix those.
Conclusion
Having your images on the server but not in the WordPress Media Library is a frustrating problem, but it has a simple and powerful solution. By using a specialized plugin, you can easily regenerate media library from uploads folder, ensuring a perfect sync between your file system and your database. This streamlined workflow saves you from the tedious and risky task of manual re-uploads, allowing you to get your site back in perfect working order in minutes.
The PRO version of the plugin offers advanced features like faster bulk recovery and even includes a built-in backup tool to help prevent this issue from ever happening again.