Sometimes it is necessary to regenerate thumbnails or the images in smaller resolutions. This is necessary, for example, if you have changed the resolution values for the step sizes under Settings -> Media.
There are a number of plugins that will do this for you e.g. Regenerate Thumbnails. However, if you don’t want to install a plugin for it, there is an easy way via WP-CLI.
With the following command we initiate the regeneration:
wp media regenerate
Now you have to confirm with yes via the console. To anticipate the question, there is the –yes parameter for that:
wp media regenerate --yes
That’s it! Now we can watch the progress in the console edition. By the way, WP-CLI can be wonderfully used in our hosting packages. Copy WP-CLI to it, log in via SSH and use WP-CLI.
With WP-CLI many tasks can be automated e.g. scheduled updates or backups. Feel free to contact me, I will be happy to support you.