Skip Navigation

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

Problem:

WPML plugins get unexpectedly unregistered from the site.

Solution:

The problem happened when the user migrated the live site to the staging site. In this case, all the DB was migrated as well. And this is caused the registration key to change and, therefore, the site to get unregistered from automatic updates.

1. Generate a different site-key for each of the different domains of the site. Go to your Account page to generate the site-keys. This you have probably dome already.

2. Add the different site-keys to each of the environments in their respective wp-config.php files, using the following statement:

define( 'OTGS_INSTALLER_SITE_KEY_WPML', 'your-site-key' );

The value that you set using the OTGS_INSTALLER_SITE_KEY_WPML takes precedence over the value in the database. So, when you move the database between domains, you will not need to update the registration.

Relevant Documentation:

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 23 replies, has 3 voices.

Last updated by alexanderA 1 year, 4 months ago.

Assigned support staff: Itamar.

Author Posts
September 29, 2019 at 11:31 am #4660643

alexanderA

Thanks for the reply, and understood on questions 1 and 2. Regarding question 3, you said,

>> by the way if you want you can manually update the plugins that will fix

Yes I realize I can update manually. But I paid for a plugin that advertised automatic updates, so I would prefer if the automatic updates were working. Updating manually requires a fair amount of time. So if this issue is due to a deficiency with WPML, I don't feel I should spend *my* time updating manually. Furthermore, this issue has already occurred once before, about 3 months ago. At that time I updated manually. I don't want to continue to experience this issue, only for WPML support to shrug their shoulders every time and say, "Just update manually." I paid a lot of money for a product with automatic updates, so I don't think it's unreasonable to demand working automatic updates.

Thank you.

October 1, 2019 at 10:40 am #4671099

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Yes, you are right.
Automatic update should work after you manually updated once.

Our developers are looking in your specific issue.
We will update to again once we found something from their side.

Regards,

October 1, 2019 at 11:08 am #4671461

alexanderA

>> Our developers are looking in your specific issue.
We will update to again once we found something from their side.

OK. Hopefully there is a resolution soon. I will check back-in on Friday.

October 2, 2019 at 11:09 am #4679543

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi.

Are you sometimes merging the staging site with the live site and vice versa?
If so, then this explains the problem that you were describing that the site gets deregistered. What happens is that the site key that is stored in the DB (of either the staging or the live site, depends on the direction of merging) moves to the DB of the destination site, and therefore the site gets deregistered. In this case, please follow our instructions at the following link on Automatic WPML registration using PHP for easy moves between production, development, and staging.
https://wpml.org/faq/install-wpml/#registration-using-php

Please check this and let me know if this might be the issue with your case.

Thanks,
Itamar.

October 2, 2019 at 11:37 am #4679839

alexanderA

>> Are you sometimes merging the staging site with the live site and vice versa?

Occasionally we copy the live site to the staging site. During that process, the files and database of the staging site are overwritten with those from the live site. Are you saying that could be the cause of my issue? If so, I don't understand the link you sent. Can you clarify? Is that link instructing me how to fix my current issue, or how to prevent this from occurring again, or both, or neither?

October 2, 2019 at 2:34 pm #4681507

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Yes, at this link there is an explanation of how to prevent this from occurring again when you copy the live site to the staging site. Here is what you need to do.

1. Generate a different site-key for each of the different domains of the site. Go to your Account page to generate the site-keys. This you have probably dome already.

2. Add the different site-keys to each of the environments in their respective wp-config.php files, using the following statement:

define( 'OTGS_INSTALLER_SITE_KEY_WPML', 'your-site-key' );

The value that you set using the OTGS_INSTALLER_SITE_KEY_WPML takes precedence over the value in the database. So, when you move the database between domains, you will not need to update the registration.

Please let me know if this is clear enough.

Regards,
Itamar.

October 3, 2019 at 7:45 am #4685467

alexanderA

OK thanks for that. I will try that and see if it prevents the issue from occurring in the future.

So can you remind me how to resolve the issue I am experiencing now?

October 3, 2019 at 4:59 pm #4689927

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi.

I'm sorry, but I'm not sure what it was.
Can you please describe again the issue that you are having now?

Oh! Maybe you mean the registration issue on hidden link.
If so, then please go to https://wpml.org/account/sites/ and check what the registration key for hidden link and hidden link is. Copy those keys and register hidden link again. One of those keys should work.

Alternatively, to prevent the issue from occurring in the future when you merge the dev site to the live or vice versa, please use the method of registering the key in the wp-config.php file. The method that is mentioned in my last reply.

Regards,
Itamar.

October 4, 2019 at 7:29 am #4693373

alexanderA

>> Oh! Maybe you mean the registration issue on hidden link.

Yes exactly.

>> If so, then please go to https://wpml.org/account/sites/ and check what the registration key for hidden link and hidden link is. Copy those keys and register hidden link again. One of those keys should work.

OK that worked.

>> Alternatively, to prevent the issue from occurring in the future when you merge the dev site to the live or vice versa, please use the method of registering the key in the wp-config.php file. The method that is mentioned in my last reply.

Yes got it. I'm working on that. Let's keep this ticket open for another week while I implement that. I may have questions during the process. When I'm done, I'll notify you here.

October 4, 2019 at 9:51 am #4694621

alexanderA

In your previous instructions, you indicated:

>> Generate a different site-key for each of the different domains of the site. Go to your Account page to generate the site-keys. This you have probably dome already.

I have indeed already done this.

>> 2. Add the different site-keys to each of the environments in their respective wp-config.php files, using the following statement: `define( 'OTGS_INSTALLER_SITE_KEY_WPML', 'your-site-key' );`

To be clear, during this exercise, my live site was never de-registered--only my dev site. And we are fairly sure that occurred when I copied my live database to my dev database. In light of that, would it be OK to add the above code to my dev site only? If I ensure my live site database is never overwritten, then this should be acceptable--correct?

October 6, 2019 at 11:05 am #4702231

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi.

Yes, in light of that, it would be OK to add the above code only to my dev site.

Regards,
Itamar.

October 7, 2019 at 5:17 am #4704223

alexanderA

OK thanks. We can consider this resolved.