Skip to content

How do you update all translations using wp-cli? #5919

Closed Answered by nothingnesses
nothingnesses asked this question in How do I?
Discussion options

You must be logged in to vote

I solved it by looking at how wp-admin/upgrade-core.php updates translations, then coming up with my own command to run based on it: wp eval "require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; (new Language_Pack_Upgrader(new Language_Pack_Upgrader_Skin(['url' => 'update-core.php?action=do-translation-upgrade', 'nonce' => 'upgrade-translations', 'title' => __('Update Translations'), 'context' => WP_LANG_DIR])))->bulk_upgrade();";

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nothingnesses
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant