WordPress Security How To

Most of the information in this article is general and I recommend heading to blogsecurity.net for up to date information on WordPress security.

Blogging is supposed to be fun but it isn’t always like that. If you are hosting your own blog there is a great chance that one day a hacker may decide to target your site.


As good as it is, WordPress still has security issues. Upgrading to the latest version is a must if you want to lower the risk of getting your site hacked.

Upgrading today is really easy, thanks to excellent plugins like Instant upgrade. You have no excuse not to upgrade.

Folder access

Create empty index.html file (no content in it). Upload this file to your wp-content/plugins and wp-content/themes.

This will prevent anyone from looking over at what plugins and themes you have.

Secret Key

Edit your wp-config.php and change or create the SECRET_KEY definition. It should look something like this (alter the key value to your likening):

define('SECRET_KEY', '1234567890');

Active Plugins

If you have access to your database, check the table wp_options and look for the record 'active_plugins'. It will list all really active plugins on your blog. Hacker may upload a file to your upload folder and activate it as a plugin so you want to make sure there are no alien plugins listed there.


Check your .htaccess file located in blog's root directory. Normally it should contain only references to index.php file for suspicious activity.

File change notifications

You can install file change notifications for your blog, sending you an email whenever one of your WordPress files on the server changes.

Exploit scanner

Install WordPress Exploit Scanner plugin. It scans through all files in your WordPress installation and searches for malicious looking code. You want to check if any of the warnings contain links to  sites you are not familiar with.

User registration

If you are the only registered user of you WordPress blog, turning off “Anyone can register” option in your General settings of the Admin panel is a nice precaution as this was the source of biggest troubles in the past.


Should the trouble still happen, be sure you have at least weekly backups of your blog. WordPress Database Backup plugin will automate this work for you, so no reason not to use it.


  1. Dec 2nd, 2016 7:00 PM

    The most important points only one that is always updated WordPress core and plugins.
    for advanced access rule as set in a .htaccess file, wp-config and disable wp trackback

  2. Sep 3rd, 2014 2:09 PM

    Good list of recommendations. Do everything you can to prevent hacks, but my number one recommendation is always to make regular backups. Glad you mentioned it in your article. Too many people put it off and by the time they get round it their site has already been hacked.

Have your say

You must be logged in to post a comment.