How to Regenerate Thumbnails In WordPress: Step-by-step

Have you ever switched your WordPress theme or adjusted image sizes, only to find that your thumbnails look stretched, cropped incorrectly, or downright messy? WordPress doesn’t automatically regenerate thumbnails when changes are made, which can leave your media library in disarray.
This is a common issue that can make your site look unpolished and unprofessional. Regenerating thumbnails in WordPress allows you to refresh your image previews, ensuring they match your latest theme settings and display correctly across your website.
In this guide, we’ll walk you through the process step by step, whether you prefer using a plugin or doing it manually. Let’s get those images looking crisp and clean in no time!
How Images Work in WordPress When You Upload
When you upload an image to WordPress, it doesn’t just store the original file, it automatically creates multiple resized versions based on your theme’s settings. These different sizes help ensure your images display correctly across various areas of your site, such as thumbnails, featured images, and blog post content.
By default, WordPress generates at least three additional sizes for every uploaded image:
Thumbnail (150×150 pixels) – Used in galleries and widgets.
Medium (typically 300×300 pixels) – Ideal for content areas.
Large (typically 1024×1024 pixels) – Used for full-width images.
Many themes and plugins add their own custom image sizes, further expanding the number of versions stored. If you change your theme or modify image size settings, WordPress does not regenerate your existing images automatically, which can result in distorted or misaligned images.
That’s where you need to regenerate thumbnails in your WordPress site. It updates your website images to fit your latest settings without requiring you to re-upload them manually.
How to Regenerate Thumbnails in WordPress: (2 methods)
Generating new thumbnails for your WordPress site is super easy. You can regenerate thumbnails in your WordPress using the following methods.:
1. WordPress Plugin
2. WP CLI
1. Regenerate Thumbnails with WordPress Plugin
First, we will go through one of the easiest methods using the free WordPress plugin ThumbPress.
With this plugin, you can do many more things. Let’s start with how you can regenerate thumbnails in your WordPress.
Step 1: Install the plugin
Go to your WordPress dashboard >> Plugins >> Add New and search for ThumbPress. Click the install button and activate it.

Step 2: Enable the regenerate thumbnail settings
When your plugin is activated, navigate to ThumbPress >> Modules and enable the regenerate thumbnail option.

Step 3: Regenerate thumbnails
After you activate the feature and save it, a new tab Regenerate Thumbnails will appear. In here, you can put the number of thumbnails you want to generate.

2. Regenerate Thumbnails Using WP CLI
If you prefer a faster, more efficient way to regenerate thumbnails without relying on a plugin, WP CLI (WordPress Command Line Interface) Is your best option. This method is especially useful for developers, site administrators, or anyone managing large websites with numerous images. No more waiting, let stats with the steps:
Step 1: Access your server via SSH
If you want to use WP CLI, you need SSH access to your WordPress site using an SSH client. Download the SSH client Putty (popular for Windows) or the Terminal (Mac/Linux). I am using Putty for giving commands here.
Before connecting to your server, ensure you have your SSH login credentials, which include:
- Server IP address
- SSH port (default: 22)
- Username
- Password or private key
Now, open Putty and enter your server’s IP in the Host Name field under the Session category. You also need to set the port to 22 (or your server’s port), select SSH, name the session under Saved Sessions, and click Save for future access.

If you are using an SSH key for extra layer security, go to SSH >> Auth >> Credentials. Provide the necessary field details and save the changes.

Step 2: Navigate to your WordPress directory
Once logged in, navigate to your WordPress installation folder using the cd command. For example:
cd /var/www/html
Step 3: Run the thumbnail regeneration command
Use the following WP-CLI command to regenerate thumbnails for all images in your media library:
wp media regenerate --yes
The –yes flag skips confirmation prompts, allowing the process to run automatically. If you want to regenerate thumbnails for a specific image, use:
wp media regenerate 123
N, B. (Replace 123 with the actual image ID.)
Step 4: Wait for the process to complete
WP-CLI will go through all images and regenerate thumbnails based on your current theme’s settings. The time required depends on the number of images in your library.
Step 5: Verify the changes
Once the process is complete, visit your website and check your images to ensure they are correctly resized.
Alternative Manual Method (Re-uploading Images)
If you don’t want to use plugins or WP-CLI, another way is to manually re-upload images:
1. Delete and re-upload the affected images from the WordPress Media Library.
2. WordPress will generate new thumbnails based on your latest settings.
N.B., This method is not efficient for large websites but works for a few images.
Final Words
Regenerating thumbnails in WordPress is essential to maintaining a visually appealing and professional-looking website, especially after changing themes or modifying image sizes.
Whether you use a plugin like ThumbPress for a quick and easy solution or opt for WP-CLI for a more advanced, command-line approach, both methods ensure that your images align perfectly with your latest settings.
By following this step-by-step guide, you can efficiently regenerate thumbnails and avoid distorted or improperly cropped images. Keeping your media library updated enhances your site’s aesthetics and performance, as well as user experience.
Now that you know how to regenerate thumbnails, your WordPress images will always look clean, and well-optimized!
Frequently Asked Questions (FAQs)
Q. How do I regenerate missing thumbnails in WordPress?
With ThumbPress regenerate thumbnails you can regenerate thumbnails in minutes. Here is how:
- Install and activate ThumbPress in your website.
- Navigate to ThumbPress >> Modules and activate the Regenerate Thumbnails option.
- After saving this changes, head to the Regenerate Thumbnails tab.
- Provide the number of images you want to regenerate and click on the button.
- Finally, it will generate the missing thumbnails on your website.
Q. Is there any way to regenerate thumbnails in WordPress without plugins?
Yes, you can regenerate thumbnails in WordPress without using plugins by using WP-CLI (WordPress Command Line Interface). This method is efficient, especially for large websites, as it doesn’t require installing additional plugins
Q. Can I regenerate thumbnails with a lot of images?
Yes, using ThumbPress you can easily regenerate thumbnails with a lot of images.
Subscribe to Our Newsletter
Get the latest WordPress tutorials, trends, and resources right in your inbox. No Spamming, Unsubscribe Anytime.

Thank you for subscribing to our newsletter!

Table of Content
- How Images Work in WordPress When You Upload
- How to Regenerate Thumbnails in WordPress: (2 methods)
- 1. Regenerate Thumbnails with WordPress Plugin
- 2. Regenerate Thumbnails Using WP CLI
- Alternative Manual Method (Re-uploading Images)
- Final Words
- Frequently Asked Questions (FAQs)
- Q. How do I regenerate missing thumbnails in WordPress?
- Q. Is there any way to regenerate thumbnails in WordPress without plugins?
- Q. Can I regenerate thumbnails with a lot of images?