• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Logo

CITROWEB

First choice for your online presence

  • home page
  • Services
    • Web design, web development and consulting
    • Online stores with WooCommerce
    • Technical support for WooCommerce stores
    • Search engine marketing
      • SEO: Your website receives more relevant visitors
      • SEA: Search engine advertising for your website
    • Web hosting packages and domains
  • Blog
  • Contact us
Home » Blog » Regenerate thumbnails in WordPress via WP-CLI

Regenerate thumbnails in WordPress via WP-CLI

22. December 2021

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.

Filed Under: development, WordPress

Primary Sidebar

Search

Recent Posts

  • Remove “Thank you for your trust in WordPress” from the bottom of the dashboard
  • Remove WordPress logo from toolbar
  • Change login cookie lifetime in WordPress
  • WordPress multisite and cookie settings in wp-config.php
  • Update GUIDs in WordPress after domain move

Footer

Logo




© 2023 CITROWEB
  • Data protection
  • imprint
  • Deutsch