Skip to content

add a new command 'wp rocket deploy' to trigger everything that's needed after files are pushed between environments #66

@alfonso100

Description

@alfonso100

Is your feature request related to a problem? Please describe.
When pushing changes between environments, from staging to production or vice versa, users need to login to "finalize" the migration. for those users, usually the console is involved, and they are using some sort of CI pipeline to run the deplyments, a good percentage are wp-cli users, so this could be done with a command.

Describe the solution you'd like
We could add a CLI command to trigger regenerate_configuration after a migration between environments
https://github.com/wp-media/wp-rocket/blob/975503df515ea4650cc4791e7018519315e32c86/inc/Engine/Admin/DomainChange/Subscriber.php#L30

Describe alternatives you've considered
In a recent case, the full sequence of commands we had to run is this:

wp plugin deactivate wp-rocket
wp plugin activate wp-rocket
wp rocket regenerate --file=config
wp rocket regenerate --file=htaccess
wp rocket regenerate --file=advanced-cache
wp option delete wp_rocket_last_base_url
wp transient delete rocket_domain_changed
wp rocket clean

Additionally, we'd need to clear the used CSS, Optimize Critical Images, and Automatic Lazy Render tables after a deploy,
RUCSS was requested here:
#52

Additional context
Slack thread: https://wp-media.slack.com/archives/C08N8J6VC/p1726485688898999

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions