Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update wordpress translations via wp-cli

I'm using docker with the wordpress:cli image to perform many actions like updating, activating themes and plugins, etc, on the system.

I come up with a brand new updated system that has everything in it I want, except for the translations. Wordpress-admin informs me that there are updates for translations and I can manually click and update but I obviously want to continue with the cli-style.

Is there any command to achieve such? Following the documentation

(e.g. https://developer.wordpress.org/cli/commands/language)

I cannot find anything.

Can this be done in any way?

TIA

like image 355
p0rter Avatar asked May 09 '19 15:05

p0rter


Video Answer


2 Answers

A bit belated, but it seems that the answer depends on which translations are out of date (core, theme or plugin).

The following two commands did the trick for me :

wp language plugin --all update
wp language theme --all update

Hope that helps.

like image 160
Giles Bennett Avatar answered Sep 29 '22 23:09

Giles Bennett


Despite the "active" status of wp language plugin list --all, translations may be not really installed. I finally managed it with this for the es_ES sites:

wp language plugin install --all es_ES

The Admin panel missage dissapears and some unworking translations runs fine.

like image 1
Pitufo Avatar answered Sep 30 '22 23:09

Pitufo