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 often the target of attacks by hackers, due to its global popularity.

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

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

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

About 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’s administration login username and password. To achieve this, hackers use software programs that automatically tries to guess hundreds of possible login combinations in minutes.

If you’re using obvious login details, your site could be an easy target for hackers.

This is called a “brute force” login 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/botnet)

A “Botnet” is a network of computers that have been compromised and infected with malicious code, which can then be controlled remotely as a group, typically without the computer owners even being aware that this is taking place.

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

The screenshot below was 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” …

ZeuS is a botnet that has been actively infecting 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. Screenshot image:

These were well organized and highly distributed attacks. Over 90,000 IP addresses were identified by several 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 then continued, with over 30,000 WordPress sites being hacked each day.

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

WordPress is often the target of malicious attacks by hackers, due to its popularity

(WordPress is the world’s most used content management system which makes it a natural target for attempted hacker attacks)

Does This Mean WordPress Is Not Secure And We Should Stop Using It?

No. In fact, there are lots of very good reasons why you should continue using WordPress if you are concerned about the security of your online presence.

To learn what makes WordPress a very secure platform for websites, see this article: How Secure Is WordPress? What Every Website Owner Needs To Know About WordPress Security

Important Info

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

Mike Little, one of the co-founders of WordPress, made this 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.


Protecting Your WordPress Website From Being Brute Force Attacked – 10 Security Measures

Every website with a security vulnerability provides some type of opportunity to hackers. An unsecured blog not only offers hackers opportunities to improve their skills and win “respect” from their peers, but it can also serve as a platform for distributed denial of service attacks, distributing malware and participating in information theft.

If someone can exploit a security weakness that allows them to gain remote control of your blog, the website can then be employed to target other valuable sites.

Additional undesirable impacts of having your site hacked include getting blacklisted by search engines, having spammy links advertising things like gambling, cheap offers on brand names, etc. in your content and meta data, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasty things.

The truth is that malicious bots are scouring for weaknesses and trying to hack into your site right now. Whether they will successfully get in will depend on how hard you will make it for hackers and botnets to continue persisting until they work out how to get in, or decide to look for a more vulnerable target.

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

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

