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 SecurityWordPress often is targeted by hackers.

In early 2013 a worldwide brute-force attack began hitting WordPress installations on virtually every WP hosting server in existence around the world.

These attacks were caused by computers infected with viruses and programmed to attack other installations (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. This can be done using software tools that automatically tries to guess hundreds of possible login combinations in minutes.

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

This is called a “brute force” attack.

What Is A Botnet?

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 can then be controlled remotely as a group, often without the unsuspecting computer owners even being aware that this is happening in their machine.

Botnets are typically used to blast out mass spam emails.

Below is a screenshot taken from an online security monitoring site 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 infecting computer networks all around the world since 2009.

(ZeuS is a botnet that has been actively compromising computer networks all around the globe since 2009. Screenshot image:

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

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

Being the world's most popular CMS makes WordPress a target for hacking

(WordPress is the world’s most used CMS making it a natural target for malicious attempts by hackers)

Does This Mean We Should Stop Using WordPress?

No. In fact, there are lots of great reasons why you should choose WordPress if you are concerned at all about the security of your online business.

To learn why WordPress is a secure web platform, read this article: Is WordPress A Secure Platform For Websites?


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

Mike Little, one of the co-founders of WordPress, made the following comment about the brute-force 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 Being Brute Force Attacked – 10 Security Points

Every website with a security vulnerability offers some degree of potential value to hackers. No blog Business sites, personal blogs, government web sites … even websites owned by web security and anti-hacking experts can and have been targeted.

If a hacker can discover a vulnerability, your site can then be used to attack larger and more valued web sites.

Additional undesirable consequences of having your website hacked include getting blacklisted by Google, having spammy links advertising things like online meds, cheap offers on brand names, etc. inserted into your content, malicious redirects to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasty things.

The truth is that brute-force software bots are most likely scouring for weaknesses and trying to break into your site right now. Whether they can do this successfully will depend on how difficult or easy you will make it for hackers to continue trying until they can either discover how to get in, or are forced to decide to look for an easier target.

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

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

Hackertarget - Website Security Scan(Hackertarget – Website Security Check Source:

You will see that the check will display various results and details about your site …

Hackertarget - WordPress Security Scan

(Hackertarget – WordPress security scan results. Source:

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

Hackertarget - WordPress Security Check(Product image source:

The ability 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 on your server can be useful information to hackers, as these can inform them about any exploitable vulnerabilities, especially in older versions.

If your site or blog is powered by WordPress and you are not taking appropriate steps to harden your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your website, because these brute-force attacks are systematically hitting WordPress installations worldwide!

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

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

Useful Information

Note: Some of the recommended steps below require some technical skills to modify core WordPress and/or 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 WordPress technical provider in our WordPress Services Directory.


Security Measure #1 – Get In Touch With Your Host

Contact your hosting service and ask them what measures are in place to protect your site from brute-force attacks, and what they are doing to make sure that your WordPress sites are being regularly backed up.

Check that your host backs up your server files and that, if disaster strikes, you can quickly and easily get back your files.

Security Measure #2 – Perform Regular WordPress Backups And Keep Your Website Or Blog Regularly Maintained

Never rely on your web host for your site backups. Instead, learn how to manage your WordPress site or pay someone to get this done for you and maintain a habit of performing a full WordPress site maintenance routine on a frequent basis (e.g. daily, weekly, fortnightly, 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 software, plugins and themes are up-to-date,
  • etc …

A proper WordPress site maintenance routine looks like this …

Maintaining your WordPress website or blog backed up and updated is vitally important for WordPress security.(Maintaining your WP website or blog fully backed up and updated is vitally important for WordPress security. Source:

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

If you don’t want to perform manual backups, there are a number of free and paid WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Backup, Clone & Protect Your WP Sites With Backup Creator WP Plugin

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

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

For reasons of website security, never install a WordPress site with the username admin. This is the first area of potential vulnerability hackers will test. If your blog’s user name is admin, change it immediately.

We have created a detailed step-by-step tutorial created especially for WordPress users that shows you how to change your WordPress admin username here: How To Change Your WordPress Username From Admin To A More Secure User Name

Security Measure #4 – Make Sure Your Password Is Hard To Guess

A “brute force” attack occurs when malicious software persistently hits a login or password field with different strings of characters trying to guess the right login combination that will unlock your site.

Unless you put some measure in place to prevent the brute-force attack (see further below for a couple of simple and effective ways to do this), the “bot” will just persist in attacking your site until it eventually gets access.

Weak passwords, therefore, make very easy targets for bot attacks. Make sure that you change your password to a string that contains at least 8 or 9 characters long, and that includes upper and lowercase letters, and add a few “special” characters (e.g. ^, $, *, etc).

Practical Tip

If you have trouble coming up with strong passwords or you are 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 tool like Roboform to generate strong passwords(You can use a password management program like Roboform to create strong login passwords)

For a detailed step-by-step tutorial for WP admin users that shows you how to change your WordPress password, go here: Changing Passwords In WordPress

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

wp-config.php file

(wp-config.php file)

If a hacker breaks into your WordPress site, they will normally try to access your wp-config.php file, because this file contains your WordPress database information, security keys, etc. Getting access to this information would allow them 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, 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 – Rename Or Delete Unnecessary Installation Files

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

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

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

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WP Theme Editor Menu

(Accessing the WordPress theme editor using the admin menu)

This means that anyone logging into your blog’s admin area can view and modify your theme template files, and create havoc on your site.

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

The “uploads” directory contains all the media that gets uploaded to your site.

By default, this folder is visible to all users online. All a person needs to do to see the contents in your site’s “uploads” folder is visit the directory using their web browser …

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

(WordPress uploads directory)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by malicious users, this could threaten the security of your website.

Protecting your directories will prevent unauthorized people 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 a file with nothing in it named “index.php”) to your uploads directory, and so on. Again, it’s best to use a professional if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

There are several WordPress security plugins available that specifically address most common security issues WordPress website owners face, such as preventing hackers from gaining access to vital information about your site, protecting your site from brute-force attacks, preventing unauthorized file uploads, etc.

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

SecureScanPro - total security software solution for WordPress

(SecureScanPro – WP security plugin)

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

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

Blog Defender Security Suite For WordPress

Blog Defender Security Product Suite(Blog Defender Security Solution)

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

BlogDefender scans you website for potential security holes …

Blog Defender Security SolutionAnd lets you easily fix these …

Blog Defender Security Solution For WordPressIf you don’t want to buy a 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 basic maintenance tasks like updating your WordPress software, plugins and themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.

Regardless of the kind of business you run or plan to run online and how small you think your web presence is, web security is something you cannot afford to ignore.

As a final reminder, below is the advice given by an expert on website security to all WordPress users following the large-scale 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 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 consult a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

Also, please subscribe to to be notified via email whenever we publish new tutorials on WordPress security and tutorials about new WordPress security plugins and solutions.


"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum


Recommended Video Courses For WordPress Users

WordPress SecurityWordPress Security

Learn how to keep your WordPress site or blog secure and protected from malware, hackers and brute-force attacks.

More info: WordPress Security

Recommended Video Courses For WordPress Users

How To Use FTPHow To Use FTP

This video course shows you how to use FTP (File Transfer Protocol) to transfer and upload files between your hard drive and your server using a free FTP program called Filezilla.

More info: How To Use FTP

Recommended Video Courses For WordPress Users

How To Set Up WordPress On LocalhostHow To Set Up WordPress On Localhost

Learn how to install, set up, and locally host a fully functioning WordPress site on your computer.

More info: How To Set Up WordPress On Localhost

Recommended Video Courses For WordPress Users

How To Back Up & Restore WordPress SitesHow To Back Up & Restore WordPress Sites

Learn how to safely and automatically backup your WordPress files and database and how to easily restore your WordPress site if something were to happen.

More info: How To Back Up & Restore WordPress Sites

Recommended Video Courses For WordPress Users

Using Password ManagersUsing Password Managers

Password Managers provide an easy and secure way to keep track of all your passwords. This video course shows you how to use two FREE powerful password management tools.

More info: Using Password Managers

Recommended Video Courses For WordPress Users

How To Use Amazon S3How To Use Amazon S3

Learn how to set up and use Amazon S3 to upload, store, manage, and protect your site’s images, large media files, downloadable files, stream videos and more.

More info: How To Use Amazon S3

Recommended Video Courses For WordPress Users

How To Use cPanelHow To Use cPanel

cPanel is a powerful and simple-to-use web hosting management software application that gives website owners the ability to quickly and easily manage their servers and websites using a simple and intuitive dashboard.

This video course will teach you how to use the main features of cPanel to manage your web hosting.

More info: How To Use cPanel

Author: Martin Aranovitch

Martin Aranovitch is the owner of and the author of The WordPress User Manual. provides hundreds of FREE tutorials that show you how to use WordPress to grow your business online with no coding skills required! Get our FREE "101+ WordPress Tips, Tricks & Hacks For Non-Techies" e-course with loads of useful WordPress tips!

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