Introduction
Would you prefer to use the WordPress config file to define your license? You can easily do that with one line of PHP. In this tutorial, we’re going to walk you through each step to define the WPForms license inside the WordPress config file.
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.
Adding the snippet
First, 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.
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' );
Just replace the text your-license-key with your own license key! And that’s all you need to define your license in the WordPress config file!
Would you like to enable debugging on your site? Take a look at this tutorial on How to Enable Debugging in WordPress.