Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/squarecandy/freemius-auto-activation/archive/refs/heads/main.zipEnables entering Freemius plugin activation codes via wp-config.php
Get started
-
Install and activate this plugin
-
Locate the "shortcode" of the plugin you want to activate. This is different from the standard slug for the plugin or the slug that will be found in the database and freemius database settings in the options table. It may be easiest to ask the plugin developer, but you can also look through the plugin code for a function that looks like this:
function my_prefix_fs() { global $my_prefix_fs;. In this case the shortcode ismy_prefix_fs. The function typically contains thefs_dynamic_initfunction, so try searching for that string. -
Add the following to your
wp-config.phpfile.// freemius activation define( 'FS_SHORTCODES', 'my_prefix_fs' ); define( 'WP__MY_PREFIX_FS__LICENSE_KEY', '<your_license_key_here>' );If you have multiple freemius plugins, the FS_SHORTCODES definition can also be an array:
// freemius activation define( 'FS_SHORTCODES', array( 'my_prefix_fs', 'my_other_prefix_fs' ); define( 'WP__MY_PREFIX_FS__LICENSE_KEY', '<your_license_key_here>' ); define( 'WP__MY_OTHER_PREFIX_FS__LICENSE_KEY', '<your_license_key_here>' ); -
Visit the plugin activation page in the dashboard. It should already be authorized with your key!
-
This process actually still adds your keys to the database, just as if you had typed it in manually. So if you prefer, when you're done with the activation, you can remove the settings definitions from wp-config and deactivate and/or delete this plugin.
Releases
1 release.
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.