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 most popular content management system and the online publishing platform of choice 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 come under attack by hackers.

In early 2013 a large-scale brute-force attack began hitting WordPress installations across almost every host server in existence.

These attacks were caused by botnets (infected computer networks programmed to attack other installations).

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. This is done using software tools that can work through hundreds of login combinations in minutes.

If you’re not using strong usernames or unguessable passwords, your website could be easily hacked by a malicious software’s persistent attempts to work out your site’s login details.

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)

”Botnets” are networks of computers that have been infected with malicious software, which are then controlled remotely as a group, typically without the computer owners even being aware that this is happening.

Botnets are typically used to blast 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” …

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

(The Zeus botnet has been actively infecting computer networks all around the globe since 2009. Screenshot:

These ongoing botnet attacks are well organized and highly distributed. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack, when millions of attempts to force their way into WordPress site admin areas occurred. The large-scale attack then continued, with over 30,000 WordPress sites being hacked per day.

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

Powering millions of websites and blogs around the world makes WordPress an obvious target for hackers

(WordPress is often the target of attacks by hackers, due to its global popularity)

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

No. In fact, there are many great reasons why you should use WordPress if you are concerned at all about the security of your online presence.

To understand what makes WordPress a very secure platform for websites, see this article: Is WordPress A Secure Platform For Websites?

Important Info

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

Mike Little, one of the co-founders 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 Website From Brute-Force Attacks – Ten Security Checks

You may think that the information in your site offers little to no value to hackers, but the reality is that to a hacker, every website is an opportunity to benefit or profit at your expense.

If someone can exploit a way to gain stealth control of your blog, the blog can then be used to target other valuable websites.

Additional undesirable impacts of having your site hacked and your site security compromised include getting blacklisted by search engines, having stealthy spam links advertising things like gambling, discounted fashion, etc. inserted in your content, redirecting visitors to phishing sites and other websites, drive-by downloads (adding malware on your visitors’ computers), and lots of other nasty things.

The truth is that brute-force software bots are very likely trying to break into your blog at this very moment. Whether they can get into your site successfully will depend on how difficult or easy you have made it for hackers or bots to continue trying until they work out how to get access, or decide to look for a less secure target.

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

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

WordPress Security Scan(Hackertarget – WordPress Security Scan Source:

You will see that the scan returns various results and details about your website setup …

Website Security Check

(Hackertarget – WordPress security scan results. Product image:

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

WP Security Scan(Screenshot image: BlogDefender site)

Being able 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 all be valuable information to hackers, as this informs them about potentially exploitable holes or weaknesses, especially in older versions.

If your website is driven by WordPress and you’re not proactive steps to bullet-proof your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your site, because these brute force attacks are systematically hitting WordPress sites worldwide!

Whenever a website gets hacked, webmasters will find themselves completely “locked out” of their own site, or notice that their files have been modified or even that their content has been completely wiped out. Often, compromised sites will be infected with malicious software without the owner’s knowledge or awareness.

To avoid the heartache (and potential loss of valuable business data) of discovering that your website has been hacked into, we have listed below ten essential and effective security checks that will help to protect your WordPress site from being brute-force attacked.


Note: A few of the measures listed below need some technical skills to modify core WordPress and server files. If you have no web 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 – Contact Your Web Host

Get in touch with your webhosting service provider and ask them exactly what security measures are in place to protect your site from being attacked, and what is done to make sure that your WordPress sites are regularly being backed up.

Check that your webhosting provider is backing up your server files and that, if disaster strikes, you can easily recover your files.

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

You should never rely only on your web host for your site backups. Instead, learn how to maintain your WordPress site or pay someone to get this done for you and maintain a habit of performing a complete site maintenance routine on a regular basis (e.g. daily, weekly, monthly, etc …)

A complete WordPress maintenance routine ensures that:

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

A complete WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important it is to maintain your WP installation regularly backed up and up-to-date. WP maintenance is not hard 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 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 a number of free and paid plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Backup, Copy & Keep Your WordPress Websites And Blogs Protected With Backup Creator Plugin For WP

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

the worldwide brute-force attack on WordPress sites was mostly an attempt to compromise site administrator panels by exploiting WP sites that used “admin” as the username.

For security reasons, avoid setting up a WordPress site with the username admin. This is the first area hackers will test. If your site’s username is “admin”, then make sure you change this immediately.

We have created a detailed step-by-step tutorial created especially for admin users that shows you how to change your admin username here: How To Change Your WP Admin User Name To Another User Name

Security Measure #4 – Change Your Password

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

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

Passwords that are easy to guess, therefore, become 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 upper and lowercase letters, combined with “special” characters (e.g. ^, $, &, etc).

Practical Tip

You can use a password tool like Roboform to create unguessable passwords …

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

For a step-by-step tutorial that shows you how to change your password, go here: What To Do If You Need To Reset Passwords

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

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



If a hacker breaks 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 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 WordPress Installation Files

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

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

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

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

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

Security Measure #8 – Disable Your Theme Editor

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

You can access the WordPress Theme Editor by selecting Appearance > Editor in the dashboard menu …

WordPress Theme Editor Menu

(The WordPress theme editor is accessible via the admin menu)

The WordPress theme editor feature allows anyone accessing your blog’s admin area to view and change your WP theme templates, and create havoc on your site.

To prevent people from accessing 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 – Secure Your WordPress Uploads Directory

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

By default, this folder is visible to online users. All someone has to do to view the contents in the “uploads” folder is visit the directory using their web browser …

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

(WordPress uploads folder)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers, 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 WordPress Security Plugins

Some great security plugins for WordPress are available that will address many 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 malicious exploits, preventing unauthorized file uploads, etc.

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

SecureScanPro - WordPress security software solution

(SecureScanPro – security software for WordPress)

SecureScanPro is easy to install and easy to use, and does a great job of addressing 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 Product Suite

Blog Defender(Blog Defender)

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

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

Blog DefenderAnd then shows you how to easily fix these …

Blog Defender WordPress Security PluginIf you don’t want to buy 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 platform, but neglecting simple maintenance tasks like making sure that your WP installation, WordPress plugins and WP themes are kept updated to their latest versions, 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 cannot ignore the importance of securing your sites.

As a final reminder of the importance of website security, below is the advice given by a security expert to all WordPress users after the global 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, the above article has given you the initial guidelines and direction you need 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 professional WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to to receive notifications whenever we publish new information on WordPress security and tutorials about WordPress security plugins and solutions.


"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie