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 SecurityPowering millions of websites and blogs around the world makes WordPress a target for attempted attacks by malicious users.

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

These attacks were caused by computer networks infected with viruses and programmed to attack other computers (called “botnets”).

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

What Is A Brute-Force Attack?

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 WordPress sites is by trying to guess the site admin’s login username and password. To do this, hackers use software programs and scripts that automatically tries to guess hundreds of possible logins in minutes.

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

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/botnet)

A “Botnet” is a network of private computers that have been infected with malicious code or scripts, which can then be controlled remotely as a group, often without the unsuspecting computer owners’ knowledge.

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 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 infecting computer networks all around the globe since 2009. Screenshot source:

The ongoing botnet attacks on WordPress sites were well organized and highly distributed. 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 users admin areas. The large-scale attack then continued, with over 30,000 WordPress blogs being hacked per day.

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

Being the world's most used content management system makes WordPress a target for hackers

(WordPress powers millions of sites around the world, making it an obvious target for attacks by hackers)

Does This Mean We Should Stop Using WordPress?

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

To understand what makes WordPress a very secure platform for websites, read this article: Can You Build A Secure Business Online Using WordPress?

Important Info

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

Mike Little, the co-founder of WordPress, said this 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.


Protecting Your WordPress Blog From Being Brute-Force Attacked – Ten Security Measures

You may think that your website has no significant value to hackers, but the reality is that to a hacker, every website provides an opportunity to benefit at your expense.

If a hacker can exploit a security flaw, your site can then be used as a “bot” to attack larger and more highly-valued sites.

Additional undesirable impacts of having your website hacked and your site security compromised include being blacklisted by search engines, having stealthy spam links advertising things like gambling, cheap offers on brand names, etc. inserted into your content and page title and descriptions, malicious redirects to phishing sites, drive-by downloads (adding malicious software on your visitors’ computers), and many other nasty things.

The harsh reality is that hackers are searching for weaknesses and trying to break into your web site as you are reading this article. Whether they can do this successfully will depend on how challenging you will make it for hackers to keep persisting until they can work out how to get access, or are forced to give up and decide to look for a less protected target.

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

Do you own a WordPress site? If so, visit a site like and run your website through their WordPress security scan …

Hackertarget - WP Security Check(Website Security Scan Screenshot image:

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

Hackertarget - WP Security Check

(Hackertarget – website security scan results. Screenshot source:

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

WP Security Scan(Screenshot image: Blog Defender)

The ability to see what 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 potential security weaknesses, especially in older versions.

If your site or blog runs on WordPress and you are not preventive steps to harden your site, then it’s practically guaranteed that, at some point in time, someone will attempt to hack your installation, because these brute-force attacks are systematically hitting WordPress sites worldwide!

Whenever a website is compromised, webmasters can discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been modified or even that their content has been entirely wiped out. Typically, compromised sites will become infected with malicious scripts or viruses without the owner even being aware that a security breach has occurred.

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

Useful Info

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


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

Contact your hosting service provider and ask them what security systems have been put in place to help prevent your site from being attacked, and what is done to make sure that your WordPress sites get backed up.

Check that your webhosting provider backs up your sites and that, if disaster strikes, you can quickly and easily get your files back.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Website Frequently Updated

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

A proper WordPress maintenance routine ensures that:

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

A proper WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WordPress web site regularly backed up and up-to-date is. WordPress site 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 maintenance yourself, pay someone to do it but make sure this gets done. Backing up your website is the next most important thing you should do after making sure that you are still breathing!

If you don’t want to back up your files manually, there are many plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Back Up, Duplicate & Keep Your WordPress Site Protected With Backup Creator WP Plugin

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

The mass brute force attack on WordPress sites was mostly attempting to compromise site admin panels by exploiting WordPress sites that used “admin” as their account name.

For reasons of website security, avoid installing WordPress sites with the username admin. This is the first thing hackers will test. If your blog’s user name is “admin”, you need to change this immediately.

For a simple tutorial created especially for non-technical WordPress admin users that shows you how to change your admin username, go here: How To Change Your WP User Name From Admin To A More Secure Username

Security Measure #4 – Use A Strong Password

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

Unless some measure is put into place to block the brute-force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just continue to attack your site until it eventually gets access.

Passwords that are easy to guess, therefore, become really easy targets for bot attacks. Make sure that you change your password combination to a string that contains at least eight or nine characters long, with upper and lowercase letters, and “special” characters (^%$#&@*).

Useful Tip

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

You can use a password management software tool like Roboform to help you generate unguessable passwords(You can use a password program like Roboform to generate hard-to-guess passwords)

We have created a simple step-by-step tutorial that shows you how to change your password here: How To Reset WordPress Passwords

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

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

WordPress WP Config file

(WordPress WP Config file)

If hackers break into your website, they will normally try to access the wp-config.php file, because this file contains important information about your site’s database, 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.

To protect your WordPress site from being attacked and even being used as part of a bot net, therefore, you must prevent people from accessing 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.

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

Security Measure #7 – Keep Your WordPress CMS, Plugins & Themes Up-To-Date

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

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

Security Measure #8 – Disable The Theme Editor

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

You can access your WordPress Theme Editor by selecting Appearance > Editor in your main menu …

WP Theme Editor Menu

(Accessing the WordPress theme editor using the dashboard menu)

This allows anyone accessing your blog to view and modify your theme templates, and create mayhem on your site.

To prevent people from accessing the 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 Site’s Uploads Directory

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

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

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

(WordPress uploads directory)

If any directories in your website 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 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 an empty file called “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 WordPress Security Plugins

There are a number of great WordPress security plugins available that specifically address most security issues faced by WordPress site owners, such as preventing unauthorized users from gaining access to vital areas of your site, protecting your files from brute-force attacks, preventing injections of code into files, etc.

Most 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 site files and causing damage to your site is SecureScanPro.

SecureScanPro - security software for WordPress

(SecureScanPro – WP total security plugin)

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 consider using is BlogDefender.

Blog Defender WordPress Security Solution

Blog Defender(Blog Defender)

This product is a package of WordPress security video tutorials, 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 …

Blog Defender Security Suite For WordPressIf you don’t want to buy a premium security plugin like SecureScanPro or BlogDefender, then 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 software, WP plugins and themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.

No matter what kind of business you run or plan to run online and how small you think your web presence is, securing your website is something you simply cannot afford to ignore.

As a final reminder, below is the advice given by an expert on website security 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 of the utmost importance if you run a WordPress site. Hopefully, the above 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 professional WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to to be notified when we publish new information on WordPress security and reviews of new WordPress security plugins.


"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.