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 SecurityWordPress is the world’s most used CMS which makes it an obvious target for attempted attacks by malicious users.

In April 2013 a mass brute-force attack began hitting WordPress installations on virtually every WP host server in existence.

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

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)

There are many ways hackers try to break into WordPress sites. One of these is by trying to guess the site’s administration login username and password. This is achieved with software tools and scripts that can guess hundreds of possible login combinations in minutes.

If you’re using obvious login details, your website could be easily hacked by the software’s persistent attempts to guess your site’s login details.

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 software, which can then be controlled remotely as a group, typically without the unsuspecting computer owners even being aware that this is happening inside their device.

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

The screenshot below was taken from an online security monitoring site 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 globe since 2009.

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

The ongoing botnet attacks were well organized and highly distributed. Over 90,000 IP addresses were identified by a number of hosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress users admin areas. The attacks then continued, with over 30,000 WordPress sites and blogs being hacked per day.

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

WordPress is the world's most popular content management system which makes it an obvious target for hacking

(WordPress powers millions of websites and blogs around the world, making it a target for attempted hacker attacks)

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

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

To understand what makes WordPress a very secure platform for websites, see this article: How Secure Is WordPress?


It’s important to note that, in the case of the brute-force botnet 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 with Matt Mullenweg, made this comment 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 Website From Brute-Force Attacks – 10 Security Checks

You may think that the information in your site is of no interest to hackers, but the reality is that every website has value to a malicious user.

If hackers can exploit a vulnerability in the web security and gain any form of control of your site, that blog can then be employed as a “bot” in a planned cyberattack against more valuable websites.

Additional undesirable impacts of having your site hacked include getting blacklisted by Google, having stealthy spam links promoting things like viagra, porn, etc. in your content and meta data, redirecting visitors to phishing sites, drive-by downloads (adding malware on your visitors’ computers), and lots of other nasty things.

The harsh reality is that software-driven bots are most likely searching for security exploits and trying to hack into your web site at this very moment. Whether they can get in or not, depends on how difficult or easy you have made things for hackers and botnets to keep persisting until they discover a way to get access, or give up and decide to look for an easier target.

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

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

Website Security Check

(WP Security Check Source:

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

WordPress Security Check

(Hackertarget – website security check results. Screenshot image:

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

Hackertarget - Website Security Scan

(Source: Blog Defender)

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 this informs them about any security vulnerabilities, especially where site owners haven’t updated their files.

If your website is driven by WordPress and you are not taking appropriate steps to bullet-proof your site, it’s practically guaranteed that, at some point in time, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically targeting WordPress sites around the world!

When a website or blog gets hacked, site owners 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 completely wiped out. Often, most compromised sites will be infected with malicious scripts or viruses without the owner even being aware that a security breach has taken place.

To help avoid the heartache (and significant loss of valuable business data) that comes with discovering that your web site has been hacked into, we have listed below ten simple, yet essential and effective security checks that will help to prevent your WordPress site from being attacked by brute-force botnet hacking attempts.

Important Info

Note: Some of the measures listed below need some technical understanding of how to modify core WordPress and server files. If you have no 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 service provider on


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

Contact your webhosting provider and ask them what precautions have been put into place to help prevent your site from being attacked, and what is done to ensure that your server files and data get regularly backed up.

It is important to check that your host backs up your server files and that, if anything should happen, you can easily get your files and data back.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Website Regularly Maintained

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

A complete WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

Maintaining your WordPress website or blog regularly backed up and updated is vitally important for WordPress security.

(Maintaining your WordPress website or blog regularly backed up and up-to-date is vitally important for WordPress security. Image source:

Again, we cannot stress enough how vitally important maintaining your WP website or blog backed up and updated 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 do not want to learn how to do WordPress site maintenance yourself, pay a professional to do it but make sure it gets done. Backing up your site 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 site manually, there are many WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Backup, Clone And Protect Your WP Web Sites With Backup Creator WordPress Plugin

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

The mass brute-force botnet attack on WordPress sites was mostly an attempt to compromise website administrator panels by exploiting sites with “admin” as the username.

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

For a step-by-step tutorial created especially for WP admin users on how to change your login username, go here: How To Change Your WordPress User Name From Admin To A Different Username

Security Measure #4 – Use A Strong Password

A “brute force” attack occurs when a malicious script persistently tries to guess the right combination of password and username characters 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 effective suggestions for doing this), the “bot” will just keep attacking your site until it eventually gets access.

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


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

You can use a password management tool like Roboform to generate unbreakable passwords

(Roboform is a password program that lets you generate different strong passwords)

For a simple tutorial created especially for WP admin users on how to change your admin password, go here: What To Do If You Need To Change Your Password In WordPress

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

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

wp-config.php file


If hackers break into your website, they will typically try to access the wp-config.php file, because this is the file that contains your 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.

To protect your WordPress site from being attacked and even being used as part of a bot net, therefore, you must prevent people from being able to easily view 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 – Rename Or Delete Unnecessary 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 delete these files, just rename them.

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

Hackers search for vulnerabilities in earlier versions of WordPress that can be exploited, including out-of-date versions of WordPress themes and plugins.

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

Security Measure #8 – Disable The Theme Editor

WordPress installations come with a built-in editor feature that lets you edit plugin and theme code 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 WordPress admin menu)

This allows anyone accessing your blog to view and modify your theme template files, or create havoc 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 – Secure The WordPress Uploads Folder

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

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

(WordPress uploads folder)

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

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, this could become a serious threat to the security of 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 hire a professional if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

There are a number of security plugins for WordPress available that specifically address many common security issues faced by WordPress site owners, such as preventing hackers from accessing your site, protecting your site from botnets, preventing unauthorized file uploads, etc.

Many WordPress plugins address some but not all areas of WordPress security. One security 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 - WP security plugin

(SecureScanPro – security plugin for WordPress)

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

Another security plugin you may want to consider using is BlogDefender.

Blog Defender WordPress Security Suite

Blog Defender WordPress Security Suite

(Blog Defender Security Plugin For WordPress Blogs)

This product is a suite of WordPress security video tutorials, WordPress plugins and tools, plus a WordPress security PDF/DOC file.

BlogDefender shows you where potential security weaknesses in your WordPress site are …

Blog Defender Security Solution

And lets you fix these quickly, easily and inexpensively …

Blog Defender Security Plugin For WordPress Websites & Blogs

If you don’t want to invest in 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 basic maintenance tasks like keeping your WordPress software, WP plugins and WordPress themes up-to-date, 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, securing your website or blog is something you simply cannot ignore.

As one last reminder, below is the advice given by an expert on web security to all WordPress users after the large-scale brute force attacks 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, this article has shown you what to do to prevent brute force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please seek help from a WordPress security specialist, or search for a WordPress service provider on

We also recommend subscribing to to be notified when we publish new articles 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

Disclaimer: We are not directly associated with WordPress or any WordPress-related products mentioned or reviewed on this website. We may derive affiliate commissions or financial benefits from sales of any third-party products mentioned on this site. All images and information sourced from product websites are the copyright of their respective owners, comply with all license terms and agreements of use to the best of our knowledge and are used solely for illustrative or training purposes.

Get Thrive Leads for WordPress


Did you enjoy this article? If so, please use the share buttons below and share this page with other WordPress users.

Author: Martin Aranovitch provides hundreds of FREE WordPress tutorials for beginners. Our detailed step-by-step tutorials will save you money and teach you how to start, manage, and grow a website or blog using WordPress that puts you in complete control and delivers results with no coding skills required!