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

ckeeper

Well-known member
Nov 8, 2019
623
376
63
I have tried that but the problem is still here...
It looks like there is some sort of permission issue. If you have access to this server either by ssh or cpanel or any other way, you can directly edit/replace these files there.
 

Niko Nemo

Active member
Trusted Uploader
May 28, 2019
498
228
43
It looks like there is some sort of permission issue. If you have access to this server either by ssh or cpanel or any other way, you can directly edit/replace these files there.

I made it as you said, from cPanel., That was the right solution :) thanks a lot for advice!!!

Cheers!
 
  • Like
Reactions: ckeeper

4jean

New member
Jan 4, 2019
15
3
3
  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!
Thank you. It worked
 

DavvaM

Active member
Jul 31, 2018
102
27
28
Hi, this is great, but what happens when the lugin needs updating would I have to keep adding this code?

Thanks
 

rikknet

Member
Jun 15, 2019
36
16
8
it works!!
thanks bro

BTW, if you got problems, use notepad++
Copy all "wordfenceClass.php" code in a blank notepad page
Use search->Find "updateCountries "
and there it is the code you have change.
Save it and check
 
  • Like
Reactions: jollygiraffe

daya143

Active member
Apr 5, 2020
189
36
28
Wordked fine thanks, possibleto have the HACK like these for other plugins & themes?
 
Last edited:

guenzet

Member
Trusted Uploader
Nov 29, 2018
40
57
18
astuce-aide.com
with the new Version 7.4.7. this method does not work.
the owner of the plugin has to change the code and is not found.
someone can help us activate this version
and thank you
 

Sqydo

New member
Sep 29, 2019
4
3
3
with the new Version 7.4.7. this method does not work.
the owner of the plugin has to change the code and is not found.
someone can help us activate this version
and thank you

7.4.7 confirmed working. Try editing again outside of WP, in cPanel or Notepad etc.
 
  • Like
Reactions: guenzet

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