From version 7.0.1
onwards, you can activate your licenses directly from the wp-config.php
file. This feature is especially helpful for users who need to activate licenses on multiple sites and prefer simply copying and pasting a code snippet rather than manually entering license keys for each add-on on each site, whether on a multisite network or individual WordPress installations.
How to Add License Keys to wp-config.php
1. Open wp-config.php
for editing.
2. Find a suitable location, ideally towards the end of the file, above the line that says /* That's all, stop editing! Happy publishing. */
.
3. Add the license keys by defining the WP_SMS_LICENSE
constant:
For multiple add-ons (if you have licenses for more than one add-on), define the keys as an array:
define('WP_SMS_LICENSE', [
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
]);
Or, you can define them as a comma-separated string:
define('WP_SMS_LICENSE', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
For a single license (e.g., WP SMS All-in-One or a single add-on), define it as a single string:
define('WP_SMS_LICENSE', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
4. Save the changes to the wp-config.php
file.
5. Visit your site and go to SMS → Add-Ons to confirm that licenses have been activated.