You can use WPML on multisite setups, whether you want WPML on the whole network or just individual subsites. Each subsite can use different languages and translation settings.
WordPress Multisite is a feature that allows you to create and manage multiple WordPress websites from a single WordPress installation. You can create multilingual multisite setups using WPML.
WPML supports the following multisite/language URL setups:
Subsites in directories + languages in directories, for example:
Subsites in directories + languages in subdomains, for example:
Subsites in subdomains + languages in directories, for example:
Subsites in subdomains + languages in domains (e.g. subsite.fr.test.com) is possible as long as the domain is properly pointed via DNS entry and it does not conflict with another subsite. However, this setup relies on experimental logic and may be prone to bugs.
Please note, it is not possible to have a mix of languages in domains and languages in directories for the same subsite.
Registering your main site first allows you to use the same WPML site key for all the subsites in the same multisite setup. When you activate and configure WPML on your subsites, they will be registered automatically.
Activate the OTGS Installer plugin either for your whole network or just your main site.
After registering, you can download WPML Multilingual CMS to your network. You can also deactivate and remove the OTGS Installer plugin.
Finally, you can activate WPML on your whole network by going to Network Admin → Plugins.
Or, if you don’t want WPML on your whole network, you can go to your subsites to activate it just for those subsites. Just like any other network plugins, when WPML is network-activated in multisite mode, it cannot be activated or deactivated individually for subsites.
Configuring WPML on Each Subsite
You must configure WPML individually on each of your subsites. To do this, go to your subsite and click Configure WPML. This starts the WPML setup wizard, which walks you through choosing your site languages and setting all your translation options. You can choose different languages and translation options for each subsite.
Using Languages in Domains on a WordPress Multisite
This section applies to if you use languages in domains such as the following:
WPML allows you to use a different domain per language when using WordPress in the multisite mode, but it requires a drop-in plugin to do so. A drop-in plugin is a tiny PHP file that loads earlier than other themes and plugins to allow you to modify core WordPress functionality on your site.
The drop-in plugin you need is called sunrise.php. To install the drop-in plugin:
Copy the sunrise.php file from WPML’s sitepress-multilingual-cms/inc/tools/ folder to your wp-content folder. If you already have a sunrise.php file in your wp-content folder, add the content from WPML’s sunrise.php file to the existing file. Do not place it after a return statement.
Add the following line to your wp-config.php file:
If you need to change the value to on, make sure that you don’t enable functionality that you do not want in your existing (but inactive) sunrise.php file.
Make sure that your domains have the correct DNS set and they point to the same folder as the domain of the default language. For instructions, follow this tutorial on setting up domains per language.
The sunrise.php drop-in plugin helps with the following:
Domain resolution: WPML needs to resolve the domain used in the URL for each request, which isn’t a default WordPress feature. The drop-in plugin intercepts the query WordPress uses for this purpose and filters it to accommodate different domains for each language.
Compatibility with multisite: In a WordPress multisite setup, domains for secondary languages are not stored in the default wp_blogs or wp_site tables. They are stored in the icl_sitepress_settings value in the wp_options table for each site. The drop-in plugin helps WPML access this information and match the requested domain with the corresponding language.
Early intervention: Drop-in plugins are executed early in the WordPress loading process. This allows them to modify the behavior of WordPress before regular plugins and themes are loaded, ensuring the correct domain and language settings are applied before other processes take place.
Performance optimization: As drop-in plugins load early in the process, they can optimize performance by handling domain and language resolution before other plugins or themes get involved. This reduces potential conflicts and ensures a smoother experience for both users and administrators.
Multisite Domain Mapping
Domain mapping allows you to assign custom domain names to each subsite in your multisite network, such as french-site.com, spanish-site.com, and italian-site.com. WordPress handles domain mapping natively, simplifying the process for you. To learn more about domain mapping and how to set it up, refer to the official WordPress documentation.
Using Automatic Translation on Multisites
With WPML, you can speed up your translating by using automatic translation powered by DeepL, Google, or Microsoft.
If you want to use automatic translation on a multisite setup, you can sign up for pay-as-you-go. You can sign up for each subsite separately, or connect your sites to share the same payment information across all your subsites.
If you ever need to reset WPML on any of your subsites, you can do so from your Network Admin. Click on WPML, and from here you can reset any of your individual subsites. Be sure WPML is activated on your main site to see the WPML menu.
If you encounter any issues while setting up your WordPress multisite with WPML, contact our support team for assistance.