• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Wordfence - WordPress Security Plugins

Wordfence - WordPress Security Plugins v7.11.5

No permission to download
Y

you're the best. For anyone looking how to add:
From the WordPress left menu:

  1. Go to the Plugin file editor (under plugins)
  2. Select Wordfence plugin and it will load main wordfence file
  3. On line 70 add the mentioned code
Wow, Thanks
 
@pavel2950 @imanuky @EagleDotNet
Below are the instructions already reported by others on how to activate WordPress:

1 - Take the zip containing the plugin that you downloaded from Babiato and extract the contents.
2 - Now open the folder and navigate to the file: wordfence.latest-stable\wordfence\wordfence.php


3 - Inside the file find the line:
PHP:
if(defined('WP_INSTALLING') && WP_INSTALLING){

In the previous line add the code:
Code:
const ActivatorRemainingDays     = 365 * 10;
function initWordfenceActivator() {
    try {
        wfOnboardingController::_markAttempt1Shown();
        wfConfig::set( 'onboardingAttempt3', wfOnboardingController::ONBOARDING_LICENSE );
        if ( empty( wfConfig::get( 'apiKey' ) ) ) {
            wordfence::ajax_downgradeLicense_callback();
        }
        wfConfig::set( 'isPaid', true );
        wfConfig::set( 'keyType', wfLicense::KEY_TYPE_PAID_CURRENT );
        wfConfig::set( 'premiumNextRenew', time() + ActivatorRemainingDays * 86400 );
        wfWAF::getInstance()->getStorageEngine()->setConfig( 'wafStatus', wfFirewall::FIREWALL_MODE_ENABLED );
    } catch ( Exception $exception ) {
        add_action( 'admin_notices', function () use ( $exception ) { ?>
            <div class="notice notice-error">
            <p><?php
                printf(
                    esc_html__( 'error' ),
                    esc_html( $exception->getMessage() )
                ); ?></p>
            </div><?php
        } );
    }
}
add_action( 'plugins_loaded', function () {
    if ( class_exists( 'wfLicense' ) ) {
        initWordfenceActivator();
        wfLicense::current()->setType( wfLicense::TYPE_RESPONSE );
        wfLicense::current()->setPaid( true );
        wfLicense::current()->setRemainingDays( ActivatorRemainingDays );
        wfLicense::current()->setConflicting( false );
        wfLicense::current()->setDeleted( false );
        wfLicense::current()->getKeyType();
    }
} );

4 - Now you have 2 options for making changes:
a) Open the ftp program and send the wordfence.php file directly to the hosting service you use
/wp-content/plugins/wordfence/
b) Reassemble the plugin zip package and upload it via WordPress.

So it worked for me.

 
@pavel2950 @imanuky @EagleDotNet
Below are the instructions already reported by others on how to activate WordPress:

1 - Take the zip containing the plugin that you downloaded from Babiato and extract the contents.
2 - Now open the folder and navigate to the file: wordfence.latest-stable\wordfence\wordfence.php


3 - Inside the file find the line:
PHP:
if(defined('WP_INSTALLING') && WP_INSTALLING){

In the previous line add the code:
Code:
const ActivatorRemainingDays     = 365 * 10;
function initWordfenceActivator() {
    try {
        wfOnboardingController::_markAttempt1Shown();
        wfConfig::set( 'onboardingAttempt3', wfOnboardingController::ONBOARDING_LICENSE );
        if ( empty( wfConfig::get( 'apiKey' ) ) ) {
            wordfence::ajax_downgradeLicense_callback();
        }
        wfConfig::set( 'isPaid', true );
        wfConfig::set( 'keyType', wfLicense::KEY_TYPE_PAID_CURRENT );
        wfConfig::set( 'premiumNextRenew', time() + ActivatorRemainingDays * 86400 );
        wfWAF::getInstance()->getStorageEngine()->setConfig( 'wafStatus', wfFirewall::FIREWALL_MODE_ENABLED );
    } catch ( Exception $exception ) {
        add_action( 'admin_notices', function () use ( $exception ) { ?>
            <div class="notice notice-error">
            <p><?php
                printf(
                    esc_html__( 'error' ),
                    esc_html( $exception->getMessage() )
                ); ?></p>
            </div><?php
        } );
    }
}
add_action( 'plugins_loaded', function () {
    if ( class_exists( 'wfLicense' ) ) {
        initWordfenceActivator();
        wfLicense::current()->setType( wfLicense::TYPE_RESPONSE );
        wfLicense::current()->setPaid( true );
        wfLicense::current()->setRemainingDays( ActivatorRemainingDays );
        wfLicense::current()->setConflicting( false );
        wfLicense::current()->setDeleted( false );
        wfLicense::current()->getKeyType();
    }
} );

4 - Now you have 2 options for making changes:
a) Open the ftp program and send the wordfence.php file directly to the hosting service you use
/wp-content/plugins/wordfence/
b) Reassemble the plugin zip package and upload it via WordPress.

So it worked for me.

Doesnt work for me. creates a fatal error. Or i am doing someting wrng?
 
