WP-CLI - Regenerate All Thumbnails

# import image for testing import http://s.wordpress.org/style/images/wp-header-logo.png --title="The WordPress logo" --alt="Some Alt Text" : ' Success: Imported file http://s.wordpress.org/style/images/wp-header-logo.png as attachment ID 4. ' # re-generate all thumbnails, without confirmation wp media regenerate --yes :' Found 1 image to regenerate. Regenerated thumbnails for "The WordPress logo" (ID 4). Success: Finished regenerating the image. ' # re-generate all thumbnails that have IDs between 1000 and 2000 seq 1000 2000 | xargs wp media regenerate : ' Warning: No images found. '

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.