Hackertarget - Website Security Check(Website Security Scan Product image source:

You will see that the test will return various results and details about your site setup …

Hackertarget - Website Security Check

(Hackertarget – WP security check results. Screenshot source:

It should be obvious after using the tool shown above that if you are able to freely access all of this information, so can hackers.

Hackertarget - Website Security Check(Product image: Blog Defender)

Being able to see what 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 can inform them about exploitable holes or weaknesses, especially where the owners haven’t updated their software versions.

If your site or blog runs on WordPress and you are not proactive steps to toughen up your site, we can practically guarantee that, at some point in time, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically hitting WordPress sites all the world!

When a website or blog gets hacked, webmasters can find themselves completely “locked out” of their own site, or notice that their files have been altered or even that their content has been completely wiped out. Typically, compromised sites will become infected with malicious software without the owner even being aware that this has taken place.

To help avoid the heartache of discovering that your website or blog has been hacked into, below are ten simple, yet essential and effective security checks that will help to prevent your WordPress site from being brute force attacked.


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


Security Measure #1 – Get In Touch With Your Hosting Service

Get in touch with your hosting service provider and ask them exactly what systems they have put into place to protect your site from being attacked, and what is done to ensure that your server files get regularly backed up.

It’s important to make sure that your web host regularly backs up your server files and that, if anything should happen, you can quickly and easily get your files back.

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

Never rely just on your web host for site backups. Instead, learn how to maintain 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 regular basis (e.g. weekly, fortnightly, etc …)

A complete WordPress maintenance routine ensures that:

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

A complete WP maintenance routine looks like this …

Maintaining your WordPress web site frequently backed up and updated is vitally important for WordPress security.(Maintaining your WP web site fully backed up and updated is vitally important for WordPress security. Image source:

Again, we cannot stress enough how important it is to maintain your WordPress web site regularly backed up and updated. 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 WP site maintenance yourself, pay a professional to do it but make sure this 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 perform manual backups, there are many plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Backup, Clone & Keep Your WordPress Websites Protected With Backup Creator WP Plugin

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

The mass brute-force botnet attack on WordPress sites was mostly attempting to compromise website admin panels by exploiting installations with “admin” as their username.

For reasons of website security, don’t set up WordPress sites with the username admin. This is the first area of potential vulnerability hackers will test. If your site’s username is “admin”, you should change it immediately.

For a simple tutorial that shows you how to change your username, go here: Changing Your WordPress Username From Admin To A More Secure Username

Security Measure #4 – Change Your Password

A “brute force” attack occurs when malicious software continually tries to guess the right username and password character string that will unlock your site.

Unless some measure is put into 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 keep attacking your site until it eventually works out the combination.

Passwords that are easy to guess, therefore, become really easy targets for hacking attacks. Make sure that you change your password combination to something that contains at least 8 characters long, and that includes upper and lowercase letters, and add a few “special” characters (e.g. ^, $, &, etc).


Roboform is a password management program that lets you create different secure passwords …

Roboform is a password management program you can use to generate really secure passwords(Roboform is a password management software that lets you create secure login passwords)

For a simple step-by-step tutorial for non-technical WordPress admin users on how to change your password, go here: What To Do If You Need To Reset Your Password In WordPress

Security Measure #5 – Deny Access To Your WP Config File

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

wp-config.php file


If a hacker breaks into your WordPress site, they will typically search for 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 someone to change anything in your database, create a user account, upload files and take control of your site.

To protect your WordPress site from attacks and even being used as part of a bot net, therefore, prevent your wp-config.php file from being easily accessible. 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 the install.php, upgrade.php and readme.html files from your server.

These files are not required after installation. If you don’t want to delete these files, just rename them.

Security Measure #7 – Keep Your WordPress Files, Plugins And Themes Up-To-Date

Hackers are always on the lookout for vulnerabilities in older versions of WordPress that they can exploit, including out-of-date versions of WP plugins and themes.

Make sure to keep your WordPress files, themes, plugins, etc. up-to-date.

Security Measure #8 – Disable The WordPress Theme Editor

WordPress comes with a built-in editor feature that lets the administrator edit plugin and theme files from the dashboard area.

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

WordPress Theme Editor Menu

(The WordPress theme editor is accessible via the WP dashboard menu)

This allows anyone accessing your site’s admin area to see and edit your WP theme files, and cause havoc on your site.

If you want to prevent 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 – Prevent Access To Your WordPress Uploads Directory

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

Normally, this folder is visible to online users. All someone has to do to view all of the contents in the “uploads” folder is visit the directory using a web browser …

(WordPress uploads folder)

(WordPress uploads directory)

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, this could compromise the security of your website.

Protecting your directories will prevent online users from viewing your ‘uploads’ folder and other important directories. This can be done using plugins, setting file permissions, uploading a blank index.php file (this is literally a file with nothing in it named “index.php”) to your uploads directory, and so on. Again, it’s best to get professional assistance if you are unsure about what to do.

Security Measure #10 – Install Security Plugins

There are several WordPress security plugins available that specifically address most security issues faced by WordPress website owners, such as preventing hackers from accessing your site, protecting your website from malicious software, preventing unauthorized file uploads, etc.

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

SecureScanPro - complete security software for WordPress

(SecureScanPro – WP total security plugin)

SecureScanPro is easy to install and easy to use, and does a great job of fixing most of the security areas that WordPress users need to address.

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

Blog Defender Security Solution

Blog Defender(Blog Defender WordPress Security Suite)

Blog Defender is a suite of WordPress security video tutorials, WordPress plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender scans you WordPress site for potential security holes …

Blog DefenderAnd then shows you how to fix these quickly …

Blog DefenderIf you don’t want to purchase a premium 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 very secure web platform, but neglecting essential maintenance tasks like updating your WordPress software, WP plugins and WordPress themes, tightening file and data protection and taking other necessary precautions can expose your website to attacks 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 web security.

As a final reminder of the importance of keeping your websites protected, below is the advice given by a security expert to all WordPress users following the large-scale brute-force attacks by botnets 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, website security is of the utmost importance if you run a WordPress site. Hopefully, the information in this article has provided you with the initial steps you need to take to keep your WordPress site protected from brute force attacks. 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 subscribe to to receive notifications whenever we publish new tutorials on WordPress security and reviews of WordPress security plugins.


"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum