Balkhis - Vision For Success

How To Set up secret keys in WordPress 2.6+

Dear Readers, I would like to thank you for reading this post. I highly value your feedback and would like to know more about my readers. Follow me on Twitter

I have been a security freak for all of my websites. A few of my websites have been hacked in the past, and I hate the period. I have written in the past a post about how to protect your blog from hackers. Today I will talk about another key thing that WordPress have which makes it a lot more secure than people think.

A client recently told me that WordPress is an open source software hence not secure. Obviously understandable from someone who does not know anything about wordpress. Yes a lot of open source softwares have some security issues, but wordpress is getting stronger and stronger after each release.

In the release of wordpress 2.6 and onward they have included this feature of secret keys. Which adds an extra layer of security to your blog and make it more secure. In order to do this you would have to open your: wp-config.php file, and right after the other define tags add the following:

define(‘AUTH_KEY’, ‘put your unique phrase here’);
define(‘SECURE_AUTH_KEY’, ‘put your unique phrase here’);
define(‘LOGGED_IN_KEY’, ‘put your unique phrase here’);
define(‘NONCE_KEY’, ‘put your unique phrase here’);

You’ll find these lines in the wp-config-sample.php file as well.

These three unique phrases should be random. Anything 60+ characters and relatively random will work. They should each be different. In other words, you need three phrases, not one.

Note that doing this will invalidate all your login cookies, so everybody on your site will have to re-login, but doing it will greatly increase the cookie strength of WordPress 2.6. 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.

** DO NOT SHARE YOUR SECRET KEYS BECAUSE THEN THEY WON’T BE SECRET **



To stay updated with the blog, please consider subscribing to my full feed RSS. You can also subscribe by Email and have new posts sent directly to your inbox. I hate spam as well, so I promise you that you will not be spammed.
Add to Social Bookmarks:
Add this Article to Digg Add this Article to Stumbleupon Add this Article to Del.icio.us Add this Article to Reddit Add this Article to Newsvine Add this Article to Technorati

RSS feed

11 Comments

Comment by Nicole Price
2009-04-06 09:42:30

Thank you for this good advise.


 
Comment by Kai Lo
2009-04-06 20:21:00

Anything similar to this for Blogger?


 
Comment by Silvia
2009-04-07 04:32:16

I think that problem is really actual,the recommended tips might be useful.


 
Comment by Best CSS Gallery
2009-04-07 04:46:32

Thank you for helpful advice


 
Comment by PS3
2009-04-07 10:25:55

Thanks for this Syed. I’ve never been hacked but that doesn’t mean i should keep my site safe!


 
Comment by Web Design Beach
2009-04-07 14:32:11

Thanks for sharing. WordPress is pretty unsecure system, and we have seen many hacks in past. So every new step in making it more secure is very useful.


 
Comment by FoxNewsBoycott
2009-04-07 18:54:17

Hmm… I didn’t know anything about that. Thanks!


 
Comment by Atniz
2009-04-08 07:48:40

I am not aware of secret keys in wp 2.6 or 2.7 version. Great finding there.


 
Comment by Webkinz
2009-04-10 00:39:04

Thanks for the information. I’ve seen that before but didn’t know how to use.


 
2009-04-11 12:52:45

Haven’t done this yet so will head over to all my blogs and do it, thanks for the tip!


 
2009-04-21 08:16:48

Hmm a really nice find, especially for the big money making blogs. This should definitely be a must.


 

Sorry, the comment form is closed at this time.

Subscribe to Balkhis via RSS
Subscribe to Balkhis via Email Pimp My Blog