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 is frequently the target of attacks by hackers, due to its popularity.

In early 2013 a global brute force attack struck WordPress installations across almost every host server in existence around the world.

These attacks were caused by botnets (infected computer networks programmed to attack other computers with security vulnerabilities).

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)

There are many methods hackers use to try and 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 scripts and tools that automatically tries to guess hundreds of possible login combinations in minutes.

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

This is called a “brute-force” attack.

Botnet Definition

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 code, which can then be controlled remotely as a group, typically without the computer owners’ knowledge or awareness.

Botnets are normally used used to send 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 world since 2009 called “Zeus” …

The Zeus botnet has been actively compromising computer networks all around the globe since 2009.

(ZeuS is a botnet that has been actively infecting computer networks all around the globe since 2009. Image source:

These ongoing botnet attacks were highly distributed and well organized. Over 90,000 IP addresses were identified by several hosting companies in the initial attack alone, when millions of attempts to force their way into WordPress user admin areas took place. The large-scale brute-force attacks continued after this, with over 30,000 WordPress sites and blogs being hacked every day.

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

Powering millions of websites and blogs around the world makes WordPress a target for attempted attacks by malicious users

(WordPress powers millions of websites around the world, making it an obvious target for hackers)

Does This Mean We Should Stop Using WordPress?

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

We explain why WordPress is a secure platform for websites in this article: Is WordPress A Secure Platform For Websites?


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

Every web site with a security vulnerability offers some degree of potential value to hackers. A vulnerable web site not only presents newbie hackers opportunities to improve their hacking skills and claim “bragging rights” from their peers, but it can also serve as a platform for stealth attacks, spreading malware and engaging in information theft.

If a hacker can access and remotely control your website, that blog can then be used to attack other highly-valued websites.

Additional undesirable consequences of having your website hacked and your site security compromised include getting blacklisted by Google, having spammy links promoting things like viagra, porn, etc. inserted into your content and page title and descriptions, redirecting visitors to phishing sites and other websites, drive-by downloads (adding malicious scripts on your visitors’ computers), and many other nasty things.

The reality is that malicious bots are most likely scouring for exploits and trying to hack into your website or blog while you are reading this right now. Whether they can get into your site or not, depends on how hard or easy you can make things for them to keep trying until they discover a way to get in, or give up and decide to look for a less secure target.

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

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

Hackertarget - WordPress Security Scan(Hackertarget – WP Security Scan Screenshot source:

You will see that the scan will return various results and information about your site …

Hackertarget - Website Security Scan

(Hackertarget – WordPress security check results. Screenshot image:

It should be obvious after using this scanning tool that if you are able to see all of this information about your blog, hackers can too.

Hackertarget - WP Security Scan(Screenshot:

The ability to see which version of WordPress you are using, which plugins and themes you have installed on your site, and which files have been uploaded to certain directories can all be valuable information to hackers, as these can inform them about exploitable security weaknesses, especially where the owners haven’t updated their sites.

If your site or blog is driven by WordPress and you’re not taking appropriate steps to harden your site, then we can practically guarantee that, at some point in time, your site will be hacked, or at least targeted by bots, because these attacks are systematically targeting WordPress sites worldwide!

Typically, whenever a site gets compromised, webmasters can find themselves completely “locked out” of their own site, or notice that their files have been altered or even that their content has been entirely wiped out. Often, compromised sites will become infected with malicious software without the owner’s knowledge or awareness.

To help avoid the heartache and frustration (and significant financial loss) that comes with having your website being hacked into, below are ten essential and effective security measures that will help to protect your WordPress site from being attacked by brute-force botnet hacking attempts.


Note: A few of the recommended steps shown below need 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 a professional WordPress service provider for help.


Security Measure #1 – Contact Your Webhosting Company

Get in touch with your webhosting provider and ask them what security measures they have put into place to protect your site from brute-force attacks, and what they do to ensure that your files and data get regularly backed up.

Make sure that your web host backs up your server files and that, if disaster strikes, you can easily get your files and data back.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Frequently Updated

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

A complete WordPress maintenance routine ensures that:

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

A complete WP site maintenance routine looks like this …

Maintaining your WP site regularly backed up and updated is vitally important for WordPress security.(Maintaining your WordPress website 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 site backed up and up-to-date is. WP 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 don’t want to learn how to do WordPress maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website is the next most important thing you should do after making sure that your heart is still beating!

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

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

the worldwide brute force attack on WordPress sites was mostly an attempt to compromise site admin panels and gain access to the site by exploiting installations that used “admin” as their account name.

For security purposes, don’t set up WordPress sites with the username “admin”. This is the first area of potential vulnerability hackers will test. If your site’s username is “admin”, then change this immediately.

We have created a simple step-by-step tutorial on how to change your WordPress username here: Changing Your WP Username From Admin To A Different User Name

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

A “brute force” attack occurs when malicious software continually tries to guess the right username and password character string that will give them entry to your site.

Unless some measure is put into place to block the brute force attack from happening (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually “cracks” the code.

Passwords that are easy to guess, therefore, are 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 both upper and lowercase letters, and “special” characters (%^#$@&*).


Roboform is a password management program that lets you easily generate different unguessable passwords …

Roboform is a password management tool that lets you easily generate different  passwords(Roboform is a password program that lets you easily create secure login passwords)

For a tutorial created especially for non-technical WordPress users on how to change your admin password, go here: What To Do If You Need To Change The Login Password

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

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

wp-config.php file


If hackers break into your WordPress site, they will try to access the 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.

To protect your WordPress site from attacks and even being used as part of a bot net, therefore, prevent people from being able to easily get to 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 – Delete Or Rename Unnecessary WordPress Installation Files

Delete or rename 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 delete these files, just rename them.

Security Measure #7 – Upgrade Your WordPress CMS, Themes & Plugins To Their Latest Version

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

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

Security Measure #8 – Disable The WordPress Theme Editor

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

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

WP Theme Editor Menu

(The WordPress theme editor can be accessed via the main menu)

The WordPress theme editor feature allows anyone accessing your blog to view and modify your WordPress theme templates, and cause havoc on your site.

If you want to prevent unauthorized people from being able to access 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 – Prevent Access To Your WordPress Uploads Folder

The WordPress “uploads” directory stores 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 view the contents stored in the “uploads” directory is navigate to your directory using their browser …

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

(WordPress uploads directory)

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, anyone could upload unauthorized file types or compromise the security of your site.

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

Several security plugins for WordPress are available that will address common security issues WordPress site owners face, such as preventing hackers from accessing your site, protecting your site from malicious software, 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 potential issues that could lead to hackers accessing your files and causing damage to your site is SecureScanPro.

SecureScanPro - WordPress total security software

(SecureScanPro – complete security plugin for WordPress)

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

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

Blog Defender Security Solution

Blog Defender WordPress Security Solution(Blog Defender Security Suite For WordPress)

This product is a suite of WordPress security video tutorials, plugins and tools, plus WordPress security documentation in PDF and DOC formats.

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

Blog DefenderAnd lets you quickly and easily fix these …

Blog Defender Security SuiteIf you don’t want to purchase 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 very secure web platform, but neglecting essential maintenance tasks like updating your WordPress software, plugins and WP 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, web security is something you simply cannot afford to ignore.

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, WordPress security is very important 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 professional WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

Also, remember subscribe to to receive notifications whenever we publish new articles 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)


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

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

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

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.