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.

Get Thrive Leads for WordPress

WordPress SecurityWhen you are the world’s most popular CMS platform and the preferred online publishing platform 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 become a target for attacks by hackers wanting to score a “big win”.

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

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

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

Brute Force Attacks – An Overview

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’s administration login username and password. This can be achieved using software tools and scripts that automatically tries to guess hundreds of login combinations in minutes.

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

This is called a “brute force” login attack.

Botnets – What Are They?

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 compromised and infected with malicious code, which are then controlled remotely as a group, often without the computer owners’ knowledge or awareness.

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

The screenshot below was taken from a site that monitors online security showing the locations of the command centers of ZeuS – a botnet that has been actively infecting computer networks all around the globe since 2009 …

The Zeus botnet has been actively compromising 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. Image source:

These were well organized and highly distributed botnet attacks. Over 90,000 IP addresses were identified by a number of webhosting companies just in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress users administration areas. The worldwide brute-force attacks continued after this, with over 30,000 WordPress sites and blogs being hacked per day.

News of this 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, Tech Crunch, BBC News, PC Magazine, and even on the official website of the US Department of Homeland Security …

Powering millions of websites and blogs worldwide makes WordPress a target for hacker attacks

(Powering millions of websites and blogs around the world makes WordPress an obvious target for hacker attacks)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are lots of very good reasons why you should use WordPress if you are concerned about the security of your website.

We explain why WordPress is a secure platform for websites in this article: How Secure Is WordPress? What Every Business Owner Needs To Know About WordPress

Important Info

It’s important to understand that, in the case of April 2013 mass brute-force botnet attack described above, was no specific vulnerability in WordPress being exploited (the same script was also targeting sites built using other web 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 Site From Brute-Force Attacks – 10 Security Measures

Every website with a vulnerability can be seen as a potential opportunity to hackers. An unsecured site provides malicious users with a platform to launch denial of service attacks, spread malware and use your site to steal information from innocent people.

If a malicious user can exploit a way to remotely take control of your blog, your web site can then be employed as a “bot” to attack more valued sites.

Additional undesirable consequences of having your site hacked include getting blacklisted by Google, having stealthy spam links promoting 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 truth is that software-driven bots are scouring for security weaknesses and trying to break into your site as you are reading this article right now. Whether they will break in will depend on how difficult or easy you will make things for hackers or bots to keep trying until they find how to get access, or decide to look for a more vulnerable target.

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

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

WP Security Check(WordPress Security Check Product image source:

You will see that the check will yield various results and information about your site …

WP Security Check

(Hackertarget – WP security check results. Screenshot image:

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

WordPress Security Check(Screenshot image:

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 be potentially valuable information to hackers, as these can inform them about any potential vulnerabilities, especially where the owners haven’t updated their files.

If your website is powered by WordPress and you’re not proactive steps to bolster the security of your site, it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your installation, because these brute force attacks are systematically targeting WordPress installations worldwide!

Typically, when a website gets broken into, blog owners can find themselves completely “locked out” of their own site, or notice that their content has been interfered with or that everything has been entirely wiped out. Typically, compromised sites will become infected with malicious scripts without the owner even being aware that this has taken place.

To help avoid the heartache and frustration of having your web site being hacked into, we have listed below 10 simple, yet essential and effective security checks that will help to protect your WordPress site from being attacked by brute-force botnet hacking attempts.

Useful Information

Note: A few of the steps below require some technical skills to modify core WordPress or server files. If you have no technical 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 Hosting Service

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

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

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Website Or Blog Frequently Updated

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

A proper WordPress maintenance routine ensures that:

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

A complete WordPress site maintenance routine looks like this …

Maintaining your WordPress website or blog frequently backed up and updated is vitally important for WordPress security.(Maintaining your WordPress website or blog frequently backed up and up-to-date is vitally important for WordPress security. Screenshot image:

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

If you don’t want to perform manual backups, there are a number of WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Backup, Copy And Keep Your WordPress Site Protected 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 an attempt to compromise website administrator panels by exploiting WordPress sites with “admin” as their account name.

For security purposes, don’t set up sites with the username admin. This is the first thing hackers will test. If your site’s user name is admin, change it immediately.

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

Security Measure #4 – Use Strong Passwords

A “brute force” attack occurs when a malicious script persistently hits a login or password field with different character strings trying to guess the right login combination that will give them access to your site.

Unless you put some measure in place to stop the brute force attack from happening (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 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 something that contains at least 8 or 9 characters long, and that includes upper and lowercase letters, combined with a few “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 software tool like Roboform …

You can use a password program like Roboform to generate strong passwords(Roboform is a password tool that lets you generate strong passwords)

We have created a detailed step-by-step tutorial on how to change your password here: How To Reset WordPress Passwords

Security Measure #5 – Prevent Access To Your 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 WordPress options.

WP Config file

(WP Config file)

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

In order 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

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

You can remove these files after installation, as they are unnecessary. If you don’t want to remove these files, just rename them.

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

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

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

Security Measure #8 – Disable Your Theme Editor

WordPress comes with a built-in editor that allows site administrators to edit theme and plugin code from the dashboard area.

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

WP Theme Editor Menu

(Accessing the WordPress theme editor using the WordPress main menu)

The WordPress theme editor allows anyone accessing your site’s admin to view and modify all of your WP theme templates, and create mayhem on your site.

To prevent unauthorized 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 – Protect Your WordPress Uploads Folder

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

By default, this folder is visible to online users. All someone has to do to see the contents in your site’s “uploads” directory is navigate to your directory using their web browser …

(WordPress uploads directory)

(WordPress uploads directory)

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

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

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

SecureScanPro - WordPress security plugin

(SecureScanPro – complete security software solution for WordPress)

SecureScanPro is easy to install and easy to use, and fixes most of the security areas that WordPress users need to address.

Another plugin you may want to consider using is BlogDefender.

Blog Defender Security Solution For WordPress

Blog Defender(Blog Defender WordPress Security Plugin)

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 web site for potential security vulnerabilities …

Blog Defender Security Product Suite For WordPress BlogsAnd lets you fix these quickly and easily …

Blog Defender Security Product Suite For WordPressIf you don’t want to invest in a 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 secure web platform, but neglecting essential maintenance tasks like updating your WordPress installation, plugins and WP themes, tightening file and data security and taking other necessary precautions can expose your website to malicious by hackers and bots.

No matter what 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 website or blog.

As one last reminder, below is the advice given by a security expert to all WordPress users following the global brute-force attacks 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 very important if you run a WordPress site. Hopefully, the information in this article has shown you what to do 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.

We also recommend subscribing to to receive notifications via email when we publish new tutorials on WordPress security and reviews of new security plugins.


"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams,


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