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.

WordPress SecurityBeing the world’s most used CMS makes WordPress a frequent target for hackers.

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

These attacks were caused by networks of infected computers programmed to attack other vulnerable sites (called “botnets”).

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

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 ways hackers try to break into a WordPress site. One of these is by trying to guess the site’s administration login username and password. To achieve this, hackers use software tools that can work through hundreds of login permutations in minutes.

If you’re using weak user names and passwords that are easy to guess, your site could be easily hacked by the script’s persistent attempts to work out your site’s login details.

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

(Source: Wikipedia/botnet)

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

Botnets are often used to blast mass spam emails from the infected computers of unsuspecting users.

Below is a screenshot 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 infecting computer networks all around the world since 2009.

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

The ongoing botnet attacks on WordPress sites were well organized and highly distributed. Over 90,000 IP addresses were identified by a number of hosting companies in the initial attack, when millions of attempts to force their way into WordPress site administration areas took place. The worldwide brute force attacks continued after this, with over 30,000 WordPress blogs being hacked every day.

News of this large-scale brute force botnet attack was reported by all 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 …

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

(Powering millions of websites worldwide makes WordPress a target for attacks by malicious users)

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

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

To learn what makes WordPress a very secure platform for websites, see this article: WordPress Security What Every Business Owner Needs To Know About WordPress Security


It’s important to note that, in the case of the brute-force attack described above, there was no WordPress vulnerability being exploited (the same script was also targeting sites built using 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.


Preventing Your WordPress Blog From Being Brute-Force Attacked – 10 Security Checks

Every blog with a vulnerability offers some value to hackers. A vulnerable website or blog provides hackers with a platform for launching distributed denial of service attacks, spreading malware and to engage in information theft.

If a malicious user can find a web security flaw, the blog can then be employed as a “bot” to attack more valuable web sites.

Additional undesirable consequences of being hacked and your site security compromised include getting blacklisted by search engines, having stealthy spam links advertising things like online meds, porn, etc. inserted in your content and page title and descriptions, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasty things.

The harsh reality is that hackers are very likely looking for exploits and trying to break into your site at this very moment. Whether they can achieve this will depend on how hard you can make things for them to keep persisting until they either can work out a way to get access, or give up and decide to look for a more vulnerable target.

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

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

Hackertarget - WordPress Security Check(Hackertarget – Website Security Scan Screenshot:

You will see that the test will display a number of results and details about your site …

WordPress Security Check

(Hackertarget – website security scan results. Screenshot image:

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

WordPress Security Check(Screenshot image: BlogDefender website)

Being able 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 in your site can all be valuable information to hackers, as these can inform them about potentially exploitable security vulnerabilities, especially in older versions.

If your website is driven by WordPress and you are not precautionary steps to bolster the security of your site, 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 around the world!

Typically, whenever a website is broken into, webmasters will discover much to their dismay that they have been “locked out” of their own site, or notice that their content has been vandalized or even entirely wiped out. Typically, most sites will be infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To avoid the heartache that comes with having your website being hacked into, below are ten simple, yet essential and effective security checks that will help to protect your WordPress site from brute-force attacks.


Note: Some of the recommended steps shown below require some technical understanding of how to modify core WordPress and/or server files. If you lack these technical skills, or don’t want to mess around with code on your site, 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 Web Host

Get in touch with your hosting company and ask them what measures have been put into place to protect your site from brute-force attacks, and what is done to ensure that your server files and data get regularly backed up.

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

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Website Regularly Up-To-Date

You should never rely only on your webhosting service for site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this service 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 files and data are free of errors, optimized and backed up,
  • All plugins, themes and software components are up-to-date,
  • etc …

A proper WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WP website frequently backed up and updated is. WordPress maintenance is not hard to do 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 maintenance yourself, get someone else to do it but make sure it gets done. Backing up your website is the second most important thing you must do after making sure that your heart is still beating!

If you don’t want to back up your site 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 & Protect Your WP Website With Backup Creator WordPress Plugin

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

The large scale brute-force attack on WordPress sites was mostly an attempt to compromise site admin panels and gain access to sites by exploiting sites with “admin” as their username.

For security purposes, avoid setting up a WordPress site with the username “admin”. This is the first area hackers will test. If your blog’s username is “admin”, then change it immediately.

We have created a detailed tutorial for WP admin users that shows you how to change your login username here: How To Change Your WordPress Admin User Name

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when a malicious script continually hits a login or password field with different strings of characters 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 simple and effective suggestions for doing this), the “bot” will just continue attacking your site until it eventually “cracks” the code.

Weak passwords, therefore, make really easy targets for attacks. Make sure that you change your password combination to a string that is at least 8 or 9 characters long, with upper and lowercase letters, and “special” characters (^%$#&@*).

Practical 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 management program like Roboform …

You can use a password tool like Roboform to generate unbreakable passwords(Roboform is a password tool that lets you create different secure login passwords)

We have created a tutorial for non-technical WordPress users that shows you how to change your password here: What To Do If You Need To Change A Password In WordPress

Security Measure #5 – Deny 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.

WordPress WP Config file

(WordPress WP Config file)

If a hacker breaks into your site, they will search for the wp-config.php file, because this file contains your database information, 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.

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

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

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

Security Measure #7 – Upgrade Your WordPress CMS, Themes & Plugins

Hackers are always on the lookout for vulnerabilities in earlier versions of WordPress that can be exploited, including outdated versions of plugins and themes.

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor using the WP dashboard menu)

The WordPress theme feature lets anyone accessing your blog view and edit all of your WP theme files, and create mayhem on your site.

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 – Prevent Access To The WordPress Uploads Directory

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

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

(WordPress has an uploads directory where media content is stored)

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

If any directories in your website have vulnerabilities that can be exploited by hackers or malicious users, anyone can 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 a file with nothing in it named “index.php”) to your uploads directory, and so on. Again, it’s best to seek professional help if you are unsure about what to do.

Security Measure #10 – Security Plugins

A number of WordPress security plugins are available that will address many common security issues faced by WordPress site owners, such as preventing unauthorized users from gaining access to vital information about your site, protecting your website from malicious exploits, preventing injections of code into files, etc.

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

SecureScanPro - complete security software solution for WordPress

(SecureScanPro – WP security software solution)

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

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

Blog Defender Security Product Suite For WordPress

Blog Defender(Blog Defender Security Product Suite)

Blog Defender is a package of WordPress security video tutorials, WordPress plugins and tools, plus a WordPress security PDF/DOC file.

BlogDefender scans you website for security weaknesses …

Blog DefenderAnd then shows you how to fix these quickly and easily …

Blog Defender WordPress Security SolutionIf 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 very secure platform, but neglecting simple maintenance tasks like updating your WordPress installation, WP plugins and WordPress themes, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

Regardless of the type 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 web sites.

As a final reminder of the importance of website security, below is the advice given by an expert on website security to all WordPress users following the worldwide 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 will help keep your WordPress site protected from brute-force attacks. If you need any further help or assistance with WordPress security, please seek help from a WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.

Also, do yourself a favor and subscribe to to be notified whenever we publish new tips on WordPress security and reviews of WordPress security plugins and solutions.

Get Thrive Leads for WordPress


"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)


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