How to assign a language via WP-CLI

Starting from MultilingualPress version 4, assigning a language to a subsite through WP-CLI is possible. Open your shell and go to the WordPress directory where the MultlingualPress plugin is installed and activated.

From there, if you want to assign to the sub-site with id 41, the Spanish language, for example, you can use the following command:

wp mlp setLanguage --site-id=4 --language='es-ES'

For further information, you can use the following online help:

wp mlp setLanguage help
Inpsyde
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.