WPML hard code the site key into wp-config

WPML has a tendency to be a bit flaky with their keys and overnight your WPML site may become unregistered.



This is a pain because, in order to re-register the site again and get access to updates, you have to log in to WPML, find the key, navigate back to WordPress, update the key....its a drag.

However, with the snippet below, adding it to the wp-config.php file, you can override the license key in the database by defining a global variable called: OTGS_INSTALLER_SITE_KEY_WPML

So just add this to your wp-config and you will be set.

################################
// hard code WPML site key in wp-config.php
// https://www.jucra.com/whmcs/knowledgebase/173/
// see: https://wpml.org/faq/install-wpml/#registration-using-php
################################
define( 'OTGS_INSTALLER_SITE_KEY_WPML', 'site_key' );


Another good use for this is if you have a dev server and a production server
, you can define two different license keys for each so when swapping the files between the two servers you don't need to keep updating the key in the database.

;o)

  • wpml, wpml site key
  • 3 Users Found This Useful
Was this answer helpful?

Related Articles

customised wordpress wp-config file

Out of the box, the WordPress wp-config.php file is basic and ugly.Below is our standard...

Fix WordPress 404 Errors on Password Protected Directories

You are reading this article becasue you have applied password protection on the wp-admin...

Enable Fenced Off Debugging to Your IP in Wordpress

Use the code below to activate the bugging in WordPress but locked down to your IP.Put this in...

How to protect your Wordpress Login from Bots

You are reading this article because you are getting a lot of attacks on your WordPress login...

SVG Logo is not appearing in Wordpress

You are reading this article because you have managed to upload an SVG file to your Wordpress...