To be honest with you, I have played both spectrums - WP security consultant and "hired goon"
My suggestions on preventing your WP site from being hacked:
- always make sure that your WP version is up to date.
- "nulled" plugins can quite often have back-doors
- never have your admin login be "admin"
- Limit login access attempts:
http://wordpress.org/extend/plugins/login-lockdown/
- Track your site's logins:
http://wordpress.org/extend/plugins/simple-login-log/
- secure your wp-config file:
HTML:
<files wp-config.php>order allow,denydeny from all </files>
- Disable file editing (place in wp-config.php):
HTML:
define('DISALLOW_FILE_EDIT', true);
- Disable the WP version number on site and RSS feed (paste into theme's function.php file):
HTML:
function mysite_remove_version() {return '';}add_filter('the_generator', 'mysite_remove_version');
- Open up wp-config.php and and look for the "secret keys". If they aren't there or the default keys are shown, then get new keys and paste them in your config file:
HTML:
https://api.wordpress.org/secret-key/1.1/salt/
- When you first install WP, it gives you a default database prefix of "wp_", you will want to change that to something else. For example, something like "secretdb_"
- protect your .htaccess file (add this into your wp-config.php file):
HTML:
<Files .htaccess> order allow,deny deny from all </Files>
- To have added security for your admin login, you can prevent access to login pages based on IP address. You can do this by opening up your .htaccess file and adding this:
[hmtl]
<Files wp-login.php>
Order Deny,Allow
Deny from all
Allow from xx.xx.xx.xx
</Files>
[/html]
The xx.xx.xx.xx would be your IP address in which you can find your IP here:
http://whatismyipaddress.com/
Then you will need to to the same in your admin folder. So open up your /admin folder and see if there is a .htaccess file in it. If there is, great! Otherwise, you will have to create one. Once you have done that, just paste this code in there:
HTML:
Order Deny,AllowDeny from allAllow from xx.xx.xx.xx
There you go! That will get all of the starters pretty much secured. Of course there is a lot more to do if you want to completely secure your site - but the info above is a good start. Also, i'd recommend using cloudflare.com, that will prevent known spammer and hacker IP's from entering your site.