On multilingual websites, we use MultilingualPress. This plugin works with WordPress Multisite Networks and creates relationships between the various language versions of the websites on the multisite network.
Each language exists as its own site on the network, and MultilingualPress handles the connection between the sites. All types of content can be linked together across sites — post types, taxonomies, etc — and MultilingualPress integrates with the site frontend, to allow the user to switch the language on a per-“page” basis, when content is linked together.
This plugin also helps with WooCommerce and allows the network to have a single shop back-office for all languages, the docs should be read in full before setting up.
MLP guide on how to set up a site
Setting up a new site as a translation
NOTE: When doing this on a production site the script can timeout depending on the server configuration, this will mean that not all of the media files and or theme assets are migrated into the new site. We recommend working with a IT professional when doing this.
- As a super-admin, add a new site:
- Go to Network Admin -> Sites -> Add New
- Fill in the basic site info
- in the MultilingualPress section, make sure you select the correct site language (it should be the same as the language chosen in the basic site info section)
- Ensure that you check the box next to each site you want to link in the Relationships list
- If you want to copy over your existing content to the new site for later translation, choose your primary site from the dropdown labelled “Based on site”
- If you are copying your existing content, do not check the “Copy Attachments” checkbox, as this will likely cause issues – a qualified person should copy these across to the new site directly on the server
- If you are copying your existing content, you should check the boxes labelled “Connect content” and “Plugins”
- If you are copying your existing content, it may be useful to also check the box labelled “Users”, if the same users are going to be editing the content on the new site
- Click the “Add Site” button to create the new site. If you are copying your existing content, this may take a while
- If you did not check the “Users” checkbox in the previous step, you will need to manually add users to the new site
- Go to Network Admin -> Sites -> All Sites
- Edit your new site
- Go to the Users tab
- Under the “Add Existing User” heading, search for a user (type in their email address)
- Select the found user
- Choose a user role for them
- Click “Add User”
- Repeat this for every user you wish to add
- In the “Post Type Slugs” tab, you can rename post types to localise them into the site’s new language, if so desired
- You can then visit the site’s admin (from the “My Sites” dropdown in the admin bar, or by going to Dashboard -> My Sites).
- You are now free to create and/or edit your new site’s content
At this point, whilst you are able to edit content, none of the media will be visible on the site. This is because it has yet to be copied across.
Copying media to the new site
This can be done either via SSH or SFTP. For sites with a lot of media, SSH is recommended.
- Add your SSH key into the “Git push” section of the WP Engine dashboard for your site
- Wait ten minutes
- SSH into the server and rsync the media library from the “Based on site” option that was chosen in the site creation process into the new site’s directory
Configuring an existing site as a translation
- As a super-admin, go to Network Admin -> Sites -> All Sites
- Edit the site you want to configure
- Go to the MultilingualPress tab
- Set the “MultilingualPress Language” option to match the “WordPress Language” option
- Select the linked sites — the other site(s) that this site is going to act as a translation of — under “Relationships”
- Set the “hreflang” to your primary language site
- Save Changes
Editing existing content
If you copied across your existing content to a new site, or if you are setting up MultilingualPress for an existing site, you can link pieces of content together between translations. This is useful for many reasons, primarily because:
- It is better for SEO (no duplication, available in multiple languages
- It allows users to choose the language that is best for them to consume your content in
By default, MultilingualPress allows you to link pages, posts, categories, and tags. For custom post types and taxonomies, you will need to enable linkage.
- Go to Network Admin -> MultilingualPress -> Translatable [Post Types | Taxonomies]
- Check the box next to each item you wish to be able to link
- Save Changes
Link posts (of any enabled post type)
- Edit the post(s) you wish to link
- Scroll down to the bottom of the page
- You should see a “metabox” for each language site your current site is linked with
- Choose the option labelled “Select an existing Post to be used as translation in [language]”
- Search for the existing post on the other site by entering some or all of its title
- Choose “Update now” to link the posts
Link terms (of any enabled taxonomy)
- Edit the term(s) you wish to link
- Scroll down to the bottom of the page
- You should see a “metabox” for each language site your current site is linked with
- Choose the option labelled “Select an existing Term to be used as a translation in [language]”
- Choose “Update” to link the terms
Creating new content
If you have a post that you want to create a new translation of, the process is similar to that of linking existing content.
- Edit the post you wish to create a translation for
- Scroll to the bottom of the page
- Find the metabox for the site language that you are translating into
- Choose the option labelled “Create a new Post, and use it as translation in [language]”
- Switch to the “Title and Content” tab to set the destination title
- You can also choose to copy the content from the current post to the destination. This is useful if you want the post to look the same as the origin post
- You can also set an excerpt, if desired
- In the “Advanced” tab, you can choose to copy across the featured image
- You can also set the taxonomies
- Once you have finished configuring what your raw translation is going to receive, update the current post to trigger its creation
- The metabox will then update with a link to the new post, so you can then go and curate its content prior to publishing it