Skip to content Skip to sidebar

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

Problem:
The client is concerned about using a custom permalink structure (/blog/%postname%/) with WPML and whether it will cause issues, given that WPML recommends using /%year%/%monthnum%/%postname%/ for permalink structures.

Solution:
We reassured the client that using the custom permalink structure /blog/%postname%/ should not cause any problems with WPML. WordPress supports the /%postname%/ directive well for all post types, and adding /blog/ simply prepends this to each post slug. For example, a standard post in English might appear as https://www.example.com/blog/hello-world/ and in Spanish as https://www.example.com/es/blog/hola-mundo/. Pages and custom post types will behave correctly too, with the language code consistently appearing right after the domain. We recommend testing any new configurations on a staging or development site before implementing them on a live site.

If this solution does not resolve your issue or seems outdated, please check the related known issues and confirm that you have the latest versions of themes and plugins installed. If problems persist, we highly recommend opening a new support ticket here.

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 reply, has 0 voices.

Last updated by Waqas Bin Hasan 9 months, 3 weeks ago.

Assisted by: Waqas Bin Hasan.

Author Posts
March 4, 2025 at 3:16 pm #16774893

socialbee-labs-srlV

Background of the issue:
I was going through your list here (https://wpml.org/home/minimum-requirements/?utm_source=automation&utm_medium=emails&utm_campaign=getting-started&utm_content=cms-agency-account) to make sure we fulfill all the requirements before installing WPML on our website, and I saw this about permalinks: "Other permalink structures may work too but can cause problems on different configurations. In all our sites, we are using /%year%/%monthnum%/%postname%/."

For our website, we use this custom Permalink structure: /blog/%postname%/. Will this be a problem? We can't change our permalink structure since we have over 400 articles that would need redirects. Plus, I'm not sure how this would affect content updates and publishing date changes.

Symptoms:
Potential issues with using a custom permalink structure /blog/%postname%/ instead of the recommended /%year%/%monthnum%/%postname%/.

Questions:
Will using the custom permalink structure /blog/%postname%/ be a problem with WPML?
Do you mainly recommend the structure /%year%/%monthnum%/%postname%/ to prevent conflicts between posts and pages, or should we expect other permalinks issues once we set up WPML?

March 5, 2025 at 10:45 am #16777878

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

Apparently there should be no problem by using that permalink structure. Since WordPress itself offers /%postname%/ (Post Name) directive which works perfectly well for all post types. Using /blog/%postname%/ just prepends /blog with every post slug (not to confuse with Pages).

For example, in this case the "Hello World" post (post_type=post) 'll have following URLs for default (English) and secondary (Spanish) languages:
- hidden link
- hidden link

While the "Sample Page" (post_type=page) 'll resolve to the following (notice no /blog in the URL):
- hidden link
- hidden link

For a custom post type's "Test Article" post (post_type=article, notice /blog/article in the URL):
- hidden link
- hidden link

In all these examples, the language code (i.e. /es) is consistent which comes right after the main domain URL, while permalink structure affects differently for standard Posts and Pages, as well as, Custom Post Types.

In short, your custom permalink structure (/blog/%postname%/) shouldn't have a problem in first place.

However, we recommend trying anything new on a staging/dev site first to understand the real outcomes, adjust and finally adopt for your live site.

Regards.