Skip Navigation

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

Problem:
You need to migrate WPML configurations from a 'DEV' environment to 'STAGING' and then to 'PRODUCTION', without copying the content.
Solution:
To achieve this, you should copy your

wp_options

table from 'DEV' to your other environments. This table contains the WPML configurations. The content itself, which you do not wish to copy, is stored in the WPML-specific _icl tables. Additionally, to sync the site key across your environments, you can use a PHP constant. For detailed instructions on setting this up, please refer to the documentation here: Automatic WPML Registration Using PHP.

If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. We also highly suggest 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. For further assistance, please visit our support forum 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.

This topic contains 3 replies, has 2 voices.

Last updated by Marcel 9 months, 2 weeks ago.

Assisted by: Marcel.

Author Posts
August 22, 2024 at 4:08 am #16092502

ronN-2

Background of the issue:
We have multiple environments: dev, staging, and production. We have configured WPML as we want/need it to be like on 'DEV'. We need a way of taking that configuration and put it into 'STAGING' and then 'PRODUCTION'. We DO NOT want to copy the content, ONLY the configuration.

Symptoms:
I have not found any documentation to achieve this.

Questions:
How can we migrate WPML configurations from 'DEV' to 'STAGING' and 'PRODUCTION' without copying the content?

August 22, 2024 at 7:00 am #16092901

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hi,

the configuration will be synced once you copy your wp_options table. The content itself is saved in the WPML-specific _icl tables.

The site key can be synced via a PHP constant described here: https://wpml.org/de/faq/automatic-wpml-registration-using-php-for-easy-moves-between-production-development-and-staging/.

Best Regards
Marcel

August 26, 2024 at 4:52 am #16102298

ronN-2

Is there a process to selectively migrate just the WPML options in wp_options that you are aware of? There will likely be other items in production we wouldn't want to just override with a full migration of the table verbatim.

August 26, 2024 at 7:29 am #16102874

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hi,

not really. We have different entries starting with wpml_, icl_, otgs_ etc. I would also not recommend that, as the content holds serialized data of your URLs, which could cause issues. It would be better to automate a complete DB migration and run some scripts to overwrite the URLs afterward (search-replace).

Best Regards
Marcel