How to Define Your WPForms License in the WordPress Config File


Would you prefer to use the WordPress config file to define your license? You can easily do that with one line of PHP. We’ll show you how to define the WPForms license inside the wp-config.php.

You can easily enter and verify your license key through the WPForms » Settings » General tab.

However, by defining your license key inside the wp-config.php file, it will automatically populate the license key for you inside the Settings panel.


In order to do this, you’ll need to access your WordPress files on your server. Either through an FTP, cPanel or through an FTP File Manager plugin.

Once your site files are open, you’ll need to open wp-config.php for editing. This will be located in the root folder of your site.

Open wp-config file to enable debugging in WordPress

The wp-config file contains site-specific configuration settings, such as database information and, potentially, settings added by your hosting provider.

Just copy and paste the code snippet below to your wp-config.php and save the changes.

//Define license key
define('WPFORMS_LICENSE_KEY, 'your-license-key');

And that’s it! You’ve now defined your license key inside your site’s wp-config.php file. When the license key isn’t entered in the WPForms » Settings » General tab, WPForms will use this file to check for a license key.

Would you like to enable debugging on your site? Take a look at this tutorial on How to Enable Debugging in WordPress.