How To Protect Your WordPress Site From A Brute-Force Attack

Learn how to protect your WordPress site from being brute-force attacked, or having its security compromised by hackers or bots.

WP SecurityWhen you are the world’s leading CMS platform and the preferred online publishing platform used by millions of websites and loved by thousands of web developers and web designers, it’s inevitable that at some point in time, WordPress will become a target for attacks from hackers.

In April 2013 a mass brute-force attack hit WordPress installations across virtually every web host in existence.

These attacks were caused by computers infected with malware and programmed to attack other installations, also commonly known as “botnets”.

How To Protect Your WordPress Site From A Brute-Force Attack

Brute-Force Attacks

A brute-force attack is a technique used to break an encryption or authentication system by trying all possibilities.

(Source: Chinese University Of Hong Kong)

One of the many ways hackers will attempt to break into a WordPress site is by trying to guess the site admin’s login username and password. This is achieved using software tools that automatically tries to guess hundreds of login permutations in minutes.

If you’re using weak user names and passwords that are easy to guess, your site can be easily hacked by the software’s repeated attempts to work out your site’s login details.

This is called a “brute force” login attack.

Botnets – What Are They?

A botnet is a number of Internet-connected computers communicating with other similar machines in an effort to complete repetitive tasks and objectives. This can be as mundane as keeping control of an Internet Relay Chat (IRC) channel, or it could be used to send spam email or participate in distributed denial-of-service attacks. The word botnet is a combination of the words robot and network.


A “Botnet” is a network of private computers that have been infected with malicious scripts or software code, which are then controlled remotely as a group, often without the unsuspecting computer owners even being aware that this is taking place inside their machine.

Botnets are often used to send mass spam emails from computers of compromised user accounts.

Below is a screenshot taken from a site that monitors online security showing the locations of the command centers of a botnet that has been actively compromising computer networks all around the globe since 2009 called “Zeus” …

ZeuS is a botnet that has been actively compromising computer networks all around the world since 2009.

