Some idiots dropped a tonne of casino, poker and other files in a directory I left open to attack and then they spammed other sites linking to mine. You are probably coming here because I moved the folders that they wrote to and modified my .htaccess file so that you’re now seeing this.
If you did have your blog spammed and linked here, I apologize, it wasn’t me but I apologize nonetheless.
This is a newbie’s guide to securing WordPress.
- Disallow directory browsing
- Always stay on top of the latest version of WordPress.
- Add the following to your .htaccess file to prevent your database username and password from being compromised if your server has a problem serving PHP:
deny from all
- Report anything you think is a bug. This is useful because the WordPress crew can help you and eliminate this risk for everyone else which is very charitable of you and VERY cool.
- Make sure your web hosting company follows important upgrades with their server (usually Apache), database (usually MySQL) and version of PHP, although this should be a given from any reputable web host.
- Make a useful password – check the output from this utility. Although this isn’t necessary, I would suggest changing up a few characters and using non-alphanumeric characters in there like a “!” instead of “i”.
- You should not have to leave a directory open with chmod 777 permissions. Try using 755. If this does not work, try uploading with 777 then immediately setting the permissions to 755 on the directory. This (in most cases) should let the web server know that a web server is the owner of that directory.If you have to use 777 for images (for example) then at least add this to a .htaccess file in that directory:
Deny from all
<Files ~ “.(jpe?g|png|swf|gif)$”>
Allow from all
- Hackers trawl for footprints. A really big footprint is to display your blog’s version. You should remove this if you possibly can.
Remember, regular backups of your web-server are recommended. You can do this via a control panel (like Cpanel) or ask your web hosting company for more information.
I also advise that you search for WordPress backup plugins in the official WordPress plugin directory.