Skip Navigation

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

Problem:
The client is unable to add a new plugin on the production website to register a new WPML API key after deleting the old one. The website crashes when trying to remove restrictions for adding new plugins. The client also inquires about changing the API key directly in the database and retrieving a deleted API key.
Solution:
If you're experiencing issues with your WPML API key after migration and are unable to register a new one due to restrictions, we recommend clearing all local and server caching, which might be causing the issue. If you need assistance with server caching, contact your hosting support.

To add a new WPML key directly, you can insert it into your

wp-config.php

file. Detailed instructions are available in our documentation:
Automatic WPML Registration using PHP

Unfortunately, once a WPML key is deleted, it cannot be recovered. However, you can generate a new one, which will be automatically created.

Changing the API key in the database is possible but not recommended due to its complexity. If you still wish to proceed, you can follow the steps provided by another user in this forum post:
Change API key in the database

For site migrations, we suggest using the Duplicator plugin, which ensures a proper migration process. You can find the plugin and documentation here:

If this solution doesn't seem relevant to your situation, please open a new support ticket with us, and we'll be happy to assist you further.

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 2 voices.

Last updated by Mihai Apetrei 1 year, 7 months ago.

Assisted by: Mihai Apetrei.

Author Posts
November 1, 2023 at 9:36 am #14706157

kenyT

I had a development API key registered to my website. When it went to production I changed the url to production website and also chose "production" but the message "in development" didn't change. I thought maybe a new API key was needed so I created a new one and deleted the old one.

Now the problem is that I can't add "Add New" plugin on the production website so I cannot register the new API key. When they try to remove the restrictions for me to "Add new" plugin so I can register the API on production the website crashes because of internal problems.

So right now I don't know how to change the API key. Is there a way to change the API from the database? This would be a life saver.

And another question: is it possible to retrieve my deleted API key? This one is still added in the production website and I know now what the reason was why it was still on development. The url was missing a part.

November 2, 2023 at 7:09 pm #14720647

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

Not sure what happened here but there's a chance that something went wrong in the migration process because, removing the WPML key shouldn't create any internal error or server errors.

The fact that the dev message was still showing in the footer even after marking the key as PRODUCTION can be caused most of the time by local or server caching. All the caching needs to be cleared on the site and on the server (for the server, you might need the help of the hosting support).

In regards to your question, you can also add a key in the wp-config.php file as shown in our documentation URL below:
https://wpml.org/faq/automatic-wpml-registration-using-php-for-easy-moves-between-production-development-and-staging/

There's no way to recover WPML keys, once they are removed by a customer, they are removed forever and when you generate a new one, it gets automatically generated.

You could also change it inside the database (as this user explains here: https://wpml.org/forums/topic/cannot-reset-the-site-key-no-plugin-install-screen/#post-12594425) but it's a bit more advanced and I wouldn't recommend that. My guess is that the issues that you are experiencing are not related to the key but to some data that was not migrated properly in the migration process.

For migrating/duplicating sites, our recommendation is to use the following plugin:
- https://wordpress.org/plugins/duplicator/

Documentation can be found here:
hidden link

Here is a small tutorial on how to use Duplicator:
hidden link

This should perfectly migrate your website maintaining the exact same setup and also taking care of the search and replace process so that the old links will be overwritten with the new URLs of the new domain you are migrating to (in case you are also changing the domain and not only the server).

I hope that you will find this helpful 🙂 I use only Duplicator each time I want to migrate WP websites. They also have a premium version but if you don't have a huge website with a huge database, the free version should work fine.

Good luck and have an amazing rest of the day!

Mihai Apetrei