[Guide] How to unlock unlimited premium Wordfence Security license on any version

eliteshades

Well-known member
May 24, 2019
55
286
53
Under your bed
cornhub.com
  1. Download the official Wordfence security plugin from: https://en-ca.wordpress.org/plugins/wordfence/
  2. Upload the plugin to your wordpress but don't activate it
  3. Next, in your wordpress main dashboard head to Plugins -> Plugin Editor
  4. In the "Select plugin to edit" bar choose Wordfence Security and press Select
  5. Under the "lib file section" select the wordfenceClass.php file
  6. Press ctrl+f and paste this:
if (!WFWAF_SUBDIRECTORY_INSTALL && $waf = wfWAF::getInstance()) {

You should see:

$updateCountries = false;
if (!WFWAF_SUBDIRECTORY_INSTALL && $waf = wfWAF::getInstance()) {
$homeurl = wfUtils::wpHomeURL();

$siteurl = wfUtils::wpSiteURL();


Now right under it paste this in:

wfConfig::set('isPaid', 1);
wfConfig::set('keyType', wfAPI::KEY_TYPE_PAID_CURRENT);
wfConfig::set('premiumNextRenew', time()+31536000);

So the code should look like this:

$updateCountries = false;
if (!WFWAF_SUBDIRECTORY_INSTALL && $waf = wfWAF::getInstance()) {
$homeurl = wfUtils::wpHomeURL();
$siteurl = wfUtils::wpSiteURL();


wfConfig::set('isPaid', 1);
wfConfig::set('keyType', wfAPI::KEY_TYPE_PAID_CURRENT);

wfConfig::set('premiumNextRenew', time()+31536000);

7. Save the file, then activate WordFence plugin, you should have unlimited premium license! It says "renew in 365 days" but you will notice that this number doesn't go down ;)

If you can't find the code, you can export the file, edit using notepad++ and then reupload or do something similar. You can also use FTP application to do this method.

Like for more "exploits" like this!
 
Last edited:

limevanilla

Active member
Jan 27, 2019
100
35
28
Is there a code for child theme function.php? So every time they have new update, we didn't have to make this code again.
 

fruites

New member
Jan 24, 2019
21
3
3
Doesnt work, i cant find code line via ctrl+f. I did everthing step by step but when i choose wordfecneclass.php I cant find that first line


EDIT: My explorer didnt find it via ctrl+f so i copy full code to my offline editor and edit it with this tut. and than copy it back. ITS WORKIN!
 
Last edited:

Capricorn

Active member
Babiato Lover
Banned User
Apr 22, 2019
220
78
28
I can't find this code in wordfenceClass.php. please help
if (!WFWAF_SUBDIRECTORY_INSTALL && $waf = wfWAF::getInstance()) {
 

Theone

Active member
Jan 11, 2019
114
51
28
Web
  1. Download the official Wordfence security plugin from: https://en-ca.wordpress.org/plugins/wordfence/
  2. Upload the plugin to your wordpress but don't activate it
  3. Next, in your wordpress main dashboard head to Plugins -> Plugin Editor
  4. In the "Select plugin to edit" bar choose Wordfence Security and press Select
  5. Under the "lib file section" select the wordfenceClass.php file
  6. Press ctrl+f and paste this:
if (!WFWAF_SUBDIRECTORY_INSTALL && $waf = wfWAF::getInstance()) {

You should see:

$updateCountries = false;
if (!WFWAF_SUBDIRECTORY_INSTALL && $waf = wfWAF::getInstance()) {
$homeurl = wfUtils::wpHomeURL();

$siteurl = wfUtils::wpSiteURL();


Now right under it paste this in:

wfConfig::set('isPaid', 1);
wfConfig::set('keyType', wfAPI::KEY_TYPE_PAID_CURRENT);
wfConfig::set('premiumNextRenew', time()+31536000);

So the code should look like this:

$updateCountries = false;
if (!WFWAF_SUBDIRECTORY_INSTALL && $waf = wfWAF::getInstance()) {
$homeurl = wfUtils::wpHomeURL();
$siteurl = wfUtils::wpSiteURL();


wfConfig::set('isPaid', 1);
wfConfig::set('keyType', wfAPI::KEY_TYPE_PAID_CURRENT);

wfConfig::set('premiumNextRenew', time()+31536000);

7. Save the file, then activate WordFence plugin, you should have unlimited premium license! It says "renew in 365 days" but you will notice that this number doesn't go down ;)

Like for more "exploits" like this!
Thank you for this..... Worked like a charm
 

Capricorn

Active member
Babiato Lover
Banned User
Apr 22, 2019
220
78
28
Damm it,,,,,, it worked. But folks let me explain something to you. Searching for this code from WordPress dashboard might not work for you,

At least it didn't work for me. The workaround is to use FTP application such as FileZilla,

Look for wordfenceClass.php from lib file of the plugin and right it and select view/edit. then search for the code and edit it according to the poster.
 

eliteshades

Well-known member
May 24, 2019
55
286
53
Under your bed
cornhub.com
I can't find this code in wordfenceClass.php. please help
if (!WFWAF_SUBDIRECTORY_INSTALL && $waf = wfWAF::getInstance()) {

Do what the other person said because sometimes certain browsers can't find it for some reason. Copy the entire code to notepad++ or something then do the steps and copy and paste everything back in.
 

Latest posts

Forum statistics

Threads
69,228
Messages
908,447
Members
237,063
Latest member
skydev

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu