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 SecurityWhen you are the most popular content management system in the world and the online publishing platform of choice used by 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.

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

These attacks were caused by infected computer networks programmed to attack other vulnerable installations (called “botnets”).

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

About Brute Force Attacks

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. To do this, hackers use software tools and scripts that automatically tries to guess hundreds of login permutations in minutes.

If you’re using predictable user names and passwords that are easy to guess, your website could be an easy target for hackers.

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.org)

A “Botnet” is a network of private computers that have been infected with malicious code, which are then controlled remotely as a group, often without the computer owners’ knowledge.

Botnets are often 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 compromising computer networks all around the world since 2009 called “Zeus” …

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: SecureList.com)

These were well organized and highly distributed botnet attacks. 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 site administration areas. The attacks then continued, with over 30,000 WordPress sites being hacked every day.

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

WordPress is the world's most popular CMS which makes it an obvious target for hacking attacks

(WordPress is frequently the target of large-scale malicious attacks by hackers)

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

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

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

Important

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

Mike Little, one of the co-founders of WordPress, 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.

(MikeLittle.org)

Preventing Your WordPress Website From Brute Force Attacks – Ten Security Checks

Every blog with a security vulnerability provides some value opportunity to hackers. An unsecured web site not only offers new hackers opportunities to improve their skills and claim “bragging rights” among their peers, but it can also be a valuable resource for launching distributed attacks, spreading malware and participating in information theft.

If a hacker can discover a security vulnerability in your system that lets them take over your website or blog, your website can then be employed as a “bot” to attack other highly-valued sites.

Additional undesirable impacts of having your site hacked include getting blacklisted by search engines, having spammy links promoting things like casinos, porn, etc. inserted into your content and page title and descriptions, redirecting visitors to phishing sites, drive-by downloads (adding malicious scripts on your visitors’ computers), and lots of other nasties.

The harsh reality is that software-driven bots are probably trying to hack into your blog while you are reading this. Whether they will get into your site successfully depends on how hard or easy you will make things for them to keep persisting until they can find a way to get access, or give up and go look for an easier target.

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

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

Hackertarget - WordPress Security Check(Hackertarget – WP Security Scan Screenshot source: https://hackertarget.com/wordpress-security-scan)

You will see that the test returns a number of results and information about your website setup …

WordPress Security Check

(website security check results. Source: Hackertarget.com)

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

Hackertarget - WordPress Security Check(Product image source: Blog Defender)

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 can all be potentially valuable information to hackers, as these can inform them about potentially exploitable security weaknesses, especially where the owners haven’t updated their software versions.

If your website runs on WordPress and you are not taking steps to toughen up your site, then we can practically guarantee that, at some time in the near future, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically hitting WordPress installations worldwide!

Typically, whenever a website or blog gets hacked, webmasters can discover much to their dismay that they have been “locked out” of their own site, or notice that their content has been modified or even entirely wiped out. Often, compromised sites will be infected with malicious scripts without the owner even being aware that a security breach has occurred.

To avoid the heartache and frustration (and significant loss of valuable business data) of having your website or blog being hacked into, we have listed below ten simple, yet essential and effective security measures that will help to protect your WordPress site from being attacked by brute force hackers.

Useful Info

Note: Some of the measures below require some technical understanding of how to modify core WordPress or server files. If you have no web editing skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress technical provider for help.

***

Security Measure #1 – Get In Touch With Your Web Host

Get in touch with your webhosting provider and ask them what precautions are in place to help prevent your site from being attacked, and what they are doing to ensure that your site files get backed up.

Check that your host is backing up your server files and that, if disaster strikes, you can easily get back your files and data.

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

Never rely just 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 develop a habit of performing a full site maintenance routine frequently (e.g. weekly, monthly, etc …)

A proper WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

Maintaining your WordPress web site backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP website fully backed up and up-to-date is vitally important for WordPress security. Screenshot: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WordPress website backed up and updated. WP site 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 site maintenance yourself, pay someone to do it but make sure this gets done. Backing up your website is the next 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 free and paid WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Back Up, Copy & Protect Your WP Web Site With Backup Creator Plugin For WP

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

The large scale brute-force attack on WordPress is mostly an attempt to compromise website administrator panels and gain access to the site by exploiting sites with “admin” as the username.

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

For a simple step-by-step tutorial created especially for non-technical WordPress users that shows you how to change your username, go here: How To Change Your WordPress Username From Admin To A Different User Name

Security Measure #4 – Your Password

A “brute force” attack occurs when malicious software continually tries to guess the right combination of characters in a password and username that will give the hacker access to your website.

Unless you put some measure in place to prevent 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 breaks into your admin area.

Passwords that are easy to guess, therefore, are very easy targets for attacks. Make sure that you change your password to something that contains at least 8 or 9 characters long, with upper and lowercase letters, combined with “special” characters (e.g. %, $, *, etc).

Useful Tip

You can use a password management tool like Roboform to generate very secure passwords …

You can use a password tool like Roboform to help you generate difficult passwords(You can use a password software tool like Roboform to generate strong login passwords)

We have created a simple step-by-step tutorial that shows you how to change your admin password here: Changing Passwords

Security Measure #5 – Prevent Your wp-config.php File From Being Visible

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

(wp-config.php)

If a hacker breaks into your WordPress site, they will normally try to access the wp-config.php file, because this file contains important information about your site’s database, 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 being attacked and even being used as part of a bot net, therefore, you must prevent people from being able to easily access 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 Installation Files

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

These files are completely unnecessary after installation and can be removed. If you don’t want to remove these files, then just rename them.

Security Measure #7 – Update Your WordPress Blog, Themes And Plugins To Their Latest Version

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

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

Security Measure #8 – Disable Your Theme Editor

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

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor via the main menu)

This allows anyone accessing your blog’s admin area to view and change your WordPress theme files, or cause mayhem on your site.

If you want 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 The Site’s Uploads Directory

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

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

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

(WordPress uploads folder)

If any files stored in his folder have vulnerabilities that can be exploited by hackers or malicious users, this can threaten 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, adding a blank index.php file (this is literally a file with nothing in it called “index.php”) to your uploads directory, and so on. Again, it’s best to ask for assistance from someone who knows what they are doing if you are not sure about what to do.

Security Measure #10 – Security Plugins

A number of great WordPress security plugins are available that will address most common security issues faced by WordPress site owners, such as preventing unauthorized users from gaining access to vital information about your site, protecting your site 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 files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - WordPress security plugin

(SecureScanPro – security plugin for WordPress)

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 consider using is BlogDefender.

Blog Defender Security Suite For WordPress

Blog Defender WordPress Security Product Suite(Blog Defender)

Blog Defender is a package 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 holes …

Blog Defender Security SolutionAnd lets you fix these quickly, easily and inexpensively …

Blog Defender Security PluginIf you don’t want to invest in 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 web platform, but neglecting basic maintenance tasks like updating your WordPress software, WP plugins and themes, tightening file and data security 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, you cannot ignore the importance of securing your website or blog.

As one last reminder of the importance of website security, below is the advice given by an expert on web security to all WordPress users after the global 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, website security is of the utmost importance 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 seek help from a WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.

Also, don’t forget to subscribe to WPCompendium.org to receive notifications when we publish new information on WordPress security and reviews of new WordPress security plugins.

***

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

***