How can I prevent my site from being hacked?

Typically, most sites are hacked because of poor passwords, older and exploitable software, or world-writeable permissions (777).

  1. Make your password hard for other people to guess and hard for a brute force attack to succeed.
    Passwords should be at least eight characters containing lower-case letter, upper-case letter, number and special character ($, -, !).

  2. Checking monthly, or even bi-monthly for newer versions of the software installed on your site, you are making it much more difficult for a potential attacker to gain a foothold.

  3. World-writeable permissions (chmod) are rarely needed in any situation. Instead, use 755 for executables, and 644 for all other files.

  4. Protection with .htaccess - The hacks below will help you to further protect your website/blog. Simply place the snippets in your hosting account's root .htaccess file.
    1. .htaccess rules to Harden your website’s Security
    2. Block Bad Bots and Spiders using .htaccess
    3. GET/POST Security with .htaccess

Was this answer helpful?

Also Read

Resolving XMLRPC DDoS WordPress Attack with .htaccess

Brute Force Attacks against WordPress have always been very common.Here is how to temporarily...

I cannot Access my Website / Unban IP from Firewall

If you can't access your website and email, this is most likely due to your IP address being...

.htaccess rules to Harden your website’s Security

Below you see a list of the important rules that you can add to your .htaccess file to harden...

What does File Permissions "chmod" mean?

To chmod a file means to set certain permissions. By default, all files uploaded to the server...

Protect your WordPress from Brute Force Attacks

Recently, there was a worldwide, highly-distributed Brute Force Attack on WordPress sites....