Wordpress Secret Key & Cookie Strength

April 24th, 2008
No Gravatar

There is a little known feature in Wordpress 2.5 called “Secret Key“. If you’re upgrading from a previous version you probably won’t even know this feature exists as it only appears in clean installs where you have a brand new wp-config.php.

If you’re upgrading, I’d recommend putting this line somewhere in your wp-config.php

define('SECRET_KEY', 'YOUR SECRET KEY');

Replace YOUR SECRET KEY with a nice long random collection of junk.

Doing so will greatly increase the security of your blog by increasing your Wordpress cookie strenght.

Doing this will invalidate all your logins, so everybody on your site will have to relogin. This means that your login cookies, if intercepted, won’t be able to be reproduced as easily. It also means that somebody who gains read-only access to your database through some other means won’t be able to login to your site.

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


Was this post useful to you? Let me know, buy me a beer!
Alternatively, if you're feeling impecunious, you may like to subscribe to my RSS feed, or see other articles in the Geekery, Wordpress category.

Leave a Reply