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 SecurityWordPress is the world’s most used CMS making it a target for attempted hacker attacks.

In early 2013 a mass brute-force attack began hitting WordPress installations across virtually every WP host server in existence around the world.

These attacks were caused by networks of infected computers programmed to attack other sites (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)

One of the many ways hackers use to try and break into WordPress sites is by trying to guess the site’s administration login username and password. To achieve this, hackers use software programs that automatically tries to guess hundreds of login permutations in minutes.

If you’re using weak user names and predictable passwords, your website could be easily hacked by the software’s repeated attempts to guess your site’s login details.

This is called a “brute-force” attack.

Botnet – What Is This?

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 code, which can then be controlled remotely as a group, often without the computer owners even being aware that this is happening.

Botnets are typically used to send out mass spam emails from computers of unsuspecting users.

The screenshot below was taken from an internet security monitoring site 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” …

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

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

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

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

Being the world's most used CMS makes WordPress a target for hacking attacks

(WordPress often is targeted by hackers)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

To understand what makes WordPress a very secure web platform, read this article: Is WordPress Secure?

Important Info

It’s important to understand that, in the case of April 2013 large-scale brute force attack described above, there was actually no WordPress vulnerability being exploited (the same script was also targeting sites built using other platforms like Joomla).

Mike Little, the co-founder of WordPress with Matt Mullenweg, made the following comment about the botnet 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.


Preventing Your WordPress Website From Brute Force Attacks – Ten Security Measures

Every website with a security vulnerability can be seen as a potential opportunity to hackers. If you think that your website is of little value to hackers, think again. Large, medium and small business websites, personal blogs, government websites … even websites owned by online security and anti-hacking experts can and have been targeted.

If a hacker can discover a way to gain remote access and control of your website, that web site can then be used as a “bot” in a planned cyber attack against more valued sites.

Additional undesirable results of being hacked include getting blacklisted by search engines, having spammy links promoting things like gambling, porn, etc. inserted in your content and meta data, malicious redirects to phishing sites, drive-by downloads (adding malicious scripts on your visitors’ computers), and many other nasties.

The harsh reality is that brute-force software bots are most likely searching for exploits and trying to break into your website or blog as you are reading this page right now. Whether they will get into your site successfully will depend on how hard or easy you can make it for hackers and bots to keep persisting until they work out a way to get access, or give up and decide to look for an easier target.

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

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

