{"id":3351,"date":"2015-11-24T14:00:46","date_gmt":"2015-11-24T12:00:46","guid":{"rendered":"https:\/\/www.reliablesoft.net\/?p=3351"},"modified":"2021-06-28T22:20:25","modified_gmt":"2021-06-28T19:20:25","slug":"how-to-protect-your-wordpress-website-from-hackers","status":"publish","type":"post","link":"https:\/\/www.reliablesoft.net\/how-to-protect-your-wordpress-website-from-hackers\/","title":{"rendered":"How to Protect Your WordPress Website From Hackers"},"content":{"rendered":"

The growing popularity of WordPress has also created more interest among hackers. Statistics show that out of the 80 million websites powered by WordPress, a large portion of them (70%+) \u00a0are vulnerable to attacks.<\/p>\n

If you think that your website is not part of the 70%, you are wrong. If you also think that nobody cares about your small business website or blog, you are again wrong. Attacks can happen because your site is vulnerable to attacks and not because a hacker decided to \u2018break-into\u2019 your business.<\/p>\n

When your website is hacked, a lot of bad things can happen besides damaging your website\u2019s reputation. You can lose customers, traffic, money, confidential information and not to mention the time, stress and effort that it will take to clean your website and get it back to a normal state.<\/p>\n

Those that experienced this at least once, know exactly what I mean. It\u2019s those times that you wished you have taken preventive measures instead of trying later to recover from the damage, especially when your income and business depends on your website.<\/p>\n

To tell you truth, I didn\u2019t bother about security, I was thinking like most people that this would never happened to my websites. But it did. And it was a terrible experience.<\/p>\n

A few of my clients had faced similar issues and they lost money and business but at least we all now learned our lesson. When it comes to security issues, \u201cPrevention is the best cure\u201d.<\/p>\n

If you have a WordPress website but did not take any measures to improve security, it\u2019s now the right time to take action. Don\u2019t delay it any longer but set this as your first priority above SEO or anything else you might be doing.<\/p>\n

It won\u2019t take you a lot of time but it can save you a lot of time, money and frustration in the future.<\/p>\n

10 ways to protect your WordPress Website<\/h2>\n

#1 – Install Sucuri<\/b> \u00a0– I know that this may sound overly promotional for some but those following my articles know that I don\u2019t recommend something (especially if it\u2019s a third party service), unless it is very important and useful and sucuri<\/a><\/strong> is one of them.<\/p>\n

In a few words, sucuri is a company that offers security services to websites (not only WordPress). They help you ‘clean’ and recover your website in case it is affected by malware but at the same time they offer a number of tools for securing and hardening your website so as not to get into trouble in the first place.<\/p>\n

I have used sucuri a number of times for both my website\u2019s and also my clients . One of the things I really like is that in case your website is compromised and affected by malware, all you have to do is register an account with them, submit a malware request and they take care of the rest in a reasonable amount of time.<\/p>\n

Instead of spending time wondering what happened and searching the Internet to find ways to clean your website and recover your business, leave this to sucuri and spend your time following the prevention measures explained below to avoid having to deal with the same situation again.<\/p>\n

A final note before getting into the features of sucuri and how to use them, is that Google in their guide for\u00a0hacked sites<\/a><\/b>\u00a0are also recommending sucuri for prevention and protection and so does the official WordPress website in their hacked sites FAQ<\/b><\/a>.<\/p>\n

Which package to use? <\/b>They have 3 packages but for most of the cases you only need to register for the BASIC plan<\/a><\/strong> which is less than $18 per month.<\/p>\n

This will give you access to their malware removal service in case you need it and also their website antivirus prevention tools.<\/p>\n

Follow the simple steps below to activate sucuri on your WordPress website:<\/p>\n

The first step is to register for the basic plan<\/a><\/strong> and then ‘Add your website’ to the dashboard.<\/p>\n

\"add<\/p>\n

Next,\u00a0you need to configure the \u2018Server Side\u2019 Scanner by giving them access via FTP to your website files and directories. The server side scanner is what will monitor your website (several times per day),\u00a0identify\u00a0affected files and also perform cleanup actions if needed.<\/p>\n

\"sucuri<\/p>\n

You can either enter your FTP credentials in the ‘Enable Via FTP’ option or use the ‘Enable Manually’ by downloading the file provided and uploading it to your root folder.<\/p>\n

The file method is better in case you decide to change your FTP credentials, you won’t break the functionality.<\/p>\n

Install and configure their WordPress Plugin. Install the sucuri plugin from here<\/a><\/strong> (like you do with a normal WordPress plugin) and then go to dashboard and connect it with your sucuri account.<\/p>\n

\"Sucuri<\/p>\n

Once you perform the above steps successfully, sucuri is actively protecting your website.<\/p>\n

What you can \u00a0do now is click the SETTINGS<\/strong> (under Sucuri Security) and configure your settings as shown in the screenshot below.<\/p>\n

\"Sucuri<\/p>\n

This will ensure that you will get notified by email for any changes to your website files\u00a0or\u00a0any\u00a0failed login attempts. In addition, it will also activate the web firewall feature that automatically blocks suspicious IP addresses from attempting to login to\u00a0Wordpress.<\/p>\n

Go to Dashboard<\/strong> (under Sucuri Security) and you will be amazed how many bots try to gain access to your website.<\/p>\n

There are many other settings you can review (under Sucuri Security) but the above in combination with the steps described below will dramatically improve the security of your WordPress Website.<\/p>\n

#2 – Use strong passwords<\/b> – One of the things you definitely need to check right now is your wordpress passwords and especially the password you use for the administrator.<\/p>\n

Don\u2019t use simple, letter only passwords, but create strong passwords that include letters, numbers and symbols.<\/p>\n

Here are a few examples of simple and strong passwords:<\/p>\n\n\n\n\n\n\n
Simple<\/strong><\/td>\nStrong<\/strong><\/td>\n<\/tr>\n
SimplePassword<\/td>\n$1mpLePas$$w0rd!<\/td>\n<\/tr>\n
WordPress123<\/td>\nW0rD!!Pr3$$123<\/td>\n<\/tr>\n
Janiebrown<\/td>\nJAN1E$Br0wN<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

 <\/p>\n

You can change the password of any users by\u00a0selecting USERS \/ ALL USERS from the \u00a0left menu. From the list of users, select EDIT and scroll down to the password field.<\/p>\n

#3 – Change the default admin user names<\/b> – The first thing hackers will try and do is find out the administrator username so usernames like admin, administrator and host are too obvious and you need to change them to something more difficult to identify.<\/p>\n

Also, review your user roles and make sure that there is only one administrator to the site. Other users (guest authors, writers) can be set as ‘Contributor’.\u00a0Delete any other users that are not valid or set their role to ‘None’.<\/p>\n

#4 – Protect your wp-login, wp-config, .htaccess and wp-admin folder<\/b> – This is perhaps the most important step of all measures you can take to secure your wordpress website.<\/p>\n

By protecting and restricting access to your wp-config, .htaccess, wp-login and wp-admin folder, you already made a huge step towards the right\u00a0direction.<\/p>\n

It does not require any technical knowledge, you only need access to FTP and to follow the steps below:<\/p>\n

Step 1: Login to your website with FTP and locate the .htaccess file on the root folder (usually public_html or www). If you have installed WordPress on a directory then you will find the .htaccess file there.<\/p>\n

Step 2: Download the file on your computer<\/p>\n

Step 3: Use any text editor (notepad, brackets etc) to open the file<\/p>\n

Step 4: Add the following lines at\u00a0the top of the file:<\/p>\n

\"Restrict<\/p>\n

Important:<\/strong><\/em> You should add your Public IP in the orange shaded area above otherwise you will not be able to login to your own website!<\/p>\n

Step 5: Save your changes<\/p>\n

Step 6: Upload the file back to your server and replace the existing one.<\/p>\n

The role of the above lines is to restrict access to ALL ips trying to either access your .htaccess file, wp-config.php or your login page. In case your Public IP changes frequently you need to edit this file and type the correct IP in the orange shaded area above. If you type a wrong IP there, you will not be able to login to your WordPress dashboard. You can add more than one IPs (one per line,\u00a0preceding\u00a0by the words ‘ allow from’).<\/em><\/p>\n

I know that for some this is too much BUT it’s the best and most efficient way to keep everyone (besides allowed IPs) from getting access to your website. This does not affect the functionality of your website or SEO but it re-enforces security.<\/em><\/p>\n

The next step is to protect unauthorized access to your wp-admin<\/strong> folder. You can do this by following the steps below:<\/p>\n

Step 1: Login to your website with FTP and locate the .htaccess file inside the\u00a0wp-admin<\/strong> folder. If there is no .htaccess\u00a0<\/strong>file then create one (using any text editor), add the lines shown below and update it to your wp-admin folder.<\/p>\n

Step 2: Download the file on your computer<\/p>\n

Step 3: Use any text editor (notepad, brackets etc) to open the file<\/p>\n

Step 4: Add the following lines at\u00a0the top of the file:<\/p>\n

\"Protect<\/p>\n

Important:<\/strong><\/em> You should add your Public IP in the orange shaded area above otherwise you will not be able to login to your own website!<\/p>\n

Step 5: Save your changes<\/p>\n

Step 6: Upload the file back to your server and replace the existing one.<\/p>\n

The same rules apply as explained \u00a0above i.e. To be able to login to your website you need to add your public IP in the orange shaded area.<\/em><\/p>\n

#5 – Protect xmlrpc.php (optional but recommended)<\/b>\u00a0– Besides protecting the above files, a common way to hack into WordPress websites is through xmlrpc. Xmlrpc.php is a file used for communicating remotely with WordPress.<\/p>\n

Hackers can make use of xmlrpc (which is enabled by default from WordPress 3.8) to execute DDoS (Distributed Denial of Service Attacks), that can cause server problems and\u00a0bring a website down.<\/p>\n

You need to keep XMLRPC\u00a0enabled\u00a0if you are using services like JetPack, the official mobile wordpress app, pingbacks & trackbacks.<\/p>\n

To make sure that no programs can access and execute the file, add this to your .htaccess (like you did in point 4 above)<\/p>\n

\"Block<\/a><\/p>\n

#6 – Update WordPress and Plugins to the latest versions<\/b> – Most of the times hackers can gain unauthorised access to your website through plugins. Free and paid plugins have vulnerabilities and it\u2019s always a best practice to upgrade them to their latest versions.<\/p>\n

Software companies (especially for paid plugins) have started to look into security matters more seriously and they try to close any security holes in order to protect their customers and of course their reputation.<\/p>\n

Besides upgrading, review the list of installed plugins and if you find that some have not been updated for several months then consider deactivating them, replacing them with other plugins that are updated more frequently or deleting them.<\/p>\n

#7 – Check your \u2018comments\u2019 and forms settings<\/b> – When you have comments open on your posts check your \u2018Discussion\u2019 settings and make sure that all comments are manually approved. This may add more administration work from your part but it\u2019s the best way to ensure that no spam comments are entered.<\/p>\n

Also check that you have akismet<\/a><\/strong> activated and that you use a Captcha<\/a><\/strong> on all your contact forms.<\/p>\n

#8- Check your server settings <\/b>– Besides your WordPress installation another way that hackers can break into your system is through your web server.<\/p>\n

What you can easily do is to use a strong password for the administrator account and FTP, and also enable email notifications to get notified every time someone is logged-in to the server. You may need to check with your hosting provider on how to do this since it is different for each type of hosting server.<\/p>\n

#9 – Move to a reliable VPS host <\/b>– Any serious blogger or business should be using a VPS for their website. If you are still on shared hosting then it\u2019s time to reconsider and move to your own VPS<\/b><\/a>. The cost is not that much per month but the benefits, especially when it comes to security, are priceless.<\/p>\n

There are many hosting companies offering VPS for wordpress, take some time and find a VPS host that is reliable<\/b><\/a> with good and fast support. When you get into security troubles, you will need the support of your hosting company and they need to respond to your requests fast but also in an effective way.<\/p>\n

I tried a number of hosts all these years and the last couple of years I have moved all my websites with knownhost<\/a><\/strong>. Their support both in speed and effectiveness is the best I have ever seen.<\/p>\n

#10 – Take Full Backups of your Website –<\/b> While this may not be a security measure as such, the first thing that you will need after an attack is a clean backup of your website to use it to recover to the previous good state.<\/p>\n

To eliminate any unpleasant surprises:<\/p>\n

Make sure that you take a backup of both your WordPress files and Database (at least once per week)<\/p>\n

That you keep the backup files\u00a0in\u00a0a safe location (other than your website\u2019s server)<\/p>\n

That you know how to use the backup to restore your website. This is a critical step and you need to allocate some time to make a test and document the procedure so that you know exactly what you need to have to do when in need and under a lot of stress.<\/p>\n

I use the BackupWordpress Plugin<\/a><\/strong> which comes free and has the options to schedule backups for both the files and database.<\/p>\n

The bottom line: When it comes to security, prevention is always better than cure<\/h2>\n

You need to take measures to protect your WordPress website from hackers. You don\u2019t necessarily have to pay for a monthly service if you currently cannot afford it but for sure you need to review and configure correctly the other setting suggested above.<\/p>\n

Don\u2019t underestimate the damage hackers can cause to your website or business. When you face this situation once, you will understand how important it is to take as many measures as you can before it happens.<\/p>\n

If you have any questions or something is not clear, let me know in the comments below.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"

The growing popularity of WordPress has also created more interest among hackers. Statistics show that out of the 80 million websites powered by WordPress, a large portion of them (70%+) \u00a0are vulnerable to attacks. If you think that your website is not part of the 70%, you are wrong. If you also think that nobody […]<\/p>\n","protected":false},"author":2,"featured_media":3353,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","mc4wp_mailchimp_campaign":[]},"categories":[3],"tags":[235,11,234,236],"_links":{"self":[{"href":"https:\/\/www.reliablesoft.net\/wp-json\/wp\/v2\/posts\/3351"}],"collection":[{"href":"https:\/\/www.reliablesoft.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reliablesoft.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reliablesoft.net\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reliablesoft.net\/wp-json\/wp\/v2\/comments?post=3351"}],"version-history":[{"count":1,"href":"https:\/\/www.reliablesoft.net\/wp-json\/wp\/v2\/posts\/3351\/revisions"}],"predecessor-version":[{"id":29263,"href":"https:\/\/www.reliablesoft.net\/wp-json\/wp\/v2\/posts\/3351\/revisions\/29263"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.reliablesoft.net\/wp-json\/wp\/v2\/media\/3353"}],"wp:attachment":[{"href":"https:\/\/www.reliablesoft.net\/wp-json\/wp\/v2\/media?parent=3351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reliablesoft.net\/wp-json\/wp\/v2\/categories?post=3351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reliablesoft.net\/wp-json\/wp\/v2\/tags?post=3351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}