Title: Regeneration vs WP-CLI
Last modified: March 20, 2020

---

# Regeneration vs WP-CLI

 *  Resolved [mattiasf](https://wordpress.org/support/users/mattiasf/)
 * (@mattiasf)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/regeneration-vs-wp-cli/)
 * I had an issue using WPML where some images would not return the correct size
   of an image, despite the image actually being there. It has been described more
   in detail here: [https://wpml.org/forums/topic/regarding-missing-thumbnails-issue/#post-5726525](https://wpml.org/forums/topic/regarding-missing-thumbnails-issue/#post-5726525)
   and here [https://wpml.org/forums/topic/correct-size-of-media-attachment-not-being-returned](https://wpml.org/forums/topic/correct-size-of-media-attachment-not-being-returned)
 * I noticed the plugin author recommends using the WP Cli to regenerate images,
   and that’s what I initially did (3 or 4 times), however, the issue still persited.
   When I finally took time to try the plugin, and have it run for a whole day, 
   the issue resolved it self.
 * It wonders me, shouldn’t this plugin and the WP Cli do the same thing? Apparently
   this plugin does something different (and better) than the WP Cli.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Alex Sanford](https://wordpress.org/support/users/alexsanford1/)
 * (@alexsanford1)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/regeneration-vs-wp-cli/#post-12575716)
 * I’m glad to hear that Regenerate Thumbnails worked to solve your problem!
 * I agree that the CLI tool does essentially the same thing as this plugin, but
   obviously as a CLI interface rather than a UI within WP Admin. I am unsure what
   the underlying differences are. Sounds like the problem you experienced could
   be an issue in the integration of WPML and the `wp media regenerate` command.
   Perhaps it is even some functionality within WPML that is only loaded in the 
   CLI environment? It could also be a bug in the CLI.
 * One thing you could potentially try is disabling WPML and seeing if the CLI tool
   works then?
 * In any case, it sounds like there isn’t an issue for us to resolve on our end,
   so I will mark this as resolved. Please feel free to post here if there are further
   issues we can help you with!
 *  [Hubert Nguyen](https://wordpress.org/support/users/hubertnguyen/)
 * (@hubertnguyen)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/regeneration-vs-wp-cli/#post-12699004)
 * [@mattiasf](https://wordpress.org/support/users/mattiasf/) made a great point.
   
   [@alexsanford1](https://wordpress.org/support/users/alexsanford1/), I’m curious,
   would you consider adding WP-CLI support for this plugin?
 *  Thread Starter [mattiasf](https://wordpress.org/support/users/mattiasf/)
 * (@mattiasf)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/regeneration-vs-wp-cli/#post-12712204)
 * Hi [@alexsanford1](https://wordpress.org/support/users/alexsanford1/),
 * I believe the WPML team might have hard-coded some things into your plugin, or
   into WordPress itself, that doesn’t run in CLI mode (as your pointed out yourself–
   just the reverse).
 * Because running the WP CLI command didn’t work, but WPML told me to try your 
   plugin, and then the plugin didn’t appear.
 * The issue was that some sizes of images in other languages was not correctly 
   retrieved, despite the image actually existing in FTP and database.
 * WPML is just one great headache 🙂
 *  Thread Starter [mattiasf](https://wordpress.org/support/users/mattiasf/)
 * (@mattiasf)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/regeneration-vs-wp-cli/#post-12712209)
 * [@hubertnguyen](https://wordpress.org/support/users/hubertnguyen/) I would use
   the native WP Cli method to convert images in general, as it is much faster. 
   Simply use `wp media regenerate` (see more here [https://developer.wordpress.org/cli/commands/media/regenerate/](https://developer.wordpress.org/cli/commands/media/regenerate/))
 *  Thread Starter [mattiasf](https://wordpress.org/support/users/mattiasf/)
 * (@mattiasf)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/regeneration-vs-wp-cli/#post-12789640)
 * [@alexsanford1](https://wordpress.org/support/users/alexsanford1/) I have a related
   question here: [https://wordpress.org/support/topic/rebuild-not-regenerate-thumbnails-via-cli/](https://wordpress.org/support/topic/rebuild-not-regenerate-thumbnails-via-cli/)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Regeneration vs WP-CLI’ is closed to new replies.

 * ![](https://ps.w.org/regenerate-thumbnails/assets/icon-128x128.png?rev=1753390)
 * [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/regenerate-thumbnails/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/regenerate-thumbnails/)
 * [Active Topics](https://wordpress.org/support/plugin/regenerate-thumbnails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/regenerate-thumbnails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/regenerate-thumbnails/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [mattiasf](https://wordpress.org/support/users/mattiasf/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/regeneration-vs-wp-cli/#post-12789640)
 * Status: resolved