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

Knight_Killer

Active member
Trusted Uploader
Aug 28, 2020
135
94
28
  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!
🤩🤩 Worked like Charm .. Thanks Buddy!
 

birdarabic

Member
May 28, 2019
79
23
8
I started getting this in the scan, will the plugin work fine even after knowing it got nulled?
 

Attachments

  • Screenshot 2021-08-02 172646.png
    Screenshot 2021-08-02 172646.png
    96.2 KB · Views: 76

lxsaif

Member
Mar 14, 2021
16
51
13
Do I have to edit the wordfenceClass.php file each time after the new update?
 

gwuluo

Member
Apr 8, 2019
31
24
18
Dont know if anyone has a way to automate this process unfortunately
Create a new file wp-content/mu-plugins/wordfence.php, put the content in it automatically, so you don't have to change the plugin every time
PHP:
<?php
add_action('plugins_loaded', function(){
    if( !class_exists('wfConfig') ) return;
    wfConfig::set('isPaid', 1);
    wfConfig::set('keyType', wfAPI::KEY_TYPE_PAID_CURRENT);
    wfConfig::set('premiumNextRenew', time()+31536000);   
}, 99);
 

zen123

Well-known member
Trusted Seller
Feb 14, 2019
2,091
978
113
CyberSpace IN
Create a new file wp-content/mu-plugins/wordfence.php, put the content in it automatically, so you don't have to change the plugin every time
PHP:
<?php
add_action('plugins_loaded', function(){
    if( !class_exists('wfConfig') ) return;
    wfConfig::set('isPaid', 1);
    wfConfig::set('keyType', wfAPI::KEY_TYPE_PAID_CURRENT);
    wfConfig::set('premiumNextRenew', time()+31536000);  
}, 99);
Nice solution
 
  • Like
Reactions: Jamacart

whitetigerdk

Active member
Oct 24, 2018
293
67
43
Create a new file wp-content/mu-plugins/wordfence.php, put the content in it automatically, so you don't have to change the plugin every time
PHP:
<?php
add_action('plugins_loaded', function(){
    if( !class_exists('wfConfig') ) return;
    wfConfig::set('isPaid', 1);
    wfConfig::set('keyType', wfAPI::KEY_TYPE_PAID_CURRENT);
    wfConfig::set('premiumNextRenew', time()+31536000);
}, 99);
Is there any way to make wordfence NOT scan this file as it report it back as malicious (detecting it as nulled version). I haven't been able to locate a setting to have the scan ignoring a specific folder.. any advice?

-
Found.. now it reports no error even though it's nulled. :)
 
Last edited:

kapitanpirata

New member
May 7, 2021
2
3
3
Create a new file wp-content/mu-plugins/wordfence.php, put the content in it automatically, so you don't have to change the plugin every time
PHP:
<?php
add_action('plugins_loaded', function(){
    if( !class_exists('wfConfig') ) return;
    wfConfig::set('isPaid', 1);
    wfConfig::set('keyType', wfAPI::KEY_TYPE_PAID_CURRENT);
    wfConfig::set('premiumNextRenew', time()+31536000);  
}, 99);
This still works on the latest version of wordfence Version 7.5.7
 

Attachments

  • Wordfence Dashboard ‹ Open Gym Club — WordPress - Opera 2022-01-26 12.19.47 2022-01-26 12.19.58.png
    Wordfence Dashboard ‹ Open Gym Club — WordPress - Opera 2022-01-26 12.19.47 2022-01-26 12.19.58.png
    34.3 KB · Views: 8
  • Like
Reactions: Happy Jack

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