It worked for me, not putting the code in the line mentioned: if(defined('WP_INSTALLING') && WP_INSTALLING){
But i just copied it somewhere in between, created new ZIP and installed
 
It worked for me, not putting the code in the line mentioned: if(defined('WP_INSTALLING') && WP_INSTALLING){
But i just copied it somewhere in between, created new ZIP and installed
Yes, the problem is that you don't have to insert the code IN the line, but BEFORE the line I indicated in the previous post.
 
latest stable does not work, i can confirm that... from premium to free version after updating
 
@pavel2950 @imanuky @EagleDotNet
Below are the instructions already reported by others on how to activate WordPress:

1 - Take the zip containing the plugin that you downloaded from Babiato and extract the contents.
2 - Now open the folder and navigate to the file: wordfence.latest-stable\wordfence\wordfence.php


3 - Inside the file find the line:
PHP:
if(defined('WP_INSTALLING') && WP_INSTALLING){

In the previous line add the code:
Code:
const ActivatorRemainingDays     = 365 * 10;
function initWordfenceActivator() {
    try {
        wfOnboardingController::_markAttempt1Shown();
        wfConfig::set( 'onboardingAttempt3', wfOnboardingController::ONBOARDING_LICENSE );
        if ( empty( wfConfig::get( 'apiKey' ) ) ) {
            wordfence::ajax_downgradeLicense_callback();
        }
        wfConfig::set( 'isPaid', true );
        wfConfig::set( 'keyType', wfLicense::KEY_TYPE_PAID_CURRENT );
        wfConfig::set( 'premiumNextRenew', time() + ActivatorRemainingDays * 86400 );
        wfWAF::getInstance()->getStorageEngine()->setConfig( 'wafStatus', wfFirewall::FIREWALL_MODE_ENABLED );
    } catch ( Exception $exception ) {
        add_action( 'admin_notices', function () use ( $exception ) { ?>
            <div class="notice notice-error">
            <p><?php
                printf(
                    esc_html__( 'error' ),
                    esc_html( $exception->getMessage() )
                ); ?></p>
            </div><?php
        } );
    }
}
add_action( 'plugins_loaded', function () {
    if ( class_exists( 'wfLicense' ) ) {
        initWordfenceActivator();
        wfLicense::current()->setType( wfLicense::TYPE_RESPONSE );
        wfLicense::current()->setPaid( true );
        wfLicense::current()->setRemainingDays( ActivatorRemainingDays );
        wfLicense::current()->setConflicting( false );
        wfLicense::current()->setDeleted( false );
        wfLicense::current()->getKeyType();
    }
} );

4 - Now you have 2 options for making changes:
a) Open the ftp program and send the wordfence.php file directly to the hosting service you use
/wp-content/plugins/wordfence/
b) Reassemble the plugin zip package and upload it via WordPress.

So it worked for me.


Instead I install v7.9.3 and then update to what ever latest version I have to instalkl. Worked easy for me. BTW adding the line of code gave error always. Either its not explained how to do or may be we couldnt understand it better.
 
Instead I install v7.9.3 and then update to what ever latest version I have to instalkl. Worked easy for me. BTW adding the line of code gave error always. Either its not explained how to do or may be we couldnt understand it better.
I don't receive an error... I thought it was due to the fact that the code had been pasted in the wrong place.
 
Instead I install v7.9.3 and then update to what ever latest version I have to instalkl. Worked easy for me. BTW adding the line of code gave error always. Either its not explained how to do or may be we couldnt understand it better.
was well explained even more then once place the code before that line you have to look up and done!
 
was well explained even more then once place the code before that line you have to look up and done!
Instead I install v7.9.3 and then update to what ever latest version I have to instalkl. Worked easy for me. BTW adding the line of code gave error always. Either its not explained how to do or may be we couldnt understand it better.

Keyword = my text highlighted in yellow 🤝
 
Thank you, these instructions worked perfectly when upgrading from free to premium.

@pavel2950 @imanuky @EagleDotNet
Below are the instructions already reported by others on how to activate WordPress:

1 - Take the zip containing the plugin that you downloaded from Babiato and extract the contents.
2 - Now open the folder and navigate to the file: wordfence.latest-stable\wordfence\wordfence.php


3 - Inside the file find the line:
PHP:
if(defined('WP_INSTALLING') && WP_INSTALLING){

In the previous line add the code:
Code:
const ActivatorRemainingDays     = 365 * 10;
function initWordfenceActivator() {
    try {
        wfOnboardingController::_markAttempt1Shown();
        wfConfig::set( 'onboardingAttempt3', wfOnboardingController::ONBOARDING_LICENSE );
        if ( empty( wfConfig::get( 'apiKey' ) ) ) {
            wordfence::ajax_downgradeLicense_callback();
        }
        wfConfig::set( 'isPaid', true );
        wfConfig::set( 'keyType', wfLicense::KEY_TYPE_PAID_CURRENT );
        wfConfig::set( 'premiumNextRenew', time() + ActivatorRemainingDays * 86400 );
        wfWAF::getInstance()->getStorageEngine()->setConfig( 'wafStatus', wfFirewall::FIREWALL_MODE_ENABLED );
    } catch ( Exception $exception ) {
        add_action( 'admin_notices', function () use ( $exception ) { ?>
            <div class="notice notice-error">
            <p><?php
                printf(
                    esc_html__( 'error' ),
                    esc_html( $exception->getMessage() )
                ); ?></p>
            </div><?php
        } );
    }
}
add_action( 'plugins_loaded', function () {
    if ( class_exists( 'wfLicense' ) ) {
        initWordfenceActivator();
        wfLicense::current()->setType( wfLicense::TYPE_RESPONSE );
        wfLicense::current()->setPaid( true );
        wfLicense::current()->setRemainingDays( ActivatorRemainingDays );
        wfLicense::current()->setConflicting( false );
        wfLicense::current()->setDeleted( false );
        wfLicense::current()->getKeyType();
    }
} );

4 - Now you have 2 options for making changes:
a) Open the ftp program and send the wordfence.php file directly to the hosting service you use
/wp-content/plugins/wordfence/
b) Reassemble the plugin zip package and upload it via WordPress.

So it worked for me.

 
  • Like
Reactions: Shadow Man
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock