10 Useful WordPress Security Tweaks
Security has always been a hot topic. Offline, people buy wired homes, car alarms and gadgets to bring their security to the max. Online, security is important, too, especially for people who make a living from websites and blogs. In this article, we’ll show you some useful tweaks to protect your WordPress-powered blog.
1. Prevent Unnecessary Info From Being Displayed
The problem
When you fail to log into a WordPress blog, the CMS displays some info telling you what went wrong. This is good if you’ve forgotten your password, but it might also be good for people who want to hack your blog. So, why not prevent WordPress from displaying error messages on failed log-ins?
The solution
To remove log-in error messages, simply open your theme’s functions.php file, and paste the following code:
add_filter('login_errors',create_function('$a', "return null;"));
Save the file, and see for yourself: no more messages are displayed if you fail to log in.
Please note that there are several functions.php files. Be sure to change the one in your wp-content directory.
Code explanation
With this code, we’ve added a simple hook to overwrite the login_errors() function. Because the custom function that we created returns only null, the message displayed will be a blank string.
Source
2. Force SSL Usage
The problem
If you worry about your data being intercepted, then you could definitely use SSL. In case you don’t know what it is, SSL is a cryptographic protocol that secures communications over networks such as the Internet.
Did you know that forcing WordPress to use SSL is possible? Not all hosting services allow you to use SSL, but if you’re hosted on Wp WebHost or HostGator, then SSL is enabled.
The solution
Once you’ve checked that your Web server can handle SSL, simply open your wp-config.php file (located at the root of your WordPress installation), and paste the following:
define('FORCE_SSL_ADMIN', true);
Save the file, and you’re done!
Code explanation
Nothing hard here. WordPress uses a lot of constants to configure the software. In this case, we have simply defined the FORCE_SSL_ADMIN constant and set its value to true. This results in WordPress using SSL.
Source
3. Use .htaccess To Protect The wp-config File
The problem
As a WordPress user, you probably know how important the wp-config.php file is. This file contains all of the information required to access your precious database: username, password, server name and so on. Protecting the wp-config.php file is critical, so how about exploiting the power of Apache to this end?
The solution
The .htaccess file is located at the root your WordPress installation. After creating a back-up of it (it’s such a critical file that we should always have a safe copy), open it up, and paste the following code:
<files wp-config.php>
order allow,deny
deny from all
</files>
Code explanation
.htaccess files are powerful and one of the best tools to prevent unwanted access to your files. In this code, we have simply created a rule that prevents any access to the wp-admin.php file, thus ensuring that no evil bots can access it.
Source
4. Blacklist Undesired Users And Bots

The problem
This is as true online as it is in real life: someone who pesters you today will probably pester you again tomorrow. Have you noticed how many spam bots return to your blog 10 times a day to post their annoying comments? The solution to this problem is quite simple: forbid them access to your blog.
The solution
Paste the following code in your .htaccess file, located at the root of your WordPress installation. As I said, always back up the .htaccess file before editing it. Also, don’t forget to change 123.456.789 to the IP address you want to ban.
<Limit GET POST PUT>
order allow,deny
allow from all
deny from 123.456.789
</LIMIT>
Code explanation
Apache is powerful and can easily be used to ban undesirable people and bots from your website. With this code, we’re telling Apache that everyone is allowed to visit our blog except the person with the IP address 123.456.789.
To ban more people, simply repeat line 4 of this code on a new line, using another IP address, as shown below:
<Limit GET POST PUT>
order allow,deny
allow from all
deny from 123.456.789
deny from 93.121.788
deny from 223.956.789
deny from 128.456.780
</LIMIT>
Source
5. Protect Your WordPress Blog From Script Injections
The problem
Protecting dynamic websites is especially important. Most developers always protect their GET and POST requests, but sometimes this is not enough. We should also protect our blog against script injections and any attempt to modify the PHP GLOBALS and _REQUEST variables.
The solution
The following code blocks script injections and any attempts to modify the PHP GLOBALS and _REQUEST variables. Paste it in your .htaccess file (located in the root of your WordPress installation). Make sure to always back up the .htaccess file before modifying it.
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
Code explanation
Using the power of the .htaccess file, we can check requests. What we’ve done here is check whether the request contains a <script> and whether it has tried to modify the value of the PHP GLOBALS or _REQUEST variables. If any of these conditions are met, the request is blocked and a 403 error is returned to the client’s browser.
Sources
6. Fight Back Against Content Scrapers
The problem
If your blog is the least bit known, people will no doubt try to use your content on their own websites without your consent. One of the biggest problems is hot-linking to your images, which saps your server’s bandwidth.
The solution
To protect your website against hot-linking and content scrapers, simply paste the following code in your .htaccess file. As always, don’t forget to back up when modifying the .htaccess file.
RewriteEngine On
#Replace ?mysite\.com/ with your blog url
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
#Replace /images/nohotlink.jpg with your "don't hotlink" image url
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L]
Once you’ve saved the file, only your website will be able to link to your images, or, to be more correct, no one would link to your images, because it would be way too complicated and time-consuming. Other websites will automatically display the nohotlink.jpg image. Note that you can also specify a non-existent image, so websites that try to hot-link to you would display a blank space.
Code explanation
With this code, the first thing we’ve done is check the referrer to see that it matches our blog’s URL and it is not empty. If it doesn’t, and the file has a JPG, GIF, BMP or PNG extension, then the nohotlink image is displayed instead.
Source
7. Create A Plug-In To Protect Your Blog From Malicious URL Requests

The problem
Hackers and evil-doers often use malicious queries to find and attack a blog’s weak spots. WordPress has good default protection, but enhancing it is possible.
The solution
Paste the following code in a text file, and save it as blockbadqueries.php. Once you’ve done that, upload it to your wp-content/plugins directory and activate it as you would any other plug-in. Now your blog is protected against malicious queries.
<?php
/*
Plugin Name: Block Bad Queries
Plugin URI: http://perishablepress.com/press/2009/12/22/protect-wordpress-against-malicious-url-requests/
Description: Protect WordPress Against Malicious URL Requests
Author URI: http://perishablepress.com/
Author: Perishable Press
Version: 1.0
*/
global $user_ID;
if($user_ID) {
if(!current_user_can('level_10')) {
if (strlen($_SERVER['REQUEST_URI']) > 255 ||
strpos($_SERVER['REQUEST_URI'], "eval(") ||
strpos($_SERVER['REQUEST_URI'], "CONCAT") ||
strpos($_SERVER['REQUEST_URI'], "UNION+SELECT") ||
strpos($_SERVER['REQUEST_URI'], "base64")) {
@header("HTTP/1.1 414 Request-URI Too Long");
@header("Status: 414 Request-URI Too Long");
@header("Connection: Close");
@exit;
}
}
}
?>
Code explanation
What this code does is pretty simple. It checks for excessively long request strings (more than 255 characters) and for the presence of either the eval or base64 PHP functions in the URI. If one of these conditions is met, then the plug-in sends a 414 error to the client’s browser.
Source
8. Remove Your WordPress Version Number… Seriously!
The problem
As you may know, WordPress automatically displays the version you are using in the head of your blog files. This is pretty harmless if your blog is always up to date with the latest version (which is certainly what you should be doing anyway). But if for some reason your blog isn’t up to date, WordPress still displays it, and hackers will learn this vital piece of information.
The solution
Paste the following line of code in the functions.php file of your theme. Save it, refresh your blog, and voila: no more WordPress version number in the header.
remove_action('wp_head', 'wp_generator');
Code explanation
To execute certain actions, WordPress uses a mechanism called “hooks,” which allow you to hook one function to another. The wp_generator function, which displays the WordPress version, is hooked. We can remove this hook and prevent it from executing by using the remove_action() function.
Source
9. Change The Default “Admin” Username

The problem
Brute force is one of the easiest ways to break a password. The method is simple: try as many different passwords as possible until the right one is found. Users of the brute force method use dictionaries, which give them a lot of password combinations.
But knowing your username certainly makes it easier for them to guess the right combination. This is why you should always change the default “admin” username to something harder to guess.
Note that WordPress 3.0 let you choose your desired username by default. Therefore, this tip is still usefull if you still use the old “admin” account from older WordPress versions.
The solution
If you haven’t changed the “admin” username yet, simply run the following SQL query to your database to change it for good. Don’t forget to specify your desired username.
UPDATE wp_users SET user_login = 'Your New Username' WHERE user_login = 'Admin';
Code explanation
Usernames are stored in the database. To change one, a simple UPDATE query is enough. Note that this query will not transfer posts written by “admin” to your new username; the source post below shows you how to easily do that.
Source
10. Prevent Directory Browsing
The problem
By default, most hosts allow directory listing. So, if you type www.yourblog.com/wp-includes in the browser’s address bar, you’ll see all of the files in that directory. This is definitely a security risk, because a hacker could see the last time that files were modified and access them.
The solution (Updated)
Just add the following to the Apache configuration or your .htaccess file:
Options -Indexes
Code explanation
Please note that it’s not enough to update the blog’s robots.txt file with Disallow: /wp*. This would prevent the wp-directory from being indexed, but will not prevent users from seeing it.
Source
(al)


