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 SecurityWhen you are the world’s most popular content management system and the preferred online publishing platform for millions of businesses and loved by thousands of web developers and web designers, it’s inevitable that at some point in time, WordPress will come under attack by hackers wanting to score a “big win”.

In 2013 a mass brute-force attack hit WordPress installations on virtually every WP hosting server in existence.

These attacks were caused by computers infected with malware and programmed to attack other installations, also commonly known as “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)

There are many ways hackers try to break into a WordPress site. One of these is by trying to guess the site admin’s login username and password. This can be achieved with scripts and tools that can work through hundreds of possible logins in minutes.

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

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

(Source: Wikipedia/botnet)

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

Botnets are normally used used to blast out mass spam emails.

The screenshot below was taken from an internet security monitoring site showing the locations of the command centers of ZeuS – a botnet that 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 globe since 2009.

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

These 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, when millions of attempts to force their way into WordPress user admin areas occurred. The mass brute-force attacks continued after this, with over 30,000 WordPress sites and blogs being hacked every day.

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

Being the world's most used content management system makes WordPress a target for hacking attacks

(WordPress often is targeted by hackers)

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

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

We explain what makes WordPress a very secure web platform in this article: WordPress Security What Every Website Owner Needs To Know About WordPress

Important Info

It’s important to note 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 with Matt Mullenweg, said this 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 Brute-Force Attacks – Ten Security Checks

Every website or blog with a security vulnerability can can provide an opportunity to hackers. A compromised web site presents hackers with a valuable resource for launching DDoS attacks, spreading malware and as a source of information theft.

If a hacker can discover a vulnerability, that web site can then be used as a “bot” in a planned cyberattack against other valued sites.

Additional undesirable results of being hacked include getting blacklisted by search engines, having spammy links promoting things like casinos, discounted fashion, etc. inserted into your content, redirecting visitors to phishing sites and other websites, drive-by downloads (adding malicious scripts on your visitors’ computers), and many other nasties.

The truth is that hackers are probably looking for security exploits and trying to hack into your blog at this very moment. Whether they will get into your site successfully or not, depends on how difficult you will make it for hackers to continue trying until they either can find how to get in, or give up and decide to look for a less protected target.

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

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

Website Security Scan(Website Security Scan Product image source:

You will see that the test will return a number of results and information about your site …

Hackertarget - WordPress Security Scan

(Hackertarget – website security check results. Product image:

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

Hackertarget - WP Security Scan(Source:

The ability 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 on your server are all potentially valuable information to hackers, as this informs them about exploitable vulnerabilities, especially where site owners haven’t updated their sites.

If your site or blog is powered by WordPress and you’re not taking steps to toughen up your site, then it’s practically guaranteed that, at some point, someone will attempt to hack your site, because these attacks are systematically hitting WordPress sites around the world!

When a website gets hacked, webmasters will discover much to their dismay that they have been “locked out” of their own site, or notice that their content has been altered or that everything has been entirely wiped out. Often, compromised sites will be infected with malicious software or viruses without the owner’s knowledge or awareness.

To avoid the heartache (and potential financial loss) of discovering that your web site has been hacked into, below are 10 simple, yet essential and effective security measures that will help to protect your WordPress site from being brute-force attacked.


Note: Some of the recommended steps below require some technical understanding of how to modify core WordPress and server files. If you are not technical, or don’t want to mess around with code on your site, then ask your web host or search for a WordPress service provider in our WordPress Services Directory.


Security Measure #1 – Get In Touch With Your Hosting Company

Get in touch with your webhosting service provider and ask them what security systems are in place to protect your site from botnet attacks, and what is done to make sure that your files and data get backed up.

Make sure that your hosting service regularly backs up your sites and that, if disaster strikes, you can quickly and easily get your files back.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Regularly Updated

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

A proper 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 WordPress themes, plugins and software components are up-to-date,
  • etc …

A full WordPress site maintenance routine looks like this …

Maintaining your WordPress installation regularly backed up and updated is vitally important for WordPress security.(Maintaining your WordPress website completely backed up and updated is vitally important for WordPress security. Screenshot image:

Again, we cannot stress enough how important it is to maintain your WordPress site backed up and updated. WordPress maintenance is not hard to do 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 website is the second most important thing you should do after making sure that you still have a pulse!

If you don’t want to back up your data manually, there are many plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Back Up, Duplicate And Keep Your WP Websites Protected With Backup Creator WordPress Plugin

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

the worldwide brute-force attack on WordPress sites was mostly attempting to compromise site admin panels by exploiting WP installations that used “admin” as their user name.

For reasons of website security, avoid setting up sites with the username “admin”. This is the first thing hackers will test. If your site’s username is admin, then make sure you change it immediately.

For a simple step-by-step tutorial for WP admin users that shows you how to change your WordPress username, go here: How To Change Your Admin User Name In WordPress To A More Secure User Name

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when a malicious script continually hits a username and password field with different character strings trying to guess the right combination that will give the hacker entry to your website.

Unless some measure is put into place to block the brute-force attack (see further below for a couple of simple and effective ways to do this), the “bot” will just keep attacking your site until it eventually breaks into your admin area.

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

Practical Tip

Roboform is a password management tool that lets you generate strong login passwords …

You can use a password tool like Roboform to help you generate hard-to-guess passwords(Roboform is a password tool that lets you generate different strong login passwords)

For a tutorial that shows you how to change your login password, go here: What To Do If You Need To Change Passwords

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

The wp-config.php file contains 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 WordPress website, they will normally look for your wp-config.php file, because this is the file that contains your database details, 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 attacks and even being used as part of a bot net, therefore, you must prevent your wp-config.php file from being accessed. 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 the install.php, upgrade.php and readme.html files from your server.

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

Security Measure #7 – Keep Your WordPress Installation, Plugins & Themes Up-To-Date

Hackers search for vulnerabilities they can exploit in previous WordPress versions, including outdated versions of WP themes and plugins.

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

Security Measure #8 – Disable The WordPress Theme Editor

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

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

WP Theme Editor Menu

(Accessing the WordPress theme editor using the admin menu)

This allows anyone accessing your blog to view and modify your theme template files, or cause mayhem on your site.

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

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

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

(WordPress uploads folder)

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

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

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 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 – WordPress Security Plugins

Several security plugins for WordPress are available that specifically address many common security issues faced by WordPress site owners, such as preventing hackers from accessing your site, protecting your files 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 seems to do a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your files and damaging your site is SecureScanPro.

SecureScanPro - WordPress security software

(SecureScanPro – WP complete security software solution)

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 For WordPress

Blog Defender WordPress Security Solution(Blog Defender)

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 vulnerabilities …

Blog Defender Security Suite For WordPressAnd then shows you how to fix these quickly …

Blog Defender Security Solution For WordPressIf you don’t want to purchase 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 very secure platform, but neglecting essential maintenance tasks like keeping your WP software, plugins and themes updated to their latest versions, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

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

As one last reminder, below is the advice given by a web security expert to all WordPress users following the global brute-force attacks by botnets 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, website security is of the utmost importance if you run a WordPress site. Hopefully, this information 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 consult a professional WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

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


"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)