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 most popular CMS platform in the world and the preferred online publishing platform for millions of businesses and loved by thousands of website developers and web designers, it’s inevitable that at some point in time, WordPress will become an obvious target for attacks by hackers.

In April 2013, WordPress installations around the world were subjected to a worldwide brute-force attack.

These attacks were caused by computers infected with malware and programmed to attack other vulnerable installations (botnets).

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

What Are 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)

There are many methods hackers use to try and break into a WordPress site. One of these is by trying to guess the site admin’s login username and password. To do this, hackers use software programs that automatically tries to guess hundreds of login possibilities in minutes.

If you’re not using strong usernames or unguessable passwords, your site can be an easy target for hackers.

This is called a “brute-force” attack.


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.

(Source: Wikipedia)

”Botnets” are networks of private computers that have been infected with malicious scripts or software code, which can then be controlled remotely as a group, often without the unsuspecting computer owners even being aware that this is going on inside their device.

Botnets are regularly used to send mass spam emails.

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 infecting computer networks all around the world since 2009 called “Zeus” …

The Zeus botnet has been actively compromising computer networks all around the world since 2009.

(The Zeus botnet has been actively compromising computer networks all around the world since 2009. Screenshot source:

These ongoing botnet attacks on WordPress were highly distributed and well organized. Over 90,000 IP addresses were identified by several hosting companies just in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress site administration areas. The large-scale brute force attacks then continued, with over 30,000 WordPress sites and blogs being hacked per day.

Coverage of the April 2013 mass brute force botnet attack was reported by all the major webhosting companiesand leading technology publications, such as Forbes, TechNews Daily, PC Magazine, BBC News, Tech Crunch, and even on the official US Department of Homeland Security website …

WordPress is the world's most popular CMS which makes it a natural target for hacking

(WordPress is frequently the target of mass malicious attacks by hackers)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are many great reasons why you should choose WordPress if you are concerned about website security.

To learn why WordPress is a secure platform for websites, see this article: Is WordPress Secure?

Important Info

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

Mike Little, one of the co-founders of WordPress with Matt Mullenweg, said this 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.


Protecting Your WordPress Site From Being Brute Force Attacked – Ten Security Points

Every web site with a security vulnerability can be seen as a potential opportunity to hackers. No matter what type of business you run or plan to run online and how small you think your web presence is, securing your website or blog is something you simply cannot ignore. Large, medium and small business websites, personal blogs, government web sites … even websites owned by web security and anti-hacking experts can and have been targeted.

If a hacker can hack into and control your site, your site can then be employed as a “bot” to attack larger and more valuable web sites.

Additional undesirable effects of being hacked include being blacklisted by Google, having stealthy spam links promoting things like casinos, cheap offers on brand names, etc. inserted into your content and meta data, malicious redirects to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.

The truth is that malicious bots are probably trying to break into your blog at this very moment. Whether they can successfully get in will depend on how challenging you have made it for hackers or botnets to keep persisting until they work out a way to break in, or are forced to decide to look for a more vulnerable target.

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

Does your website run on WordPress? If so visit and run your site through their WordPress security check …

WP Security Scan(Website Security Scan Product image source:

You will see that the check returns a number of results and information about your website setup …

WordPress Security Check

(WP security scan results. Product image source:

It should be obvious after using the above tool that if you can see all of this information, so can hackers.

Hackertarget - Website Security Check(Image source: BlogDefender site)

The ability to see which version of WordPress you are using, which plugins and themes you have installed, and which files have been uploaded to certain directories can be potentially useful information to hackers, as this informs them about any exploitable security weaknesses, especially where the owners haven’t updated their files.

If your website runs on WordPress and you are not taking steps to toughen up your site, then it’s practically guaranteed that, at some point, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically hitting WordPress sites around the world!

Whenever a website is compromised, blog owners will find themselves “locked out” of their own site, or notice that their files have been modified or even entirely wiped out. Typically, compromised sites will become infected with malicious software without the owner even being aware of it.

To help avoid the heartache of 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 attacked by brute force botnets.

Useful Info

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


Security Measure #1 – Get In Touch With Your Webhosting Company

Get in touch with your webhosting service and ask them exactly what security measures are in place to protect your site from botnet attacks, and what they do to ensure that your files and data get backed up.

Check that your webhosting service provider regularly backs up your sites and that, if disaster strikes, you can easily recover your site.

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

Never rely on your webhosting provider for your site backups. Instead, learn how to maintain your WordPress site or pay someone to get this service done for you and develop a habit of religiously performing a complete WordPress site maintenance routine on a frequent basis (e.g. daily, weekly, monthly, etc …)

A full WordPress maintenance routine ensures that:

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

A full WordPress site maintenance routine looks like this …

Maintaining your WP installation fully backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress website or blog completely backed up and up-to-date is vitally important for WordPress security. Screenshot image:

Again, we cannot stress enough how vitally important maintaining your WP site frequently backed up and updated is. WP maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website or blog. If you do not want to learn how to do WP site maintenance yourself, pay someone to do it but make sure this gets done. Backing up your website is the next most important thing you must do after making sure that your heart is still beating!

If you don’t want to perform manual backups, there are many free and paid plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Back Up, Clone & Protect Your WP Site With Backup Creator WordPress Plugin

Security Measure #3 – Do Not Use “Admin” As A Username

The large scale brute-force botnet attack on WordPress sites was mostly attempting to compromise website admin panels and gain access to sites by exploiting sites using “admin” as the user name.

For website security purposes, avoid setting up WordPress sites with the username admin. This is the first thing hackers will test. If your blog’s user name is admin, you will need to change it immediately.

We have created a detailed step-by-step tutorial created especially for non-technical admin users on how to change your WordPress admin username here: Changing Your WP Admin Username To Another User Name

Security Measure #4 – Use A Strong Password

A “brute force” attack occurs when malicious software continually and persistently tries to guess the right combination of characters in a password and username that will unlock your website.

Unless you put some measure in place to prevent the brute force attack from happening (see further below for a couple of effective ways to do this), the “bot” will just continue attacking your site until it eventually breaks into your admin area.

Weak passwords, therefore, make very easy targets for attacks. Make sure that you change your password to a string that is at least 8 or 9 characters long, with both upper and lowercase letters, combined with “special” characters (e.g. ^, $, *, etc).

Useful Tip

If you have trouble coming up with strong passwords or feel reluctant to set up different passwords for all of your online logins, then use a password software tool like Roboform …

Roboform is a password software that lets you generate different secure login passwords(Roboform is a password management tool you can use to help you generate secure login passwords)

We have created a detailed step-by-step tutorial created especially for non-technical admin users on how to change your WordPress password here: How To Change A Password In WordPress

Security Measure #5 – Prevent Access To The wp-config.php File

The wp-config.php file contains information about your website’s database and is used to define advanced WordPress options.

wp-config.php file

(WordPress WP Config file)

If a hacker breaks into your website, they will typically search for your wp-config.php file, because this is the file that contains your WordPress database information, security keys, etc. Getting access to this information would allow them to change anything in your database, create a user account, upload files and take control of your site.

To protect your WordPress site from being attacked and even being used as part of a bot net, therefore, prevent people from being able to easily view your wp-config.php file. 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 WP Installation Files

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

You can remove these files after installation. If you don’t want to delete these files, just rename them.

Security Measure #7 – Upgrade Your WordPress Software, Plugins And Themes

Hackers search for vulnerabilities they can exploit in earlier versions of WordPress, including outdated versions of WordPress plugins and themes.

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

Security Measure #8 – Disable Your Theme Editor

WordPress comes with a built-in editor feature that allows the administrator to edit theme and plugin files inside the dashboard.

In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor in your admin menu …

WP Theme Editor Menu

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

The WordPress theme editor lets anyone accessing your site see and make changes to your WP theme templates, or cause havoc on your site.

If you want to prevent unauthorized people from being able to access your WordPress Theme editor, you will need to disable it. This can be done by adding code to your wp-config.php file.

Security Measure #9 – Protect Your WordPress Uploads Directory

The WordPress “uploads” directory contains all the media files that get uploaded to your blog.

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

(WordPress uploads folder)

(WordPress uploads folder)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers, someone could upload unauthorized file types or compromise the security of your site.

Protecting your directories will prevent unauthorized people 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 called “index.php”) to your uploads directory, and so on. Again, it’s best to consult a professional if you are not sure about what to do.

Security Measure #10 – Use Security Plugins

There are a number of WordPress security plugins available that specifically address common security issues WordPress website owners face, such as preventing unauthorized users from gaining access to vital information about your site, protecting your site from brute-force attacks, preventing injections of code into files, etc.

Many WordPress plugins address some but not all areas of WordPress security. One plugin that does a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your files and damaging your site is SecureScanPro.

SecureScanPro - security software for WordPress

(SecureScanPro – total security software for WordPress)

SecureScanPro is easy to install and easy to use, and fixes most of the security areas that WordPress users need to address.

Another great security plugin you may want to look at using is BlogDefender.

Blog Defender Security Suite For WordPress

Blog Defender WordPress Security Suite(Blog Defender Security Product Suite)

This product is a package of WordPress security video tutorials, plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender scans you WordPress site for potential security weaknesses …

Blog DefenderAnd lets you fix these quickly …

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

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure web platform, but neglecting essential maintenance tasks like updating your WordPress installation, WP plugins and themes, tightening file and data security 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, you cannot afford to ignore the importance of website security.

As one last reminder of the importance of keeping your websites protected, below is the advice given by an expert on website security to all WordPress users after the large-scale brute-force attacks on WordPress in April 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, WordPress 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 consult a WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

Also, remember subscribe to to be notified via email whenever we publish new tutorials on WordPress security and reviews of WordPress security plugins and solutions.


"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