(ZeuS is a botnet that has been actively compromising computer networks all around the world since 2009. Image:

These were highly distributed and well organized botnet attacks. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress user administration areas. The large-scale brute force attacks continued after this, with over 30,000 WordPress sites being hacked every day.

Coverage of this worldwide brute-force attack was widely reported in all of the major webhosting companies, as well as the leading technology media publications, such as Forbes, TechNews Daily, PC Magazine, Tech Crunch, BBC News, and even on the official US Department of Homeland Security website …

WordPress often comes under attack by hackers, due to its popularity

(Powering millions of sites worldwide makes WordPress an obvious target for attacks by hackers)

Does This Mean We Should Stop Using WordPress?

No. In fact, there are lots of great reasons why you should use WordPress if you are concerned about the security of your website.

We explain why WordPress is a secure platform for websites in this article: Why WordPress Is A Secure Platform For Websites –

Important Info

It’s important to understand that, in the case of the large-scale brute-force attack described above, no specific WordPress vulnerability was being exploited (the same script was also attacking sites built using other web applications like Joomla).

Mike Little, one of the co-founders of WordPress, made the following comment about the brute-force attacks:

It is a “simple” script that attempts to login using the admin login and a generated password. So if your password is too short or based on dictionary words it will be guessed and then the script can login legitimately and do whatever it wants including installing scripts (as plugins) or editing files. The attack tries to guess your password, if it succeeds, the most secure site in the world is wide open because they have your password.


How To Protect Your WordPress Site From Brute-Force Attacks – 10 Security Points

Every website or blog with a security vulnerability offers some degree of potential value to hackers. A vulnerable web site not only provides newbie hackers opportunities to improve their hacking skills and claim “bragging rights” amongst their peers, but it can also acts as a valuable resource for launching denial of service attacks, spreading malware and information theft.

If someone can hack into and remotely control your website, your blog can then be used as a “bot” in a planned cyberattack against other valuable websites.

Additional undesirable effects of having your site hacked include getting blacklisted by search engines, having spammy links promoting things like gambling, porn, etc. inserted into your content and meta data, malicious redirects to phishing sites, drive-by downloads (adding malicious software on your visitors’ computers), and lots of other nasty things.

The harsh reality is that malicious bots are most likely trying to hack into your website or blog while you are reading these very words. Whether they will hack in or not, will depend on how difficult or easy you can make it for them to continue trying until they can discover a way to get access, or give up and decide to look for a less protected target.

How Much Information About Your Site Are You Broadcasting To Hackers?

If you visit a site like and run your site through their WordPress security scan …

WordPress Security Check(Hackertarget – WordPress Security Check Screenshot source:

You will see that the check returns various results and information about your site …

Hackertarget - WordPress Security Check

(Hackertarget – WP security check results. Source:

It should be obvious after using the tool shown above that if you are able to see all of this information about your WordPress website, hackers can too.

Hackertarget - WP Security Check(Source: Blog Defender)

The ability to see which version of WordPress you are using, which plugins and themes you have installed on your site, and which files have been uploaded to certain directories in your site are all valuable information to hackers, as this can inform them about any potential security vulnerabilities, especially where the owners haven’t updated their files.

If your website is driven by WordPress and you are not precautionary steps to toughen up your site, we can practically guarantee that, at some point, someone will attempt to hack your site, because these attacks are systematically hitting WordPress installations worldwide!

When a site gets compromised, website owners can find themselves “locked out” of their own site, or notice that their content has been modified or even entirely wiped out. Often, sites will be infected with malicious software or viruses without the owner even being aware that a breach has taken place.

To help avoid the heartache (and significant financial loss) that comes with having your website or blog being hacked into, we have listed below 10 simple, yet essential and effective security checks that will help to protect your WordPress site from being brute-force attacked.


Note: Some of the recommended steps shown below require some technical skills to modify core WordPress or server files. If you have no technical skills, or don’t want to mess around with file code, then ask your web host or search for a WordPress technical provider in our WordPress Services Directory.


Security Measure #1 – Get In Touch With Your Web Host

Contact your hosting provider and ask them what security systems have been put into place to help prevent your site from botnet attacks, and what they do to ensure that your server files and data get backed up.

Check that your host backs up your sites and that, if anything happens, you can quickly and easily get your files back.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Frequently Up-To-Date

You should never rely only on your webhosting service for your site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this service done for you and develop a habit of performing a full WordPress site maintenance routine on a regular basis (e.g. weekly, fortnightly, etc …)

A full WordPress maintenance routine ensures that:

  • All unnecessary files and data are removed,
  • All WP files and data are free of errors, optimized and backed up,
  • All WordPress software, themes and plugins are up-to-date,
  • etc …

A full WordPress site maintenance routine looks like this …

Maintaining your WordPress web site completely backed up and updated is vitally important for WordPress security.(Maintaining your WordPress installation regularly backed up and updated is vitally important for WordPress security. Screenshot:

Again, we cannot stress enough how important maintaining your WP site completely backed up and updated is. WordPress site maintenance is not hard or time-consuming, but it must be done to ensure the security of your website. If you don’t want to learn how to do WordPress maintenance yourself, pay someone to do it but make sure it gets done. Backing up your site is the second most important thing you should do after making sure that you still have a pulse!

If you don’t want to perform manual backups, there are many free and paid WordPress plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Backup, Copy And Protect Your WordPress Site With Backup Creator Plugin For WordPress

Security Measure #3 – Make Sure That Your Username Is Not “Admin”

the worldwide brute-force attack on WordPress sites was mostly an attempt to compromise site administrator panels by exploiting sites with “admin” as their account name.

For reasons of website security, never install sites with the username admin. This is the first area hackers will test. If your blog’s user name is admin, you need to change this immediately.

We have created a simple tutorial for WordPress admin users that shows you how to change your login username here: Changing Your WP Admin Username To A Different User Name

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when malicious software continually and persistently hits a login or password field with different strings of characters trying to guess the right login combination that will unlock your site.

Unless you put some measure in place to block the brute force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually “cracks” the code.

Weak passwords, therefore, become very easy targets for botnets. Make sure that you change your password to something containing at least 8 characters long, and that includes upper and lowercase letters, and “special” characters (e.g. %, $, @, etc).


Roboform is a password management software that lets you easily generate strong login passwords …

Roboform is a password management program you can use to help you generate different  passwords(You can use a password management tool like Roboform to create very secure passwords)

We have created a simple step-by-step tutorial for WordPress admin users that shows you how to change your admin password here: Changing Passwords

Security Measure #5 – Prevent Your wp-config.php File From Being Accessed

The wp-config.php file allows WordPress to communicate with the database to store and retrieve data and is used to define advanced options for WordPress.

wp-config.php file

(WordPress WP Config file)

If hackers break into your site, they will look for your wp-config.php file, because this file contains your database details, security keys, etc. Getting access to this information would allow a hacker to change anything in your database, create a user account, upload files and take control of your site.

In order to protect your WordPress site from being attacked and even being used as part of a bot net, therefore, you must prevent your wp-config.php file from being accessed. This requires knowing how to edit database information, move files around in your server and changing access permissions.

Security Measure #6 – Rename Or Delete Unnecessary Installation Files

Rename or delete your install.php, upgrade.php and readme.html files.

You can remove these files after installation, as they are unnecessary. If you don’t want to remove these files, then just rename them.

Security Measure #7 – Upgrade Your WordPress Site, Plugins & Themes To Their Latest Version

Hackers look for vulnerabilities they can exploit in outdated WordPress versions, including out-of-date versions of WP plugins and themes.

Ensure that all of your WordPress installation files, plugins, themes, etc. are always up to date.

Security Measure #8 – Disable The Theme Editor

WordPress installations come with a built-in editor feature that lets the administrator edit plugin and theme code inside the dashboard.

In WordPress, you can access the WordPress Theme Editor by selecting Appearance > Editor from your dashboard menu …

WP Theme Editor Menu

(The WordPress theme editor can be accessed via the WordPress admin menu)

This allows anyone accessing your site’s admin to view and change your WordPress files, and create mayhem on your site.

If you want to prevent unauthorized people from accessing the WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Protect Your WordPress Uploads Directory

The “uploads” folder contains all the media that gets uploaded to your site.

By default, this folder is visible to anyone online. All a person needs to do to see the contents in the “uploads” directory is visit the directory using their web browser …

(WordPress has an uploads folder where your media files are stored)

(WordPress has an uploads directory where media content is stored)

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, anyone can upload unauthorized file types to your site.

Protecting your directories will prevent online users from accessing your ‘uploads’ folder and other important directories. This can be done using plugins, setting file permissions, adding a blank index.php file (this is literally an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to ask help from someone who knows what they are doing if you are unsure about what to do.

Security Measure #10 – Use Security Plugins

Some great security plugins for WordPress are available that specifically address common security issues faced by WordPress site owners, such as preventing hackers from accessing vital areas of your site, protecting your site from brute-force attacks, preventing injections of code into files, etc.

Most WordPress plugins address some but not all areas of WordPress security. One security plugin that seems to do a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your site files and causing damage to your site is SecureScanPro.

SecureScanPro - WP total security plugin

(SecureScanPro – security software solution for WordPress)

SecureScanPro is easy to install and easy to use, and takes care of most of the security issues that WordPress users need to address.

Another great plugin you may want to consider using is BlogDefender.

Blog Defender Security Product Suite For WordPress Web Sites

Blog Defender WordPress Security Plugin(Blog Defender Security Suite For WordPress Web Sites)

This product is a suite of WordPress security video tutorials, WordPress plugins and tools, plus a WordPress security PDF/DOC file.

BlogDefender shows you where the security weaknesses in your website are …

Blog Defender Security Solution For WordPressAnd lets you fix these quickly and easily …

Blog DefenderIf you don’t want to invest in a premium security plugin like SecureScanPro or BlogDefender, you can use various free WordPress plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting essential maintenance tasks like updating your WordPress installation, plugins and themes, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

Regardless of the kind of business you run or plan to run online and how small you think your web presence is, website security is something you cannot afford to ignore.

As one last reminder, below is the advice given by a web security expert to all WordPress users following the worldwide brute-force attacks by botnets on WordPress in 2013 …

Owners of websites based on WordPress CMS must improve at least basic security settings and implement best practices such as the use of robust passwords and the accurate management of “admin” accounts.

Pierluigi Paganini, Chief Information Security Officer, Security Affairs


As you can see, website security is of the utmost importance if you run a WordPress site. Hopefully, the information in this article has shown you what to do to prevent brute force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please seek help from a WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to to receive notifications when we publish new articles on WordPress security and tutorials about new WordPress security plugins.


"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now