@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.