I was using a development version of WordPress on one of my blogs, and it reported version number asĀ 3.5-alpha which was not what was expected by Wordfence plugin, which obstinately refused to run. At the time I didnt have time to delve into the issue and just disabled Wordfence. But today when I got hit by a mass of bruteforce attacks, I regretted my decision. So I had to find a way to get Wordfence to work.
It turned out that the version number is reported by the file wp-includes/version.php.
Change the following:
/** * The WordPress version string * * @global string $wp_version */ $wp_version = '3.6-alpha-23408';
To this:
/** * The WordPress version string * * @global string $wp_version */ $wp_version = '3.6-alpha-23408'; // Override to fix Wordfence $wp_version = '3.5.1';
3.5.1 was the latest version as of then. Just remember to turn it back when you check for updates to WordPress.
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
He is a full stack developer, whose favorite languages are currently Python and Vue.js. He is also fluent in Javascript, Flutter/Dart, Perl, PHP, SQL, C and bash shell scripting. He loves Linux, and can often be found tinkering with linux kernel code, and source code for GNU applications. He used to be an active developer on XDA forums, and his tinkered ROMS used to be very popular in the early 2000s.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.