Skip Navigation

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

Problem:
The client has a multisite WordPress installation and wants all the subsites to share the same WPML tables instead of having their own per-site prefixes. They are looking for a way to configure WPML to share the same tables across all subsites and inquire if there is a setting to force a specific prefix.
Solution:
We explained that sharing WPML tables across all subsites in a multisite installation is not possible with the current setup of WordPress and WPML. This would require significant custom adjustments both to WPML and WordPress itself. For such custom coding, we recommend consulting with WPML contractors who are familiar with WPML's inner workings. You can find a list of contractors here: https://wpml.org/contractors/

If this solution does not apply to your case, or if it seems outdated, 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 you still need assistance, please open a new support ticket at WPML support forum.

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 3 replies, has 1 voice.

Last updated by vincentP-19 5 days, 10 hours ago.

Assisted by: Dražen.

Author Posts
May 1, 2025 at 1:58 pm #16986736

vincentP-19

Background of the issue:
I have a multisite WordPress installation and I want all the subsites to share the same WPML tables instead of having their own per-site prefixes.

Symptoms:
I haven't found any documentation regarding this topic.

Questions:
How can I configure WPML to share the same tables across all subsites in a multisite installation?
Is there a setting to force a specific prefix?

May 2, 2025 at 3:12 pm #16990143

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hi,

thanks for contacting us.

You didn't find any documentation about this because it's not possible to do it due to how WordPress works.

May 2, 2025 at 3:35 pm #16990197

vincentP-19

That's a vague statement since many other plugins do it, either through customizations or have a prefix configuration.

WPML's code uses the global $wpdb variable which is managed by WP itself.
Such as:
$query = $this->wpdb->prepare( " SELECT code FROM {$this->wpdb->prefix}icl_languages WHERE english_name = %s LIMIT 1", $english_name );

Lazy and non-future-proof way would be for us to simply replace that prefix with a static one, but we're hoping we're not the only ones trying to scale WPML up.

WPML has 1000+ tables in our database of the very same data because it creates a new set every time we create a new subsite.

Has your team ever encountered a use case where a ton of subsites should share the same translations?

Could we perhaps purchase some time from a professional who knows WPML's inner workings?

Thank you for any hint!

May 6, 2025 at 6:51 am #16999340

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

Thanks for getting back.

I understand your point, but I am afraid something like this is not possible as how WP work, thus it would required further adjustment from WPML on how our product works and then also on how WP works in multsite.

Such a request would fall under custom adjustment/coding, for which we advise further checking with WPML contractors:

- https://wpml.org/contractors/

From our side, it is not something that we can advise or navigate via a few replies or snippets, it would be a much larger project that could also affect other parts of WP/plugins.

Hope you will understand.

Regards,
Drazen

May 6, 2025 at 3:47 pm #17002715

vincentP-19

Thanks for the follow-up.
We'll see if we can convert subsite tables into MySQL views and go from there (and contact a contractor for further WPML-specific customizations).