Skip to content

Regenerate media thumbnails when importing any WordPress backup - #592

Merged
sejas merged 8 commits into
trunkfrom
fix/jeptack-import-thumbnails
Oct 11, 2024
Merged

Regenerate media thumbnails when importing any WordPress backup#592
sejas merged 8 commits into
trunkfrom
fix/jeptack-import-thumbnails

Conversation

@sejas

@sejas sejas commented Oct 10, 2024

Copy link
Copy Markdown
Member

Proposed Changes

  • It runs wp media regenerate --yes WP-CLI commands after importing a Jetpack, Local, Playground or .wpress backup, fixing the thumbnails in ``
  • There is a new import step for Jetpack sites that say Regenerating media…
  • Add tests for the new step

If we observe other backups do not include the thumbnails, we can execute the same command for other backup types.

Testing Instructions

  • Download a Jetpack backup or .wpress from an atomic site with images. You can use the activity log for that.
  • Run npm start
  • Import that backup into a new site (Add new site button) or existing site (Import/Export tab)
  • Observe there is a new last step says Regenerating media…
  • Start the site and go to wp-admin
  • Navigate to media
  • Observe all the thumbnails are correctly visible
import.jetpack.backup.and.regenerate.media.mp4

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@sejas sejas self-assigned this Oct 10, 2024
@sejas
sejas requested a review from a team October 10, 2024 09:47
@wojtekn

wojtekn commented Oct 11, 2024

Copy link
Copy Markdown
Contributor

If we observe other backups do not include the thumbnails, we can execute the same command for other backup types.

I can't reproduce the issue for my blog's Jetpack Backup, but I can reproduce it for my .wpress backup. Can we run this consistently for all import formats?

@sejas sejas changed the title Regenerate media thumbnails when importing a Jetpack backup Oct 11, 2024
@sejas

sejas commented Oct 11, 2024

Copy link
Copy Markdown
Member Author

@wojtekn I've updated it 79f03bf, now it should work also for .wpress
There was an error about wp-config.php no existing, but now it's fixed on f9cc231

@wojtekn wojtekn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works well for all supported import types - thumbnails are visible in WP Admin for each site.

@sejas
sejas merged commit 0131b1c into trunk Oct 11, 2024
@sejas
sejas deleted the fix/jeptack-import-thumbnails branch October 11, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants