Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
WordPress 3 Ultimate Security

You're reading from   WordPress 3 Ultimate Security WordPress is for everyone and so is this brilliant book on making your site impenetrable to hackers. This jargon-lite guide covers everything from stopping content scrapers to understanding disaster recovery.

Arrow left icon
Product type Paperback
Published in Jun 2011
Publisher Packt
ISBN-13 9781849512107
Length 408 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Toc

Table of Contents (23) Chapters Close

WordPress 3 Ultimate Security
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
So What's the Risk? Hack or Be Hacked FREE CHAPTER Securing the Local Box Surf Safe Login Lock-Down 10 Must-Do WordPress Tasks Galvanizing WordPress Containing Content Serving Up Security Solidifying Unmanaged Defense in Depth Plugins for Paranoia Don't Panic! Disaster Recovery Security Policy Essential Reference Index

Hiding the WordPress version


Suppose that a weakness is found in WordPress 3.0.1 and Automattic duly patches this with 3.0.2. Sites determined to be running the older version could be open targets.

With that in mind, browse your page source and you'll see a line like this:

Similarly, a hacker can look at a site's RSS feeds to ascertain the WordPress version. To get rid of this version leak, open up functions.php in your theme's folder, pasting this code at the top of the file:

<?php function hide_version() 
  {
  return '';
  }
  add_filter('the_generator', 'hide_version');
?>

Now refresh the source code and the version has gone, as it will have from RSS feeds.

Binning the readme

You may not know you have this file. Browse to http://yoursite.com/readme.html:

There's your version again. Delete readme.html from your WordPress root directory, not just now, but after upgrades.

Cloaking the login page and the version

There is one more place from where it is possible to work out your WordPress version...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image