Did you know that the standard WordPress installation is vulnerable to attacks from hackers? Well, it is, but fear not – there are steps you can take to protect your precious WordPress site/blog:
- WPDesigner gives tips on securing your blog. This includes:
- Staying updated – always make sure your site is running on the most updated version of WordPress.
- Make sure your wp-config file is not read or writable. The wp-config file is the one that is originally called wp-config-sample.php when you download the installation files, and you rename it to wp-config.php and change the information in it to match the database you set up. If you don’t know how to change file permissions, WPDesigner points us to the WordPress codex entry on the subject.
- Delete install.php once you’ve finished installing WordPress.
- Protect yourself against comment spam. WPDesigner has links to four resources that can help you with this.
- Limit self-registration of users – users can subscribe to your site very easily by visiting your login page. Make sure that either you have set WordPress to not allow anyone to register, or that if you do allow registrations, they are limited to the lowest permission levels. Again, see WPDesigner for more info.
- WPDesigner suggests creating a new admin account with a unique password, and deleting the default admin account.
- See the entry on Hardening WordPress in the WordPress codex for more information on securing your WordPress site or blog.
- Securing your plugin directory: Bill Hartzer says that it is important to protect your WordPress plugins directory. He says he doesn’t want people snooping around his plugins and seeing what he does with them, but I’m guessing that it’s probably not great from a security standpoint to leave the plugins directory wide open for hackers. Since the plugins directory does not have an index.html or index.php file in its root, if someone goes to your directory, they will see all your plugins. So he provides some code for creating a simple index.html page to put in your plugins directory. Once it’s there, no one can snoop (at least not easily).
- Update July 17, 2007: Josiah Cole gives a detailed explanation of how to create a .htaccess file that will help you secure your site, and aid the site in handling traffic and visitors. His .htaccess file will do the following:
- Protects itself (security)
- Turns the digital signature off (security)
- Limits upload size (security)
- Protects wp-config.php (security)
- Gives access permission to all visitors with exceptions (security, usability)
- Specifies custom error documents (usability)
- Disables directory browsing (security)
- Redirect old pages to new (optional)
- Disables image hotlinking (bandwidth)
- Enables PHP compression (bandwidth)
- Sets the canonical or “standard” url for your site (seo, usability)
- Update Sept. 5, 2007: Follow these instructions at BlogSecurity to create an .htaccess file that restricts wp-content and wp-includes, and restricts access to wp-admin.
I am definitely going to make the above part of my list of things to do to every WordPress site. Better safe than sorry!
Pingback: Things I do to optimize and secure every WordPress site and blog » wordpressgarage.com()
Pingback: Beskytt din wordpress innstallasjon()
Pingback: ?????? WordPress ?? - Nicky's blog()
Pingback: StumbleUpon can bring you serious traffic » wordpressgarage.com()
Pingback: bonq.net/flipp » Blog Archive » wordpress primer()
Pingback: Wordpress blogunuzu korumak için öneriler | Teknoloji Her?eyim()