Installing & Managing WordPress Language Packs Using WP-CLI – Nexcess

The WordPress active language is fairly easy to maintain, and here is a guide on managing language packs using the WP-CLI installed on all of our servers.
Get fast, reliable hosting for WordPress
Power your site with the industry’s fastest, most optimized WordPress hosting

The WordPress active language is fairly easy to maintain, and here is a guide on managing language packs using the WP-CLI installed on all of our servers.
Introduction to Installing & Managing WordPress Language Packs Using WordPress Command Line Interface (WP-CLI)
In today’s world, where everything is almost always multilingual, we need to consider doing the same for the websites that we own or manage.
Since almost 37% of all the world’s websites run on the WordPress Content Management System (CMS) and Nexcess is one of the premier global providers in the Managed WordPress industry, here is a guide on managing language packs using the WordPress Command Line Tool (WP-CLI) that is installed on all of our servers.
Requirements:
- Nexcess account
- Any Nexcess Plan that supports the WordPress CMS
- Secure Shell (SSH) access
Your SSH access can be obtained by following this guidance in the Locating your SSH/SFTP Credentials for your Nexcess Cloud Account article.
Everything else is already installed and should be running as expected in the following parts of the tutorial.
Managing WordPress Languages in 3 Areas: Core, Themes & Plugins
- WordPress Core Language: The Admin Panel and the general installation of the WordPress supports most of the world’s languages.
- WordPress Theme Language: Each theme can have different languages that depend on the theme developers.
- WordPress Plugin Language: Each plugin can have different languages that depend on the plugin developers.
Each of those areas 1-3 above has their respective commands that can be used to download, activate, and deactivate languages.
Managing the WordPress Core Language Using WP-CLI
In this use case, we will be using the following temporary domain to show you how it works:
- Domain: 893f3aa5f1.nxcli.net
- WordPress Installation Path: /home/$username/$domain/html
- Our Path: /home/adea7c0e/893f3aa5f1.nxcli.net/html
Navigate to the path using the following command:
To see the available SUBCOMMANDS that can be executed on WordPress core regarding languages, we can use the following command:
The above command will generate a list with available SUBCOMMANDS, some examples, and additional parameters that can be used with the command:
The following command shows all the available languages for the core installation that are available:
To check which language is installed on our site for the WordPress core we can use the following command:
We can see that the additional language of en_GB English (UK) is installed from the above command, but that does not mean it is the active language by the site since WordPress comes preinstalled with the language of en_US
Additional resources
What is managed WordPress hosting? →
Get details and decide if managed WordPress hosting is right for you.
Must-have web development plugins to create WordPress websites at scale →
Explore the best web development plugins to enhance functionality, improve performance, and streamline your WordPress site.
A complete guide to WordPress shortcodes →
Shortcodes make life easier. Learn how to get started!