WP Security Scan(WordPress Security Scan Screenshot:

You will see that the check will return a number of results and details about your site setup …

WP Security Scan

(WordPress security scan results. Screenshot:

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

Website Security Scan(Screenshot: BlogDefender site)

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 are all valuable information to hackers, as this informs them about any exploitable holes or weaknesses, especially where site owners haven’t updated their software versions.

If your website is driven by WordPress and you are not taking steps to bullet-proof your site, then it’s practically guaranteed that, at some time in the near future, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically targeting WordPress sites all the world!

When a site gets hacked, blog owners can discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been vandalized or even entirely wiped out. Typically, most sites will be infected with malicious software or viruses without the owner’s knowledge or awareness.

To avoid the heartache and aggravation (and potential financial loss) of having your website or blog being hacked into, below are ten simple, yet essential and effective security measures that will help to protect your WordPress site from being attacked by brute force botnets.


Note: A few of the steps below require some technical understanding of how to modify core WordPress and server files. If you are not technical, or don’t want to mess around with code on your site, then ask your web host or a professional WordPress technical provider for assistance.


Security Measure #1 – Contact Your Hosting Service

Get in touch with your hosting provider and ask them what precautions they offer to help prevent your site from botnet attacks, and what is done to ensure that your WordPress sites are regularly being backed up.

Check that your host regularly backs up your sites and that, if disaster strikes, you can quickly and easily recover your site.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Website Or Blog Frequently Maintained

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

A full WordPress maintenance routine ensures that:

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

A proper WordPress site maintenance routine looks like this …

Maintaining your WP web site backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP website regularly backed up and up-to-date is vitally important for WordPress security. Screenshot:

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

If you don’t want to back up your data manually, there are a number of WordPress plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Back Up, Copy & Protect Your WP Web Sites With Backup Creator Plugin For WP

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

The brute force attack on WordPress is mostly attempting to compromise site admin panels and gain access to the site by exploiting WP sites using “admin” as their username.

For reasons of website security, never install a WordPress site with the username admin. This is the first thing hackers will test. If your site’s user name is “admin”, then make sure you change it immediately.

For a tutorial that shows you how to change your admin username, go here: How To Change Your WP Admin Username

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when malicious software continually and persistently hits a username and password field with different character strings in an attempt to guess the right login combination that will give them access to your site.

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

Weak passwords, therefore, become really easy targets for attacks. Make sure that you change your password combination to a string that contains at least eight characters long, with both upper and lowercase letters, combined with “special” characters (e.g. ^, $, &, etc).

Practical Tip

You can use a password software tool like Roboform to generate hard-to-crack passwords …

You can use a password management software tool like Roboform to generate difficult passwords(You can use a password management tool like Roboform to create secure passwords)

We have created a detailed step-by-step tutorial on how to change your login password here: What To Do If You Need To Change Passwords

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

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)

If hackers break into your website, they will try to access your wp-config.php file, because this is the file that contains important information about your site’s database, 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 viewing 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 – Delete Or Rename Unnecessary Installation Files

Delete or rename your install.php, upgrade.php and readme.html files.

These files are completely unnecessary after installation and can be removed. If you don’t want to remove these files, just rename them.

Security Measure #7 – Update Your WordPress Site, Themes And Plugins To Their Latest Version

Hackers are always on the lookout for vulnerabilities they can exploit in older WordPress versions, including outdated versions of WordPress themes and plugins.

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

Security Measure #8 – Disable The WordPress Theme Editor

WordPress comes with a built-in editor feature that lets administrators edit theme and plugin code from the dashboard.

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

WordPress Theme Editor Menu

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

The WordPress theme feature lets anyone accessing your blog view and change your theme templates, or cause havoc on your site.

If you want to prevent people from being able to access 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 The WordPress Uploads Directory

The WordPress “uploads” folder stores all the media that gets uploaded to your blog.

Normally, this folder is visible to online users. All a person needs to do to view the contents stored in your site’s “uploads” directory is navigate to your directory using their browser …

(WordPress uploads directory)

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

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, someone could 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 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 some great security plugins for WordPress available that will address common security issues WordPress website owners face, such as preventing unauthorized users from accessing your site, protecting your site from malicious scripts, preventing injections of code into files, etc.

Many 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 issues that could lead to hackers accessing your site files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - WP total security software solution

(SecureScanPro – WordPress complete security software solution)

SecureScanPro is easy to install and easy to use, and takes care of 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 Plugin For WordPress Websites & Blogs

Blog Defender WordPress Security Suite(Blog Defender)

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

BlogDefender scans you website for security vulnerabilities …

Blog Defender WordPress Security PluginAnd lets you easily fix these …

Blog Defender Security SuiteIf you don’t want to purchase a security plugin like SecureScanPro or BlogDefender, you can use various free plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure web platform, but neglecting essential maintenance tasks like updating your WordPress installation, plugins and themes, tightening file and data security and taking other necessary precautions can expose your site to malicious by hackers and bots.

Regardless of the kind of business you run or plan to run online and how small you think your web presence is, you simply cannot ignore the importance of securing your website or blog.

As a final reminder, below is the advice given by a web security expert to all WordPress users after the global 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 very important if you run a WordPress site. Hopefully, the information in this article will help prevent brute-force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.

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

Get Thrive Leads for WordPress


"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill,


Originally published as How To Protect Your WordPress Site From A Brute-Force Attack.