This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with WPML translation credits not showing correctly in the staging environment after moving from staging to production using WPEngine. Despite having a large number of credits available as per their WPML account, the staging site shows zero credits available. Solution: 1. Ensure each site has a unique site key for each URL. Avoid using custom logic for site registration. 2. Consider merging pages so they share translation memory, glossary, and credits. More details can be found here: Automatic Translation Subscription for Multiple Sites. 3. If issues persist, unregister the website from WPML.org, unregister the key from the staging site, and then re-register it. This helps in correctly displaying the website under your profile and adding credits. 4. Currently, you may need to deregister and re-register staging and production sites each time you move from staging to production. We are aware of this issue and are working on improvements for future versions.
If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. Also, check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm 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.
Symptoms:
In staging, I can't use my translation credits. WPML translation shows I only have 372 credits left, but my WPML account indicates I should have 68904.
Questions:
How can I fix the issue of incorrect translation credits in staging?
How can I prevent this issue from occurring again?
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello,
Take note that each site needs a unique site key for each site URL.
Instead of using custom logic to register the sites, I would suggest that you merge the pages so that they share translation memory, glossary, and credits with each other.
Prior context:
- I use WP engine to manage my website. I make changes in a staging environment, and then push to the production environment via WPEngine.
- The above has been extremely problematic with WPML. It doesn't seem to handle promoting a site from staging to production via WPEngine. Each time I did so, the banner saying 'this is a staging site' appeared at the bottom of my production website. Your team then advised that I needed to reregister sites and keys every time to remove that.
- To avoid that pain, one of your support team advised that I try this, which I did: https://wpml.org/faq/automatic-wpml-registration-using-php-for-easy-moves-between-production-development-and-staging/.
Now, the problem I have is that I should have credits available in the staging environment. However, when I log in and navigate to translation management, it tells me I have 0 credits available. So I can't use any of my 68904 credits.
Can you please assist?
To reiterate - I want to make changes in my staging environment 1st, then promote to production via WPEngine when I am happy. I don't want to have to **** around with registering new keys every time I promote a change or new blog article to production. Is that possible? I would also like to be able to use my translation credits.
Thanks for getting back. The site keys for your websites are okay, but when you moved website, it created a new instance in our ATE system, since it looks this a new website / copy of your production that you moved at the time. Now you have real staging site but in your WPML.org still old instance is showing.
I am afraid this a known problem, and we are working on improving this process when moving website from staging to production and viceverse.
Now the best way, would be to unregister your website from WPML.org, unregister key from staging site and then re-register it again, so you see correct website under your profile and add credits.
I know this is not the solution or reply you expected, but we are working on improving this in the future versions.
1. Does this mean I have to update my keys via sftp every time I promote staging to production?
2. Will I have to deregister and reregistermy staging annd production sites every time I move staging to production? Surely not? That’s why I’ve been reaching out. To avoid that.
1) In theory, you should not, but you should also not migrate wp-config.php where you have set your WPML licence key for that website, so it always stays the same for the staging site.
2) At this time, yes. As said, we are still working on this and improving this process, so each time you migrate your new instance to the staging site, you will be asked if this is a moved website or a copy, which might then create a new instance from our side.
I am afraid that is how it is for now, and we have tickets to improve and fix this in the future.