Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:

The client wants to show the default language in the /en/ subdirectory on their site. Although the page loading works with this structure, the internal links for the original language do not include the /en/ directory, which breaks the internal linking structure.

Solution:

We recommended the client to first resave the Language URL settings under WPML >> Languages >> Language URL format, then go to Settings >> Permalinks and resave those settings as well. After these steps, it's crucial to clear all types of caches to check if the issue persists.

If internal links still do not reflect the /en/ directory, we suggested editing the homepage in English and making minor content changes to see if the links update accordingly.

If this does not resolve the issue, using a plugin like Better Search Replace was advised as a last resort, with a strong recommendation to take a full site backup before attempting this.

Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please do not hesitate to open a new support ticket for further assistance.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 1 replies, has 0 voices.

Last updated by Bigul 2 months, 2 weeks ago.

Assisted by: Bigul.

Author Posts
July 14, 2025 at 4:04 pm

wouterS-4

Background of the issue:
I want to show my default language in the /en/ subdirectory on my site hidden link. This is already working for page loading, but internal links for the original language do not include the /en/ directory, which breaks the internal linking structure. I have not set anything under WPML / Languages / Language URL format.

Symptoms:
Internal links for the original language do not have the /en/ directory, breaking the internal linking structure.

Questions:
How can I add /en/ to all default language (internal) links?
If I then save my permalinks, will all links across the website be updated?
How can I sync all secondary/third language pages/posts/products/links/etc with these (updated) original ones?

July 15, 2025 at 12:54 pm #17237776

Bigul

Hello,

For your kind information, our team has confirmed that the easiest and most practical workaround in this case is to perform a search-and-replace of internal links using a plugin like https://wordpress.org/plugins/better-search-replace/

However, since these types of changes are usually done during the initial setup of the site (not after a large amount of content is already in place), it is very important to handle this carefully, with robust logic, to avoid any issues. Therefore, please take a full site backup (mandatory) before the changes.

An alternative workaround will be writing a custom PHP script that detects whether the content is in the default language (https://wpml.org/wpml-hook/wpml_current_language/) and then replaces the links accordingly. Thank you for your kind understanding.

--
Thanks!

Bigul