alfredo
July 1st, 2010 6:19 amI just write to say I really loved your smashing cartoon, I know you guys are german and I hope Germany DESTROY!!!!!!!!!… Argentina
cheers from Mexico
Olli
July 1st, 2010 10:12 pmHope so too…
Mimi
July 2nd, 2010 9:11 pmhey, why so much hate!! Sore loser.
chestaz
July 3rd, 2010 7:27 amhahaha…german win….. :P
Argentina is loser….
Anna Blume
July 3rd, 2010 10:26 amEs ist vollbracht, por favor!
Sahus Pilwal
July 1st, 2010 6:22 amThanks for the tips! Will roll some of these out on our existing and upcoming WordPress Blogs. ;)
Shafiq Khan
July 1st, 2010 6:23 amSome cool tips here thanks.
I like using the Login Lockdown plugin too. But it isn’t fully compatible with WordPress 3.0 yet.
Darren Keirle
July 1st, 2010 6:23 amGreat post,
Will certainly follow several of these for my blogs!
Brandon
July 1st, 2010 6:29 amGreat article. A client of mine has been having some odd behaviors with their wordpress install. I’ve been looking for security features, outside of plugins, and this article pops up out of nowhere.
Thank you!
Maxime Guernion
July 1st, 2010 6:30 amThe “Disallow: /wp-*” (10. Prevent Directory Browsing) must be in your robots.txt file not in .htaccess file :)
Rama
January 16th, 2011 6:10 am@Maxime Guernion
robots.txt is not enforced by the server. You can still browse the directory if robots.txt says “Disallow”.
On the other hand, any directives in the .htaccess file will be enforced by the server.
Anand
July 1st, 2010 6:33 amNice post. I’ll implement them on my blog.
xyzzy
July 1st, 2010 6:42 amRegarding: “Use .htaccess To Protect The wp-config File”
A properly configured web server will serve a blank page if some user or bot tries to access wp-config.php. True, if PHP becomes disabled, then that file could be served as clear text, so adding .htaccess rules to prohibit web access to the file would help.
The “code explanation” for that tip mentions blocking access to wp-admin.php. I think it should be wp-config.php, since there is no wp-admin.php.
Posts like this need to be triple-checked for accuracy though. The advice to add “Disallow: /wp-*” to you .htaccess file will break your site. Also, that advice does not disallow directory browsing. It just stops good robots from indexing the directory.
You should just add an index.php file into directories like this, to stop browsing.
roose
July 1st, 2010 6:46 amI am not hacker, but i’m know which version use Jean-Baptiste Jung on Cats Who Code(2.8.4) and WpRecipes(2.9.1) and Cats Who Blog(3.0)
P.S. Sorry for my English
Maximilien
July 1st, 2010 7:03 amGreat post, thanks 4 the tips!
Pål Börje
July 1st, 2010 7:07 amTip # 10
Use:
# disable directory browsing
Options All -Indexes
in .htaccess
Sunny Kumar
July 1st, 2010 7:16 amVery Useful for WordPress Developers !
Darren
July 1st, 2010 7:17 amThese tips are really useful! Will definitely get round to using some of them.
The handy thing about most of these is that they can be implemented in only a few minutes, but can really help put your mind at rest. Perfect.
Evan Walsh
July 1st, 2010 7:21 amDisallowing access to wp-content will break any posts you have added attachments to.
Just so you know.
Rares Cosma
July 1st, 2010 7:34 amA fairly good collection of WordPress security tips. However, you should change the IP addresses in tip no. 4 to better reflect real addresses. (4 groups instead of 3, no value larger than 255)
Amit
July 1st, 2010 7:37 amIts awesome post about wordpress security. I will definitely use few for my blog.
Thanks
Klaus
July 1st, 2010 7:56 amyou have to delete the following files in the root directory:
readme.html, install.php (and liesmich.html in the german version)
otherwise everyone can find the version there.
Klaus
July 1st, 2010 8:02 amyou can also put the following lines in your .htaccess:
# protect readme.html
Order Allow,Deny
Deny from all
Satisfy all
# protect liesmich.html
Order Allow,Deny
Deny from all
Satisfy all
# protect install.php
Order Allow,Deny
Deny from all
Satisfy all
Kliky
July 1st, 2010 8:11 amThere is some good stuff here. One tip I always see is to change your default “admin” username (#9). However, I think it should be mentioned that site owners, once this is done, should be careful not to post under this new admin account (posting or editing while logged in). If you’re showing the author, the administrative account name is pretty much right back into the open.
Satya Prakash
July 1st, 2010 9:31 amI have tried solution for Malicious URL Requests and this does not worked.
I activated the plugin and it did not do anything,
I tried adding eval, eval() and base64 also. no one has given any error or anything new.
Vid Luther
July 1st, 2010 10:47 amI’m sorry but I have some serious issues with this blog post. There are too many of them, so I’ve listed them on my company blog http://zippykid.com/blog/2010/07/how-to-secure-a-wordpress-site/
Mike
August 20th, 2010 4:48 amLoL – this post should be deleted as it’s nothing but spam. “all these suggestions are bad bad bad, listen to me oh and by the way sign up for my affiliate program”.
Chris Robinson
July 1st, 2010 11:18 amPerfect, was just looking for a post like this…site got hacked the other day.
MichaelThompson
July 1st, 2010 12:05 pmNot sure about some of the advice on here, but there’s an official “Hardening WordPress” page everyone should read:
* http://codex.wordpress.org/Hardening_WordPress
Also, wp-config.php should be moved up a directory from your WP installl (likely out of doc root), not blocked using an .htaccess file.
Also, also the WP-Security Scan plugin rocks and strips versioning and various other WP-specific info from your pages.
originalgeek
July 1st, 2010 12:11 pmSeems like the rewriting rules from 5. Protect Your WordPress Blog From Script Injections are easily subverted using %escapes
Jeffri
July 1st, 2010 5:34 pmThe point 10, I think it is: Options -Indexes
You miss the s in Options.
Asela de Saram
July 1st, 2010 7:21 pmGood post. Thank you very much!
Something else which I believe is worth a mention is Akismet. It helps by keeping out (or reducing) comment spamming.
Hilmy
July 2nd, 2010 12:34 amGood to know some security loopholes on my WP sites. Immediately put some to use such as #3 and #10. Great help, thanks!
Sumit pranav
July 2nd, 2010 1:08 amReally a nice and informative article.
Andy Kinsey
July 2nd, 2010 1:21 amI wish I had these tips last year, I was running 2.5 or something at the time and got hacked I am now very very very security concious. Every little change helps :)
Artful Dodger
July 2nd, 2010 2:34 amHey, thanks for this. I just disabled directory browsing. I used to create blank index.php files but that used to take forever.
Lee Hord
July 2nd, 2010 5:54 amIt’s also helpful to enable cookie encryption on your WordPress site by using authentication keys. WordPress.org has a secret key generation service that generates a random set of keys to place in your wp-config.php file.
http://api.wordpress.org/secret-key/1.1/
Syed Balkhi
July 2nd, 2010 6:33 amFor the tip #1: Remove Login Errors is removing -all- login errors, which could be bad because it also omits notices about disabled cookies, etc. A more effective approach would be to have the function return:
str_replace( array( ‘Invalid username’, ‘Incorrect password’ ), ‘Invalid username or password’, $str );
This keeps the user informed of potential errors while obfuscating which field the error actually occurred in. One thing to keep in mind is that if the username is correct, WordPress will auto-populate that field in subsequent login attempts. A hacker aware of WordPress operation would then know that the username was indeed valid. You can prevent this by commenting out the appropriate section in the wp-login.php file (lines 529-530 in version 2.9.2)–not ideal, I know, but there are no hooks at that point in the code.
@eliorivero
July 2nd, 2010 6:41 amThe #8, Remove Your WordPress Version Number… Seriously! is not really serious :) You will be removing the version number from your site, but it will still be available to XML readers, like RSS or ATOM feed readers. The following snippet is the correct way to remove the WordPress version number from the website and RSS feeds.
add_filter(‘the_generator’, create_function(”, ‘return “”;’));
You can use it on your theme functions file (functions.php).
Srecko Bradic
July 2nd, 2010 8:43 amExcellent!!! Thank you for this information!
Cristian
July 2nd, 2010 9:38 amOne of the most useful articles I’ve read about WP lately! Thanks for sharing!
Luciano
July 2nd, 2010 10:22 amOn tip #9 I’d rather recommend to create a new admin and delete the previous one, since it would still remain with the ID = 1 in database. I already suffered an attack on a blog who had a different admin username but it got hacked still. I had to manually delete the row in order to prevent it from happenning again. Luckily, I had other admin at usage on the blog.
be_p
July 2nd, 2010 11:44 amThe best way to secure proof WordPress is to separate completely core/plugins files (wp-folders) from themes/assets/media files and then deny access to the firsts.
Shevonne
July 2nd, 2010 1:11 pmWill have to tweak my WordPress sites with these tips tonight
LoneWolf
July 2nd, 2010 1:44 pmThere is a better way to rename the admin user.
1) Create a new user. 2) Give them admin authority. 3) Log in under newly created users and delete the original admin user. 4) When asked, assign all posts to new administrative user.
This not only gives you a renamed user, but it also changes the user id # which is used internally. There is no longer a user id 1.
Ilie Ciorba
July 2nd, 2010 2:14 pmGreat post, I almost forgot point 9 :)
Darcy
July 2nd, 2010 3:07 pmI think tip #1, which suggests removing login error messages, is a bit misguided. Error messages are helpful feedback for users, so they really shouldn’t be disabled completely. Instead, you can check the actual text of the error message in your wp-login.php file and edit it so it is less descriptive.
Jean-Francois Monfette
July 2nd, 2010 6:05 pmVery useful info for anyone using wordpress, which is a lot of people !
Kishore Mylavarapu
July 2nd, 2010 6:40 pmAll ready discussed topics but this is a nice collective information..thank you
hokya
July 3rd, 2010 2:20 amcan you tell me how to avoid the blog to be fetched using file_get_contents() or CURL method ?
ian7
July 3rd, 2010 3:20 amPersonnaly, i wrote in my .htaccess :
« protect me, god »
And it works fine ^^
Anyway. Nice tips for my limited knowledge. Thank you.
Alex
July 3rd, 2010 8:23 amThanks for the tips. I just included 3 of them in my blog (which hasn’t been launched yet…).
Angela
July 4th, 2010 8:27 amI’m not able to get #6 above to work on WordPress sites. I changed URLs, etc., but still get a 500 error on the site.
Here’s a good post on how to correctly remove the generator tag (to remove from HTML as well as RSS feeds):
http://www.wpbeginner.com/wp-tutorials/the-right-way-to-remove-wordpress-version-number/
rlharris9337
July 4th, 2010 11:37 amThese sound very good. I just hope that I can do them correctly. lol Thanks.
Walter
July 4th, 2010 4:09 pmIn #6 you did not say you need to create an image if you want to display a ‘nohotlink.jpg’ image. Perhaps, if you want to drive more visitors to your site, it would be fun to create an image of text that will give the name of your web site if people want to see the real image and that the site they are on tried to steal your image. It could be better for you, and make the site which tried to steal your content look bad.
catge
July 4th, 2010 5:12 pmNice tips with a lot of help. thanks Jean
Irfan
July 5th, 2010 6:02 amLovly Post !!
I really like Smashing Magazines articles !
Too good !!
Giải Pháp Online Marketing
July 5th, 2010 7:23 pmit’s very usefull for my blog :)
Tookangweb
July 5th, 2010 9:09 pmThanks for share
it’s time to protect our wordpress
ants
July 6th, 2010 11:13 amGreat article for me (noob). Thanks.
Question though, would any of these .htaccess adjustments effect backing up of the database? (I\’ve used the codetree plugin and wordpress db backup) but none work now after adding some of these changes; i just get redirected to the home page.
Also not sure if this is causing the problem:
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\\.php*
RewriteCond %{HTTP_REFERER} !.*.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) http://%{REMOTE_ADDR}/$ [R=301,L]
from http://codex.wordpress.org/Combating_Comment_Spam/Denying_Access
Or could it be the blockbadqueries.php?
Thanks
ants
July 6th, 2010 3:22 pmI removed the blockbadqueries plugin and I was able to backup the database again.
Ants
July 6th, 2010 10:34 pmJust to set the record straight, it\’s not the blockbadqueries.php that is causing the problem it is the wordpress firewall. If you whitelist *wp-admin/tools.php* and *wp-admin/edit.php* it fixes it.
Odd thing is the problem happens at home but not on the work computer.
Chris Coyier
July 6th, 2010 6:36 pmGERMANY SUCKS
from: css-tricks.com with LOVE !
Kanwaljit Singh Nagra
July 7th, 2010 1:28 amVery good post – tips like this bring the real value to designers as tools such as WordPress are the most commonly used :D
Marko
July 7th, 2010 6:43 amNo need for function at number 8 (remove WordPress version). You could just remove one line responsible for version number from header.php
Otherwise, good list – thanks!
Gavin
July 22nd, 2010 2:27 amNooo. Marko don’t do this! This will break other things!
Mr.MoOx
July 7th, 2010 11:15 pmSorry but this post is completly USELESS, like Vid Luther said…
zippykid.com/blog/2010/07/how-to-secure-a-wordpress-site/
I’m a real developer (not a designer) so, please Smashing Magazine, dont allow post like that…
Justin
July 11th, 2010 10:17 amNice post. MIght be worth taking a look at the awesome gdpress tools plug in that will do quite a lot of this for you.
Joseph
July 12th, 2010 7:56 pmOne of the most helpful wordpress post I have come across! Things you never know possible can be prevented. Time to block those evils off your site. Much appreciate your effort in writing this post!!
Manish Kungwani
July 15th, 2010 9:17 amHi,
Nice tips, but since my WordPress blog is on IIS, and I dont have an .htaccess file, how should I implement these tips??
Jeza
July 19th, 2010 1:52 pmThe plug-in tutorial seems not to be working for me, is this because of wp 3.0?
aqcs336
July 22nd, 2010 11:49 pmgood team,i’ve spent so much time here
jared thompson
July 27th, 2010 7:12 ama must read for all wordpress users!
Irina
July 28th, 2010 11:15 pmThanks for the tips. I will definitely add these to my blog.
Jennie
July 30th, 2010 9:54 pmIt was really helpful for my website. Thank you
DashingArticles.com
CiNA
August 4th, 2010 1:13 pmReally useful … thanks
Sidd
August 12th, 2010 1:08 amThanks SM for pressing on with quality and relevance. Articles that explain clearly how to do what they suggest should be done are very useful. This one does it well.
Gunjan
September 10th, 2010 2:25 amhey perfect man thanks for sharing such information..
Regards,
Gunjan
Reaper2794
September 10th, 2010 1:27 pmFor number 10, how do we it? I dont know anything about Apache configuration…
Eric
September 18th, 2010 6:13 pmSome More Tips:
http://www.eukhost.com/forums/f38/wordpress-blog-11966/
njmehta
September 23rd, 2010 8:32 pmgreat list of word press security tweaks
njmehta
September 26th, 2010 7:39 pm10 Useful WordPress Security Tweaks – [link]
Francesco
September 30th, 2010 12:04 pmexcuse me,
thank you far the useful article, but……
when you say paste this and that in htaccess or functions php…. I would like to know where
sorry but I’m not programmer
can I paste the code where I want? In what lines?
Kevin
October 3rd, 2010 11:01 pmThe plugin referenced does not with 3.01. I found an update on the authors site.
http://perishablepress.com/press/2009/12/22/protect-wordpress-against-malicious-url-requests/
Dustin
October 5th, 2010 5:55 amHey Jean-Baptiste,
Great suggestions. Thank you. I would also add that it’s pretty important to re-name your WordPress database table in MYSQL to something other than wp.
In my experience working with WordPress it seems like hackers mostly target the backend with sql injections and XSS exploits.
There are other good wordpress security tips and optimizations over at my blog.
Amitash
October 20th, 2010 10:57 pmfantastic.. everything on the list is highly recommended!
Dewlance
October 24th, 2010 2:54 amHey! its a very nice tips, I can’t use Force SSL on my Blog.
I like change Admin username with SSH Command..
thanks.
Carson Rankin
November 15th, 2010 6:15 amLink directories are really nice to gain some backlinks. I use them when ican. Link directories are quick way to push your blog a bit.
Rama
January 16th, 2011 6:19 amI like the post as it is informatibe, but there are several issues in which this is not “real” security. Some of the points above can be bypassed by script kiddies.
One thing I think this post should have referred to is, “Hardening WordPress”: http://codex.wordpress.org/Hardening_WordPress
Cazare Brasov
January 28th, 2011 10:20 amRealy useful tips. Most of them refer to modify .htaccess file. Is this file rewriten when wordpress updates ?
Sharagim Habibi
February 12th, 2011 7:08 pmAnyone heard of lsx_06 as a security “patch?”
Rory
March 4th, 2011 8:37 amLovely tips cheers guys
Claiton
March 16th, 2011 6:18 amwordpress.org/support/topic/sidebar-per-page
ait-pro.com/aitpro-blog/695/wordpress-tips-tricks-fixes/custom-wordpress-sidebar-for-custom-wordpress-template-sidebar/
chidimar.com/create-custom-sidebar-in-wordpress-blog/
wpbeginner.com/wp-themes/display-different-sidebar-for-each-post-and-page-for-wordpress/
Mick
March 26th, 2011 7:28 amGreat article. I run quite a few wordpress blogs and have been worried after recent hacking attempts, especially as i rely on the sites for regular income.
I recently came across http://www.wordpresspadlock.com whcih offers a very cheap solution along with video instructions. Great site, great product, just wanted to pass it on.
dtgreen
April 2nd, 2011 1:59 amIf there was a hall of fame for WordPress articles, this would have to be right up there with the best of them. Just launching a site for a friend who is starting up a business, and this little checklist has just saved me a number of future security related headaches!
Mark
April 23rd, 2011 10:22 amFor those who wonder about the issue of security through obscurity, have a look at this article about WordPress Security and Obscurity – it offers some clarity and validates some of the tips outline in the article here at Smashing Magazine.
Peter
May 30th, 2011 4:15 pmGood tips; number 10 is an interesting one as many people do not understand the danger.
I did a post highlighting the thousands of vulnerable WordPress installations that can be found through directory indexing.
http://hackertarget.com/2011/05/google-dorking-wordpress/
peter
July 5th, 2011 12:22 amGood tips Great site very informative I enjoyed it thank you…cheers Peter
Heather Wood
July 11th, 2011 7:48 amI’m in awe as to how much I need to do to build a website. I am so grateful to have you guys do the hard research for me and make lists like this that make my life so much easier ^_^
ilan ver
August 10th, 2011 3:13 amI have to express my appreciation to this writer just for rescuing me from this particular problem. Just after surfing around throughout the online world and obtaining techniques that were not powerful, I was thinking my entire life was well over. Existing without the presence of approaches to the issues you’ve fixed all through this write-up is a critical case, and the kind that would have adversely damaged my career if I had not noticed your blog post. Your main expertise and kindness in touching every part was valuable. I’m not sure what I would have done if I hadn’t encountered such a thing like this. I can also now look forward to my future. Thank you very much for your expert and result oriented help. I won’t be reluctant to suggest your web sites to any individual who will need support about this situation.
David
August 29th, 2011 7:33 amGreat post. Thanks for sharing. I will use several of these tips.
Maybelle
September 28th, 2011 6:36 pmThank you very much for such useful information!
M Patterson
December 7th, 2011 10:14 pmI’ve had so many problems dealing with wordpress security breaches. I’ve used all the recommended plugins. Anyone got any solutions?
ashraf
December 12th, 2011 7:47 amthanks dude
nice post
ashraf
December 12th, 2011 10:36 pmForce SSL Usage
define(‘FORCE_SSL_ADMIN’, true);
Causing disruption of WP-admin
Tim Petters
January 18th, 2012 11:30 amGood stuff is always a good stuff. Thanks
Peter Hings
January 27th, 2012 12:25 pmGreat thanks for the share of info. Will use this on my new web :)
Red O'hara
February 6th, 2012 7:14 amThank You. It is useful for my 4 months old website. :)
Dan Orth
February 26th, 2012 6:38 amExcellent job. You not only covered many useful items, you also explained them well, as opposed to the normal “just do this” tactic.
Thanks for including the linkbacks as well!
Habiba Hamaki
March 1st, 2012 3:36 amThere are so many people who want to know how to make money, but there are so many pitfalls. NO wonder that 95% of all new businesses fail. Why do so many fail? Usually for…
Anders Vinther
May 11th, 2012 8:41 amHello,
Great post… One of the important things about your WordPress backup is that you store your backups outside your hosting account and that you workout a great backup strategy…
I’ve described a good mix of daily, weekly and monthly backups with auto-deletion of old backup archives here: http://www.wpsecuritychecklist.com/wordpress-backup-the-plugin-and-the-plan/
On this site you can also download a free, comprehensive WordPress Security Checklist, which will help just about everyone improve their security…
Just my two cents… keep up the great work!
Anders
Fontana Lorenzo
June 29th, 2012 3:35 pmRemember that there are a lot of hackers-vulnerable WordPress plugin, here there’s the list of them!
http://fontanalorenzo.it/wordpress/security/50-wordpress-plugins-vunlerable-to-arbitrary-file-upload.html
Noumaan Yaqoob
September 13th, 2012 4:46 pmIn the third tip under the heading code explanation it says “we have simply created a rule that prevents any access to the wp-admin.php file” which should be wp-config.php because there is no such file as wp-admin.php
shital
October 19th, 2012 2:25 amSecurity has always been a hot topic. Offline, people buy wired homes, car alarms and gadgets to bring their security to the max.
Dan
May 10th, 2013 1:41 pmAnother Tweak ….
We have recently published a plugin for strong authentication. It prefers usability to security so you can either login with a password or with one-time code.
If you’re on a secure network, you may want to use just your password but open your smart phone when connected through an insecure WiFi (cafe, train, …).
We tested it with a few smart phone apps: Google Authenticator, Pledge, DS3 OATH, AWToken so you don’t have to rely on Google completely.
Try to search for S-CRIB OTP Authenticator in the list of WordPress plugins or directly http://wordpress.org/extend/plugins/s-crib-otp-authentication/ .