{"id":166017,"date":"2017-07-13T13:00:46","date_gmt":"2017-07-13T13:00:46","guid":{"rendered":"https:\/\/premium.wpmudev.org\/blog\/?p=166017"},"modified":"2018-07-18T04:14:32","modified_gmt":"2018-07-18T04:14:32","slug":"ultimate-guide-wordpress-security","status":"publish","type":"post","link":"https:\/\/wpmu-dev.pro\/blog\/ultimate-guide-wordpress-security\/","title":{"rendered":"The Ultimate Guide to WordPress Security"},"content":{"rendered":"<p>Hackers attack WordPress sites both big and small with tens of thousands of attacks happening per minute. Fortunately, there are many ways you can protect your WordPress site.<\/p>\n<p>Today, I want to share with you how you can make your WordPress site&#8217;s security air tight with basic through to advanced techniques. I&#8217;ll also explore how WordPress can be vulnerable to attacks, how hackers compromise websites, how to troubleshoot a hacked site, and the best security plugins you can install to keep your site safe and protected.<\/p>\n<p>Feel free to jump down to any section you want to see first:<\/p>\n<ul>\n<li><a href=\"#wordpress-secure\">Is WordPress Secure?<\/a><\/li>\n<li><a href=\"#how-compromise\">How Hackers Compromise Websites<\/a><\/li>\n<li><a href=\"#basic-security\">Basic, No-Nonsense Security Steps<\/a><\/li>\n<li><a href=\"#security-obscurity\">Security through Obscurity<\/a><\/li>\n<li><a href=\"#security-best-practice\">WordPress Security Best Practices<\/a><\/li>\n<li><a href=\"#troubleshoot-hacked-site\">Troubleshooting a Hacked Site<\/a><\/li>\n<li><a href=\"#security-plugins\">WordPress Security with Plugins<\/a><\/li>\n<\/ul>\n<p>As the name of this post implies, this is our ultimate guide to WordPress security. So, I recommend you bookmark this article and return to it every now and again to ensure your websites are checking off all the necessary security boxes.<\/p>\n<h2 id=\"wordpress-secure\">Is WordPress Secure?<\/h2>\n<p>With so many hackers attempting to infiltrate WordPress sites regularly, you may begin to wonder if WordPress is really secure at all. You can stop wondering because WordPress is inherently secure, though, there&#8217;s a caveat.<\/p>\n<p>The <a href=\"https:\/\/wordpress.org\/about\/security\/\" rel=\"noopener\" target=\"_blank\">security team behind WordPress<\/a> works diligently to neutralize any vulnerabilities that surface within the WordPress core. Security patches are included in core updates that are released consistently and on a regular basis.<\/p>\n<p>In fact, since WordPress was initially released, <a href=\"https:\/\/www.google.ca\/search?q=site%3Acore.trac.wordpress.org%2F+security+closed&amp;oq=site%3Acore.trac.wordpress.org%2F+security+closed&amp;aqs=chrome..69i57j69i58.16177j0j4&amp;sourceid=chrome&amp;ie=UTF-8#q=site:core.trac.wordpress.org\/+security+closed&amp;safe=off&amp;start=0\" rel=\"noopener\" target=\"_blank\">over 2,450 security vulnerabilities<\/a> have been quickly patched. There are also times where <a href=\"https:\/\/wordpress.org\/news\/2005\/05\/security-update\/\" rel=\"noopener\" target=\"_blank\">fixes have been made in under 40 minutes<\/a> of a vulnerability&#8217;s discovery<\/p>\n<p>The caveat is that you need to keep WordPress core up-to-date in order to apply all the security patches that are rolled out. Fortunately, updates can be pushed automatically or manually in a couple clicks. You can also choose to turn off automatic updates in case you want to run compatibility tests beforehand.<\/p>\n<p>This change is also covered later on in this post, but you can also check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/update-wordpress\/\" target=\"_blank\">Why You Should Have the Latest Version of WordPress<\/a>, <a href=\"https:\/\/wpengine.com\/blog\/wordpress-core-is-secure-stop-telling-people-otherwise\/\" rel=\"noopener\" target=\"_blank\">WordPress Core is Secure \u2013 Stop Telling People Otherwise<\/a> and <a href=\"https:\/\/wpmu-dev.pro\/blog\/wordpress-aint-perfect\/\" target=\"_blank\">WordPress: It Ain\u2019t Perfect \u2013 but Neither Are the People Who Use It<\/a> for details.<\/p>\n<p><strong>If you take away only one tip today, make it this one<\/strong>: keeping WordPress up-to-date is by far, the single most critical action you can do for the security of your site. Every other technique you apply is still necessary, but it&#8217;s not going to do you any good if the WordPress core itself is vulnerable and that happens if it&#8217;s not up-to-date.<\/p>\n<p>Fortunately, you can update your entire site in a few clicks from <a href=\"https:\/\/wpmu-dev.pro\/hub\/\" target=\"_blank\">The Hub<\/a>.<\/p>\n<h3>Why Your Site is a Target<\/h3>\n<p>WordPress is secure, but the fact is, all websites are targets for hackers so no one is immune. Even a fresh install of WordPress with nothing on it, little to no traffic, and that&#8217;s kept up-to-date is still at risk.<\/p>\n<p>Overall, there are two main reasons why any site is hacked: money and hacktivism (defacing a site for political reasons such as to show support for a particular political party or influencing group).<\/p>\n<p>The <a href=\"https:\/\/www.aeaweb.org\/articles?id=10.1257\/jep.26.3.87\" rel=\"noopener\" target=\"_blank\">American Economic Association reported<\/a> that businesses and consumers lose $20 billion per year due to spam. According to a <a href=\"https:\/\/sucuri.net\/reports\/2016-q3-hacked-website-report\/\" rel=\"noopener\" target=\"_blank\">2016 report by Sucuri<\/a>, 100% of sites that were sampled were hacked in order to exploit them for profit, but four percent of them are simultaneously used for hacktivism.<\/p>\n<p>For details, check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/ultimate-guide-wordpress-spam\/\" target=\"_blank\">The Ultimate Guide to WordPress Spam<\/a>.<\/p>\n<p>Any and every site is a target no matter how teeny-tiny or gargantuan. The reason is that WordPress itself is such a popular content management system (CMS) that it&#8217;s a natural target. Hackers can create a program, commonly referred to as bots or hackbots, that automatically and systematically scans for security holes and attacks hundreds of thousands of sites simultaneously. The more sites that can be scanned and attacked, the greater the potential success rate for the hacker.<\/p>\n<p>WordPress as a target for hackers is similar to hitting a mansion-sized bull&#8217;s eye if you were playing paint ball. The chances of you being able to successfully splatter that target with paint over and over even from a great distance is almost certain.<\/p>\n<p>Since WordPress now powers 28% of all websites on the internet <a href=\"https:\/\/w3techs.com\/technologies\/details\/cm-wordpress\/all\/all\" rel=\"noopener\" target=\"_blank\">according to W3Techs<\/a>, which is also the largest segment of websites using a known CMS, there are millions of sites that hackers can target.<\/p>\n<p>It&#8217;s all about the math, really.<\/p>\n<p>Smaller, less popular sites are a particularly great option for hackers because they&#8217;re less likely to be secure, since many owners of these sites may not know they&#8217;re actually a larger target than they realize.<\/p>\n<p>On the flip side, larger, more secure sites are still a target because there&#8217;s a greater audience available for <a href=\"https:\/\/wpmu-dev.pro\/blog\/ultimate-guide-wordpress-spam\/\" target=\"_blank\">hackers who want to inject and profit off spam<\/a> if they can manage to get past the website&#8217;s defences.<\/p>\n<p>It&#8217;s important to recognize that while WordPress is secure when it&#8217;s kept up-to-date, no site is impervious to infiltration 100% of the time.<\/p>\n<p>For example, <a href=\"https:\/\/wptavern.com\/wordpress-4-7-3-patches-six-security-vulnerabilities-immediate-update-advised\" rel=\"noopener\" target=\"_blank\">WordPress version 4.7.3 patched six XSS vulnerabilities<\/a> in the REST API that could allow hackers to inject code into any WordPress site. It affected over 1.5 million sites <a href=\"https:\/\/www.wordfence.com\/blog\/2017\/02\/rest-api-exploit-feeding-frenzy-deface-wordpress-sites\/\" rel=\"noopener\" target=\"_blank\">according to Wordfence<\/a>.<\/p>\n<p><a href=\"https:\/\/blog.sucuri.net\/2017\/02\/wordpress-rest-api-vulnerability-abused-in-defacement-campaigns.html\" rel=\"noopener\" target=\"_blank\">Sucuri initially reported that roughly 67,000 WordPress sites were hacked<\/a> and defaced by different hackers due to the discovered security hole. Once a patch was released, over one million sites weren&#8217;t immediately updated, which lead to them being hacked.<\/p>\n<h2 id=\"how-compromise\">How Hackers Compromise Websites<\/h2>\n<p>When writing code, it&#8217;s near impossible to not create any security holes whatsoever. When hackers find these vulnerabilities, they exploit them and you&#8217;re left with a compromised site.<\/p>\n<p>There are are also other ways a site could be vulnerable including human error such as using passwords that are easy to guess as well as insecure or unreliable hosting.<\/p>\n<p>There are a number of commonly exploited and potential WordPress vulnerabilities including:<\/p>\n<ul>\n<li><strong>SQL Injection (SQLI)<\/strong> \u2013 Occurs when SQL queries and statements can be entered and executed from a site&#8217;s URL<\/li>\n<li><strong>Cross-site Scripting (XSS)<\/strong> \u2013 A hacker can inject code into a site, typically through an input field<\/li>\n<li><strong>File Upload<\/strong> \u2013 A file with malicious code is uploaded to a server without restriction<\/li>\n<li><strong>Cross-Site Request Forgery (CSRF)<\/strong> \u2013 Code or strings are entered and executed from a site&#8217;s URL<\/li>\n<li><strong>Brute Force<\/strong> \u2013 Constantly trying to log in by guessing the admin&#8217;s account username and password<\/li>\n<li><strong>Denial of Service (DoS)<\/strong> \u2013 When a site goes down due to a steady stream of traffic coming from a hackbot<\/li>\n<li><strong>Distributed Denial of Service (DDoS)<\/strong> \u2013 Similar to a DoS attack, except the hackbot is sending traffic from multiple sources such as infected computers or routers<\/li>\n<li><strong>Open Redirect<\/strong> \u2013 Occurs due to a vulnerability and it&#8217;s a site&#8217;s page that&#8217;s redirected to a different one that&#8217;s set by a hacker and is often spam or a phishing site<\/li>\n<li><strong>Phishing (Identity Theft)<\/strong> \u2013 A site or page created by a hacker that looks like a well-known, commonly trusted site, but is used to collect login credentials by tricking a user to input their details<\/li>\n<li><strong>Malware<\/strong> \u2013 A malicious script or program with a purpose to infect a site or system<\/li>\n<li><strong>Local File Inclusion (LFI)<\/strong> \u2013 An attacker is able to control what file is executed at a scheduled time that was set up by the CMS or web app<\/li>\n<li><strong>Authentication Bypass<\/strong> \u2013 A security hole that enables a hacker to circumvent the login form and gain access to the site<\/li>\n<li><strong>Full Path Disclosure (FPD)<\/strong> \u2013 When the path to a site&#8217;s webroot is exposed such as when the directory listing, <a href=\"https:\/\/wpmu-dev.pro\/blog\/debugging-wordpress-how-to-use-wp_debug\/\" target=\"_blank\">errors or warnings are visible<\/a><\/li>\n<li><strong>User Enumeration<\/strong> \u2013 Being able to determine a valid username to later use for brute force attacks by adding a string to the end of a WordPress site&#8217;s URL to request a user ID which may return an author&#8217;s profile with the valid username<\/li>\n<li><strong>XML External Entity (XXE)<\/strong> \u2013 An XML input that references an external entity and is processed poorly by improperly set up XML parser and <a href=\"https:\/\/www.owasp.org\/index.php\/XML_External_Entity_(XXE)_Processing\" rel=\"noopener\" target=\"_blank\">can lead to confidential information disclosure<\/a><\/li>\n<li><strong>Security Bypass<\/strong> \u2013 Similar to authentication bypass, except that a hacker can circumvent the current security system that&#8217;s in place to gain access to some part of a site<\/li>\n<li><strong>Remote Code Execution (RCE)<\/strong> \u2013 A hacker has the ability to execute arbitrary code on a machine or site from a different machine or site<\/li>\n<li><strong>Remote File Inclusion (RFI)<\/strong> \u2013 Exploiting a reference to an external script on a site in order to exploit it to upload malware and all from an entirely different computer or site<\/li>\n<li><strong>Server Side Request Forgery (SSRF)<\/strong> \u2013 When a hacker can take control of a server either partially or totally <a href=\"https:\/\/www.netsparker.com\/blog\/web-security\/server-side-request-forgery-vulnerability-ssrf\/\" rel=\"noopener\" target=\"_blank\">to force it to execute requests remotely<\/a><\/li>\n<li><strong>Directory Traversal<\/strong> \u2013 Cases where HTTP can be exploited to access a site&#8217;s directories and execute commands outside of the server&#8217;s root directory<\/li>\n<\/ul>\n<p>While this isn&#8217;t a complete list of WordPress security vulnerabilities, they&#8217;re the most common ways a site is exploited, often through the use of a bot. Multiple vulnerabilities could also be exploited at the same time as well.<\/p>\n<p><a href=\"https:\/\/www.wordfence.com\/learn\/how-to-prevent-cross-site-scripting-attacks\/\" rel=\"noopener\" target=\"_blank\">According to Wordfence<\/a> as well as a <a href=\"https:\/\/melapress.com\/statistics-highlight-main-source-wordpress-vulnerabilities\/\" rel=\"noopener\" target=\"_blank\">report by Melapress<\/a>, XSS, SQLI and File upload vulnerabilities are the most commonly exploited security issues. Improperly coded plugins are also the largest culprit and accounts for 54% of these attacks, followed by the WordPress core and themes, respectively.<\/p>\n<p>It was also reported that 73% of WordPress sites are vulnerable to attack.<\/p>\n<p>For details, be sure to check out <a href=\"https:\/\/www.owasp.org\/index.php\/Category:Vulnerability\" rel=\"noopener\" target=\"_blank\">Category: Vulnerability<\/a>, <a href=\"https:\/\/wpmu-dev.pro\/blog\/ultimate-guide-wordpress-spam\/\" target=\"_blank\">The Ultimate Guide to WordPress Spam<\/a>, <a href=\"https:\/\/wpmu-dev.pro\/blog\/xml-rpc-wordpress\/\" target=\"_blank\">XML-RPC and Why It\u2019s Time to Remove it for WordPress Security<\/a> and <a href=\"https:\/\/wpmu-dev.pro\/blog\/wordpress-security-exploits\/\" target=\"_blank\">A History of WordPress Security Exploits and What They Mean<\/a>.<\/p>\n<p>With all the above in mind, this is why it&#8217;s important to take your WordPress site&#8217;s security seriously.<\/p>\n<p>Fortunately, there is a myriad of ways you can beef up your WordPress site&#8217;s security from straight forward tips to more complex steps that you can find below. I&#8217;ll start with the basics and get progressively more advanced as you work your way through this article.<\/p>\n<h2 id=\"basic-security\">Basic, No-Nonsense Security Steps<\/h2>\n<p>It&#8217;s just as important that your computer&#8217;s secure as it is that your site is secure. Malware and viruses can infect your computer, which can spread to not only your WordPress site but hundreds of thousands of other WordPress sites.<\/p>\n<p>There are many ways you can ensure your computer stays as secure as possible.<\/p>\n<p>Here are basic tips to help you start stepping up the security of your computer and WordPress site:<\/p>\n<ol>\n<li>Install a computer virus scanner to help prevent malware and viruses. Be sure the software can also clean up threats as well.<\/li>\n<li>Schedule regular virus scans of your computer to be sure its not unknowingly infected.<\/li>\n<li>Install a computer firewall or enable it if its included with your operating system or your virus scanner.<\/li>\n<li>Don&#8217;t login to the admin dashboard or access your WordPress site when you have previously and are still logged in via a public WiFi or internet caf\u00e9 since your credentials can be tracked or someone could be watching you enter in your login details.<\/li>\n<li>Don&#8217;t log into WordPress through an unsecured internet connection or network.<\/li>\n<li>Use a solid and trusted hosting provider who has an excellent reputation for security and reliability.<\/li>\n<li>Only use <a href=\"https:\/\/wpmu-dev.pro\/blog\/ultimate-wordpress-security-checklist\/\" target=\"_blank\">strong passwords for your site<\/a> and force your users to use strong passwords as well by using a plugin such as <a href=\"https:\/\/www.wordfence.com\/\" rel=\"noopener\" target=\"_blank\">Wordfence<\/a>.<\/li>\n<li>Don&#8217;t allow users to upload files to your site or carefully consider it beforehand since hackers could exploit the privilege and upload malware. This also applies to uploading images such as avatars since sneaky snakes could name a malware file something similar to <em>image-name.jpg.php<\/em> and it may slip through the cracks.<\/li>\n<li>Use File Transfer Protocol Secure (FTPS) instead of <a href=\"https:\/\/wpmu-dev.pro\/blog\/ftp-wordpress\/\" target=\"_blank\">FTP<\/a> which is unsecure to help prevent your connection from being controlled or monitored.<\/li>\n<li>Alternatively, you can use SSH File Transfer Protocol (SFTP) instead of FTP because the former is also more secure.<\/li>\n<li>Only give admin access to those you know and trust.<\/li>\n<li>Similarly, only assign the editor user role to people you know and trust.<\/li>\n<li>Install a security plugin such as <a href=\"https:\/\/wpmu-dev.pro\/project\/wp-defender\/\" target=\"_blank\">Defender<\/a> and use <a href=\"https:\/\/wordpress.org\/plugins\/defender-security\/\" rel=\"noopener\" target=\"_blank\">the free version<\/a> at the very least.<\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/defender-audit-logging\/\" target=\"_blank\" rel=\"noopener\">Enable audit logging in Defender to monitor and track the activity<\/a> of editors, authors, other admins, users and hackers you&#8217;re concerned about, especially if you suspect they could be distributing malware.<\/li>\n<li>Only allow trusted people have access to your hosting account or better yet, don&#8217;t give anyone access to it unless it&#8217;s absolutely necessary. If it is, create an account for them with limited access to only what they need to access and nothing more.<\/li>\n<li>Don&#8217;t give out FTP credentials or create FTP accounts for people you don&#8217;t trust or know well.<\/li>\n<li>If you&#8217;re not currently using FTPS\/FTP, delete any active accounts or disable the feature until the next time you need it to prevent your connection and credentials from being stolen.<\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/backup-and-restoring\/\" target=\"_blank\">Backup your site (or network!) often<\/a> and also schedule backups to prevent a lapse in archives that are available in case you need to restore your site.<\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/testing-wordpress-backups\/\" target=\"_blank\">Test your most current backups<\/a> to ensure they work and include everything that was meant to be backed up.<\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/backup-wordpress-bulletproof-protection\/\" target=\"_blank\">Backup your backups<\/a> to ensure you&#8217;re not going to be left in the lurch in case a backup doesn&#8217;t work as expected.<\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/ultimate-guide-updating-wordpress-multisite\/\" target=\"_blank\">Keep WordPress up-to-date<\/a> at all times.<\/li>\n<li>Similarly, <a href=\"https:\/\/managewp.com\/why-keeping-your-themes-plugins-up-to-date-is-vital-to-your-wordpress-blogs-success\" rel=\"noopener\" target=\"_blank\">you should also keep your plugins, themes and scripts up-to-date<\/a> at all times as well.<\/li>\n<li>Review the code of any plugin, theme or script you&#8217;re using to make sure it&#8217;s coded well. Pay attention to its reviews and look for any lingering security issues that have not been resolved.<\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/staying-connected-wordpress-community\/\" target=\"_blank\">Keep up to date with WordPress newsletters<\/a> such as <a href=\"https:\/\/wpmu-dev.pro\/blog\/get-the-whip\/\" target=\"_blank\">the WhiP<\/a> to ensure you&#8217;re up-to-date on the latest WordPress and related security issues.<\/li>\n<li>Don&#8217;t use plugins, themes or scripts with known security issues. Remove them immediately and notify the developer.<\/li>\n<li>Test plugins, themes and scripts in a local staging environment before installing and activating them on a live site.<\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/cloudflare-review\/\" target=\"_blank\">Use a content delivery network (CDN)<\/a> to help prevent DoS and DDoS attacks.<\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/ssl-https-wordpress\/\" target=\"_blank\">Install and force the use of an SSL certificate<\/a> for your Multisite network or for your single install of WordPress.<\/li>\n<\/ol>\n<p>For more details on installing an SSL certificate, check out:<\/p>\n<ul>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/adding-free-ssl-https-wordpress\/\" target=\"_blank\">How to Set Up Free SSL with Let\u2019s Encrypt and Certbot<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/ssl-domain-mapping\/\" target=\"_blank\">How to Use One SSL Certificate for a Multisite Network<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/free-ssl-https-cpanel\/\" target=\"_blank\">Install Fast and Free SSL and HTTPS in cPanel with Let\u2019s Encrypt<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/ssl-certificate-authorities-reviewed\/\" target=\"_blank\">The Top 5 Most Popular SSL Certificate Authorities Reviewed<\/a><\/li>\n<\/ul>\n<p>Remember this is just the beginning so be sure to work your way through this article and apply as many of these security steps as you can for a more reliable security strategy.<\/p>\n<p>You can also use the <a href=\"https:\/\/winginx.com\/en\/htaccess\" rel=\"noopener\" target=\"_blank\"><em>.htaccess<\/em> to NGINX Converter<\/a> to take the examples below and automatically generate code you can use for NGINX servers.<\/p>\n<h2 id=\"security-obscurity\">Security Through Obscurity<\/h2>\n<p>If you were to ask, many WordPress developers would chant, &#8220;Security through obscurity is no security&#8221; or some form of that. They&#8217;re not wrong, but it also wouldn&#8217;t hurt to use it and it some cases, it <em>may<\/em> help.<\/p>\n<p>Security through obscurity means hiding an aspect of a software or web application in an attempt to secure it with the hopes that if a hacker can&#8217;t find what you&#8217;re hiding, it remains safe.<\/p>\n<p>In the case of WordPress, this means hiding parts of your site such as the login page, for example, hoping that a hacker couldn&#8217;t find it.<\/p>\n<p>This isn&#8217;t a reliable security tactic because most hackers are experienced enough that they could easily find a way around the obscurity tactic to infiltrate your site.<\/p>\n<p>Most sites are not manually hacked by brute force attacks but infiltrated automatically and systematically by bots.<\/p>\n<p>Since bots are set up to attack a site with a typical setup and move on if the hack isn&#8217;t immediately successful, there&#8217;s a chance (albeit a small one) that security through obscurity can work a small percentage of the time. This is especially true if the hacker is inexperienced.<\/p>\n<p>These kinds of tactics are also a part of the <a href=\"https:\/\/codex.wordpress.org\/Hardening_WordPress\" rel=\"noopener\" target=\"_blank\">recommended security hardening steps in the WordPress Codex<\/a>.<\/p>\n<p>That being said, it&#8217;s true that you shouldn&#8217;t rely solely on security through obscurity to protect your WordPress site because it isn&#8217;t going to work at least most of the time. It&#8217;s far, <em>far<\/em> away from being a solid security strategy.<\/p>\n<p>It can still help in a small number of cases as previously mentioned so you can still use this method, but if you do, you <em>must also<\/em> use a well-rounded set of security strategies that span far outside of obscurity tactics.<\/p>\n<p>For details, check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/wordpress-database-prefix\/\" target=\"_blank\">Changing Your WordPress Database Prefix to Improve Security<\/a>.<\/p>\n<p>With all that in mind, here are the most common security through obscurity tactics that you can choose to either bypass or use as a part of your overall security strategy.<\/p>\n<h3>Obscurity Through the <em>wp-config.php<\/em> File<\/h3>\n<p>There are a few common edits you can make to your <em>wp-config.php<\/em> file that are considered to be security through obscruity tactics and you can find them below.<\/p>\n<p>For more details on the <em>wp-config.php<\/em> file and editing it, check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/wordpress-wp-config-file-guide\/\" target=\"_blank\">The WordPress wp-config File: A Comprehensive Guide<\/a> and <a href=\"https:\/\/wpmu-dev.pro\/blog\/tweaking-wp-config\/\" target=\"_blank\">How to Tweak wp-config.php to Protect Your WordPress Site<\/a>.<\/p>\n<p>The changes below can also be made without tweaking code if you use <a href=\"https:\/\/wpmu-dev.pro\/project\/wp-defender\/\" target=\"_blank\">Defender<\/a>.<\/p>\n<h4>Disabling the Plugin and Theme Editor<\/h4>\n<p>In the admin dashboard, there&#8217;s an editor where you can adjust and save the code of the files for the plugins and themes you have installed.<\/p>\n<p>You can access the theme editor by going to <strong>Appearance &gt; Editor<\/strong>. Similarly, the plugin editor can be found under <strong>Plugins &gt; Editor<\/strong>.<\/p>\n<div class=\"wpdui-pic-full \" style=\"background-image: url(https:\/\/wpmu-dev.pro\/blog\/wp-content\/uploads\/2017\/07\/plugin-editor.png); background-size: cover; background-position: center center; min-height: 270px;\">\n<figure class=\"wp-caption alignnone\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-1500x1500 size-1500x1500\" src=\"https:\/\/wpmu-dev.pro\/blog\/wp-content\/uploads\/2017\/07\/plugin-editor.png\" alt=\"Plugin editor\" width=\"1500\" height=\"400\" \/><figcaption class=\"wp-caption-text\">By default, you can edit plugin and theme files in the admin dashboard.<\/figcaption><\/figure>\n<\/div>\n<p>It&#8217;s considered a security risk by many developers because a hacker who has access to your admin dashboard could edit theme and plugin files directly without needing to hack their way further into your site&#8217;s directories.<\/p>\n<p>Other developers would argue that if a hacker already has access to your admin dashboard, it&#8217;s already game over.<\/p>\n<p>At the same time, why make it easier for hackers to completely compromise your site when there would otherwise be a chance that you could stop it in its tracks before it gets worse? You may as well make it a bit more difficult for hackers to buy you some time to remedy the situation in the meantime.<\/p>\n<p>You can add this code to your <em>wp-config.php<\/em> file to disable the theme and plugin editors:<\/p>\n<div class=\"gist\" data-gist=\"4881dbf20ab8a87e004da0d040458eb1\" data-gist-file=\"wp-config.php\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/4881dbf20ab8a87e004da0d040458eb1.js?file=wp-config.php\">Loading gist 4881dbf20ab8a87e004da0d040458eb1<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h4>Relocate the <em>wp-config.php<\/em> File<\/h4>\n<p>Your site&#8217;s <em>wp-config.php<\/em> file includes a lot of important and sensitive information that needs to be kept private. Moving it away from its default location can make it more difficult for hackers to anticipate where it&#8217;s going to be when they try to weasel their way into that file.<\/p>\n<p>If your WordPress site is located in the root instead of a sub-directory, you can safely move your <em>wp-config.php<\/em> file one directory up as long as there isn&#8217;t already a file there with the same name.<\/p>\n<p>You can also move your <em>wp-config.php<\/em> anywhere you want as long as you create a new file with the same name and with the code below in its original location:<\/p>\n<div class=\"gist\" data-gist=\"77b709ce36d52f24831d8b700998d3bc\" data-gist-file=\"wp-config.php\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/77b709ce36d52f24831d8b700998d3bc.js?file=wp-config.php\">Loading gist 77b709ce36d52f24831d8b700998d3bc<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Don&#8217;t forget to change <code>\/path\/to\/wp-config.php<\/code> to the actual path of your <em>wp-config.php<\/em> file, where ever you moved it.<\/p>\n<h4>Change the Database Prefix<\/h4>\n<p>By default, tables in your WordPress database have a <code>wp_<\/code> prefix. I know, original, right? You can leave it as is, but it&#8217;s one less item hackers need to guess in order to hack into your site so changing this to something random and complex can be helpful.<\/p>\n<p>For details on how to make this change in your <em>wp-config.php<\/em> file and in your database, check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/wordpress-database-prefix\/\" target=\"_blank\">Changing Your WordPress Database Prefix to Improve Security<\/a>.<\/p>\n<h3>Add Rules to your <em>.htaccess<\/em> File<\/h3>\n<p>There are also some obscurity tactics you can set up by adding rules to your <em>.htaccess<\/em> file and you can find them below.<\/p>\n<p>For details on the <em>.htacess<\/em> and editing it, check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/htaccess\/\" target=\"_blank\">A Comprehensive Guide to Editing .htaccess for WordPress Security<\/a>.<\/p>\n<p>You can also make these changes in a couple clicks using <a href=\"https:\/\/wpmu-dev.pro\/project\/wp-defender\/\" target=\"_blank\">Defender<\/a>.<\/p>\n<h4>Protecting Important Files<\/h4>\n<p>You can deny access to critical files including <em>.htaccess<\/em>, <em>wp-config.php<\/em>, <em>php.ini<\/em> and your error logs by adding the rules below from the <a href=\"https:\/\/codex.wordpress.org\/htaccess\" rel=\"noopener\" target=\"_blank\">WordPress Codex<\/a>:<\/p>\n<div class=\"gist\" data-gist=\"c3f82955c965e81a80734f8660c1f631\" data-gist-file=\".htaccess\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/c3f82955c965e81a80734f8660c1f631.js?file=.htaccess\">Loading gist c3f82955c965e81a80734f8660c1f631<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>If you have a <em>php5.ini<em> or <em>php7.ini<\/em> file instead of <em>php.ini<\/em>, you can replace <code>php.ini<\/code> on line one with the actual name of the file.<\/em><\/em><\/p>\n<h4>Restricting Access to PHP Files<\/h4>\n<p>In addition to the above, you should also limit access to your PHP files, since hackers could inject malware into them.<\/p>\n<p>You can restrict access to WordPress PHP files by adding the <a href=\"https:\/\/www.acunetix.com\/websitesecurity\/wordpress-security-top-tips-secure-wordpress-application\/\" rel=\"noopener\" target=\"_blank\">following rules from Acunetix<\/a> to your <em>.htaccess<\/em> file:<\/p>\n<div class=\"gist\" data-gist=\"7aaa73bbb9692ea0b7775c8dfda6ba34\" data-gist-file=\".htaccess\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/7aaa73bbb9692ea0b7775c8dfda6ba34.js?file=.htaccess\">Loading gist 7aaa73bbb9692ea0b7775c8dfda6ba34<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h4>Securing the <em>\/wp-includes\/<\/em> Directory<\/h4>\n<p>The <em>\/wp-includes\/<\/em> also have many critical files that could be exploited if you don&#8217;t otherwise protect them.<\/p>\n<p>The rules below <a href=\"http:\/\/www.wpexplorer.com\/htaccess-wordpress-security\/\" rel=\"noopener\" target=\"_blank\">from WP Explorer<\/a> should do the trick and restrict access to this directory:<\/p>\n<div class=\"gist\" data-gist=\"a266f5c34144a79cf50c480fbe7985bf\" data-gist-file=\".htaccess\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/a266f5c34144a79cf50c480fbe7985bf.js?file=.htaccess\">Loading gist a266f5c34144a79cf50c480fbe7985bf<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h4>Restricting Access to the Admin Dashboard<\/h4>\n<p>When a hacker accesses the WordPress login page and tries to guess the username and password for the administrator account, it&#8217;s called a brute force attack. Limiting the users that are allowed to see the log in page and access the admin dashboard can reduce some of those attacks.<\/p>\n<p>While it&#8217;s possible for them to access the login form via bots and without actually needing to visit the page, you should still see a significant reduction in brute force attacks in most cases by restricting access to these admin pages.<\/p>\n<p>You can restrict access to your admin dashboard to a few static IP addresses by adding the following to to your <em>.htaccess<\/em> file:<\/p>\n<div class=\"gist\" data-gist=\"654b2b2d5ad9218d8d3f1f09f30b7850\" data-gist-file=\".htaccess\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/654b2b2d5ad9218d8d3f1f09f30b7850.js?file=.htaccess\">Loading gist 654b2b2d5ad9218d8d3f1f09f30b7850<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Lines one and two redirect users to a 404 error page if they try to visit the admin dashboard from a different IP address than what&#8217;s defined in this rule. It helps resolve possible redirect loops so your site doesn&#8217;t appear to be down. Just be sure to replace <code>\/path-to-your-site\/<\/code> with the actual path of your WordPress site.<\/p>\n<p>Also be sure to replace <code>IP Address One<\/code>, <code>IP Address Two<\/code> and <code>IP Address Three<\/code> with three real IP addresses that you want to authorize so users from those locations can access the admin area.<\/p>\n<p>Keep in mind that if you plan to travel, you should update or remove this rule before you go, otherwise you would get locked out of your site.<\/p>\n<p>If you only want to include one IP address, you can remove lines nine and 10. Alternatively, you can add line 10 as many times as you want. Don&#8217;t forget to replace <code>IP Address Three<\/code> for each line you add.<\/p>\n<p>If you have a dynamic IP address, or you have users that need to login, you can add this rule instead:<\/p>\n<div class=\"gist\" data-gist=\"d2705e4aa2d20950e4eae890a964e1cc\" data-gist-file=\".htaccess\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/d2705e4aa2d20950e4eae890a964e1cc.js?file=.htaccess\">Loading gist d2705e4aa2d20950e4eae890a964e1cc<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Similar to the previous rule, be sure to replace <code>\/path-to-your-site\/<\/code> with the correct path to your site. Also, replace <code>your-site.com<\/code> with your actual domain.<\/p>\n<h4>Preventing Directory Browsing<\/h4>\n<p>By default, it&#8217;s possible for a user (read: hacker) to access important folders in your site by including the full path to those directories in the address bar of their browser.<\/p>\n<p>For example, they could see all the content in your uploads folder if they entered <em>your-site.com\/wp-content\/uploads\/<\/em>.<\/p>\n<p>While it wouldn&#8217;t be possible for them to edit any of those files if you have <a href=\"https:\/\/wpmu-dev.pro\/blog\/understanding-file-permissions\/\" target=\"_blank\">properly set your file permissions<\/a>, knowing where your files are located makes it that much easier for them to attack since they already know where everything is located.<\/p>\n<p>Fortunately, you can add this rule to your <em>.htaccess<\/em> file to prevent directory browsing:<\/p>\n<div class=\"gist\" data-gist=\"3075be627f42518e6e60cb77602f7e0a\" data-gist-file=\".htaccess\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/3075be627f42518e6e60cb77602f7e0a.js?file=.htaccess\">Loading gist 3075be627f42518e6e60cb77602f7e0a<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h4>Prevent Username Enumeration<\/h4>\n<p>Username Enumeration occurs when a hacker is able to tag on a string at the end of a WordPress site&#8217;s URL that requests a user ID. If that user also has an author user role and has published content on the site, the URL would return that author&#8217;s page along with the account&#8217;s username.<\/p>\n<p>At this point, the hacker would know a valid username and half their work is done. They would only need to guess the password for this account in order to access it.<\/p>\n<p>Preventing username enumeration can make it that much more difficult for hackers to successfully hack your site.<\/p>\n<p>Include the below from <a href=\"https:\/\/www.acunetix.com\/websitesecurity\/wordpress-security-top-tips-secure-wordpress-application\/\" rel=\"noopener\" target=\"_blank\">Acunetix<\/a> in your <em>.htaccess<\/em> file to prevent username enumeration:<\/p>\n<div class=\"gist\" data-gist=\"827e4a1b9b1b35d8c4dc316b38bb6ad8\" data-gist-file=\".htaccess\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/827e4a1b9b1b35d8c4dc316b38bb6ad8.js?file=.htaccess\">Loading gist 827e4a1b9b1b35d8c4dc316b38bb6ad8<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h3>Delete Unneeded Files<\/h3>\n<p>There are a few files that aren&#8217;t needed any longer once WordPress has been successfully installed. Deleting them prevents sensitive information from accidentally being added to them, which could give hackers a potential entry point into your site.<br \/>\nYou can safely delete these files:<\/p>\n<ul>\n<li><em>readme.html<\/em><\/li>\n<li><em>\/wp-admin\/install.php<\/em><\/li>\n<li><em>wp-config-sample.php<\/em><\/li>\n<\/ul>\n<p>The readme file includes the version of WordPress you&#8217;re using. This information is useful for hackers since they would be able to access public records of existing vulnerabilities in that version so they can know how to best infiltrate your site.<\/p>\n<h3>Changing Your File and Directory Structure<\/h3>\n<p>Speaking of the WordPress records that are publicly available as an opensource platform, there&#8217;s a lot more a hacker could easily look up and use to compromise your site.<\/p>\n<p>For example, they can look up the default WordPress file and directory structure to pinpoint exactly where they want to strike your site.<\/p>\n<p>You can change up your site&#8217;s structure and relocate your files and directories in whatever way you want. For details, check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/change-wordpress-file-directory-structure\/\" target=\"_blank\">How to Change Your WordPress File and Directory Structure<\/a>.<\/p>\n<h3>Change Your Default Username<\/h3>\n<p>When you install WordPress, the default username that&#8217;s included during the setup process is &#8220;admin.&#8221; While you could leave the name as is, it&#8217;s one less thing that a hacker needs to know to infiltrate your site through brute force.<\/p>\n<p>If you try logging into WordPress, but you enter the wrong password for a correct username, a message is returned and lets you know this fact. This means a hacker can tell if they have correctly guessed a username.<\/p>\n<p>Since &#8220;admin&#8221; is commonly used as a username, it&#8217;s an obvious place for a hacker to start when they&#8217;re attacking your site by brute force. If you still use that account name, the hacker would be able to tell based on the WordPress message they see and they can keep trying to guess your password until they get it right.<\/p>\n<p>Changing your username from the default option makes it more difficult for hackers to successfully attack your site via brute force. For details on making this change, check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/change-admin-username\/\" target=\"_blank\">How to Change Your WordPress Admin Username<\/a>.<\/p>\n<h3>Hide the WordPress Login Page<\/h3>\n<p>While we&#8217;re on the subject of the WordPress login page and brute force attacks, you could hide your login page altogether. That way, hackers would have a heck of a time even attempting a brute force attack.<\/p>\n<p>While it&#8217;s possible to circumvent the need to visit the login page to attempt brute force attacks through the use of a hackbot, it can still significantly reduce the amount of brute force attacks your site experiences.<\/p>\n<p>To hide your login page, check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/limit-access-login-page\/\" target=\"_blank\">Limit Access to the WordPress Login Page to Specific IP Addresses<\/a>, <a href=\"https:\/\/wpmu-dev.pro\/blog\/hide-wordpress-login-page-2\/\" target=\"_blank\">Hiding Your WordPress Login Page from Hackers with Code<\/a> and <a href=\"https:\/\/wpmu-dev.pro\/blog\/hide-wordpress-login-page\/\" target=\"_blank\">How to Hide Your WordPress Login Page From Hackers and Brute Force<\/a>.<\/p>\n<h3>Remove the WordPress Version Number<\/h3>\n<p>As previously mentioned above, it&#8217;s helpful to your site&#8217;s security to prevent hackers from being able to discover what version of WordPress you&#8217;re using.<\/p>\n<p>Besides deleting the <em>readme.html<\/em> file as suggested above, you can also remove any mention of the WordPress version throughout your entire site. For details, check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/how-to-hide-your-wordpress-version-number\/\" target=\"_blank\">How to Hide Your WordPress Version Number<\/a>.<\/p>\n<h2 id=\"security-best-practice\">WordPress Security Best Practices<\/h2>\n<p>Securing WordPress is all about patching up as many vulnerabilities as possible since that&#8217;s a hacker&#8217;s ticket into your site. They&#8217;re looking for the quickest entry way to hack a site rather than a long winded battle. WordPress sites with security holes are targeted for that reason. That means you can effectively block 99.99% of attacks on your website by addressing these security issues.<\/p>\n<p>Here are WordPress security techniques and best practices to help secure your WordPress site.<\/p>\n<h3>Use a Security Plugin<\/h3>\n<p>Many or most of the security techniques mentioned here can be applied quickly with a security plugin. Installing one and keeping it active is a simple and excellent way to ensure your site is protected and without having to remember to apply all the security tactics yourself.<\/p>\n<p>WordPress itself is secure as long as you keep it updated, but new vulnerabilities surface as hackers find them. A security plugin helps protect you while the WordPress security team works on a fix to release in the next core update.<\/p>\n<p>You can find a list of reliable and solid security plugins later on, but remember to install one if you don&#8217;t have one on your site already.<\/p>\n<h3>Run Regular Scans<\/h3>\n<p>Once you have installed and activated a security plugin, it&#8217;s important to set up regular scans. Most of them have this option and it&#8217;s crucial to enable it.<\/p>\n<p>Without regular security scans, a vulnerability could go undetected and it could potentially lead to your site being compromised without you even knowing about it.<\/p>\n<h3>Review Your Access Logs Often<\/h3>\n<p>When you set up your site with your host, logs were also initiated at the same time. Somewhere in your account, you should have error and access logs being stored.<\/p>\n<p>The exact location of them is dependent on your hosting provider. You should check with them if you&#8217;re not sure where to find them.<\/p>\n<p>Your access logs are a record of each time someone accessed your site and more importantly when critical files were accessed or there was an attempt to visit them. If you monitor these logs regularly, you can keep an eye on any unusual activity.<\/p>\n<p>For example, when there were attempts to access files that regular visitors would try to view such as the <em>.htaccess<\/em> or <em>wp-config.php<\/em> files. You would also be able to see when these files were successfully accessed, which would indicate that your site was hacked.<\/p>\n<p>If you can stay on top of these logs and look over them regularly, you can be in the know if there are threats that need to be squashed right away.<\/p>\n<p>Reviewing your access logs manually is incredibly time consuming and tedious so it&#8217;s a lot more efficient to install a security plugin such as <a href=\"https:\/\/wpmu-dev.pro\/project\/wp-defender\/\" target=\"_blank\">Defender<\/a> that consolidates these logs for you and notifies you if there was a breach in security or close to it.<\/p>\n<h3>Use the Correct File Permissions<\/h3>\n<p>Many WordPress core files as well as plugin, theme, script and custom or uploaded files contain critical and sensitive details. It&#8217;s important to ensure only authorized parties are able to access them. Setting the correct file permissions ensures that this happens.<\/p>\n<p>You can check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/understanding-file-permissions\/\" target=\"_blank\">Understanding File Permissions and Using Them to Secure Your Site<\/a> for details.<\/p>\n<h3>Disable XML-RPC<\/h3>\n<p>XML-RPC is an API that WordPress uses for its trackback and pingback features as well for the <a href=\"https:\/\/wordpress.org\/plugins\/jetpack\/\" rel=\"noopener\" target=\"_blank\">Jetpack plugin<\/a>. While this API is useful if you use any of these, it can also be exploited by hackers as a means for brute force attacks.<\/p>\n<p>Even if you have a strong password, brute force attacks use up a lot of your server&#8217;s resources. If your hosting plan isn&#8217;t sufficient, your site could go down after all your server&#8217;s resources are used up.<\/p>\n<p>To prevent hackers from exploiting this API, you can disable XML-RPC on your site.<\/p>\n<p>For details, check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/xml-rpc-wordpress\/\" target=\"_blank\">XML-RPC and Why It\u2019s Time to Remove it for WordPress Security<\/a>.<\/p>\n<h3>Prevent Spam<\/h3>\n<p>Spam in WordPress is a lot more than just annoying. It can lead to brute force and DDoS attacks as well as XSS vulnerabilities. Preventing spam from ever crossing your site is an important part of keeping WordPress secure.<\/p>\n<p>There are many ways you can protect yourself from spam including the use of plugins. For details, check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/ultimate-guide-wordpress-spam\/\" target=\"_blank\">The Ultimate Guide to WordPress Spam<\/a> and <a href=\"https:\/\/wpmu-dev.pro\/blog\/wordpress-spam-plugins\/\" target=\"_blank\">25 Top-Rated Plugins for Winning the Fight Against WordPress Spam<\/a>.<\/p>\n<h3>Use Two-Factor Authentication<\/h3>\n<p>Requiring logging in to be approved by a second step such as accepting the request through a notification on your smartphone, for example, is called two-factor authentication. Using a plugin to enable this feature helps further protect you from brute force attacks in case a hacker is able to guess your password.<\/p>\n<p>You can check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/two-factor-authentication-plugins\/\" target=\"_blank\">Clef\u2019s Dead, Now What? 4 Free Two-Factor Authentication Alternatives<\/a> and <a href=\"https:\/\/wpmu-dev.pro\/blog\/strong-passwords-bcrypt\/\" target=\"_blank\">Making Your WordPress Password Hashing Stronger with bcrypt<\/a>.<\/p>\n<h3>Additional Edits to the <em>wp-config.php<\/em> File<\/h3>\n<p>Including the security techniques mentioned earlier, there are also other additions you can make to your <em>wp-config.php<\/em> file. For details on any of these edits, check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/tweaking-wp-config\/\" target=\"_blank\">How to Tweak wp-config.php to Protect Your WordPress Site<\/a>.<\/p>\n<h4>Change Your Security Keys<\/h4>\n<p>The <em>wp-config.php<\/em> file includes security keys that help encrypt information stored in cookies. Changing them every now and again effectively logs out all users, including hackers in many cases where they hijack a browser connection, for example.<\/p>\n<p>You can change your security keys by going to the <a href=\"https:\/\/api.wordpress.org\/secret-key\/1.1\/salt\/\" rel=\"noopener\" target=\"_blank\">WordPress Security Key Generator<\/a> and copy and pasting what&#8217;s on that page, then replacing the existing keys in your <em>wp-config.php<\/em> file.<\/p>\n<p>The existing security keys should look similar to the example below:<\/p>\n<div class=\"gist\" data-gist=\"14537cf352469510c89db16e5946688c\" data-gist-file=\"wp-config.php\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/14537cf352469510c89db16e5946688c.js?file=wp-config.php\">Loading gist 14537cf352469510c89db16e5946688c<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>You can also replace your security keys in a couple clicks using <a href=\"https:\/\/wpmu-dev.pro\/project\/wp-defender\/\" target=\"_blank\">Defender<\/a>.<\/p>\n<h4>Force SSL<\/h4>\n<p>Once you have an SSL certificate installed for your domain, you should force its use so anyone who visits your site immediately accesses it with the SSL certificate since it ensures a secure connection.<\/p>\n<p>Add the following to your <em>wp-config.php<\/em> file before the &#8220;happy blogging&#8221; line:<\/p>\n<div class=\"gist\" data-gist=\"1976c65f86976b251f1b63bb198684fd\" data-gist-file=\"wp-config.php\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/1976c65f86976b251f1b63bb198684fd.js?file=wp-config.php\">Loading gist 1976c65f86976b251f1b63bb198684fd<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>There&#8217;s one final step. You also need to add the line below to your <em>.htacess<\/em> file:<\/p>\n<div class=\"gist\" data-gist=\"66406f92c629c531f5c522c6855df212\" data-gist-file=\".htaccess\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/66406f92c629c531f5c522c6855df212.js?file=.htaccess\">Loading gist 66406f92c629c531f5c522c6855df212<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Be sure to replace <code>www.mysite.com<\/code> with your real domain.<\/p>\n<p>For details, check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/ssl-https-wordpress\/\" target=\"_blank\">How to Use SSL and HTTPS with WordPress<\/a>.<\/p>\n<h4>Force the Use of FTPS<\/h4>\n<p>Additionally, you can force users to use FTPS over the insecure FTP automatically by adding the line below above the &#8220;happy blogging&#8221; part:<\/p>\n<div class=\"gist\" data-gist=\"e738ef47854c1c173f93ae8774b27309\" data-gist-file=\"wp-config.php\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/e738ef47854c1c173f93ae8774b27309.js?file=wp-config.php\">Loading gist e738ef47854c1c173f93ae8774b27309<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h4>Enforcing SFTP<\/h4>\n<p>Similarly, you can force the use of SFTP if your host has it enabled to ensure your connection is secure when you use SSH and the command line.<\/p>\n<p>To enforce the use of SFTP, add the following above \u2013 you guessed it! \u2013 the &#8220;happy blogging&#8221; line:<\/p>\n<div class=\"gist\" data-gist=\"53c2a0c1f342d81b5c1abbcd91cc784a\" data-gist-file=\"wp-config.php\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/53c2a0c1f342d81b5c1abbcd91cc784a.js?file=wp-config.php\">Loading gist 53c2a0c1f342d81b5c1abbcd91cc784a<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h4>Turn off <em>WP_DEBUG<\/em><\/h4>\n<p>Unless you&#8217;re encountering errors on your site, you should disable front-end error reporting. You can do this by turning of <code>WP_DEBUG by editing the following line in your <em>wp-config.php<\/em> file:<\/code><\/p>\n<div class=\"gist\" data-gist=\"03f153f98b2cc09a8b645bab5a2cbced\" data-gist-file=\"wp-config.php\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/03f153f98b2cc09a8b645bab5a2cbced.js?file=wp-config.php\">Loading gist 03f153f98b2cc09a8b645bab5a2cbced<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Change <code>true<\/code> to <code>false<\/code>, then save the file and you&#8217;re all set.<\/p>\n<p>Alternatively, you can leave <code>WP_DEBUG<\/code> on, but enable private logging of errors by leaving the line above as-is, then following it with this:<\/p>\n<div class=\"gist\" data-gist=\"f82987768a652c23d2445652dcd9f8d5\" data-gist-file=\"wp-config.php\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/f82987768a652c23d2445652dcd9f8d5.js?file=wp-config.php\">Loading gist f82987768a652c23d2445652dcd9f8d5<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>You can also check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/debugging-wordpress-how-to-use-wp_debug\/\" target=\"_blank\">Debugging WordPress: How to Use WP_DEBUG<\/a> for details.<\/p>\n<h4>Auto-Update the WordPress Core<\/h4>\n<p>This tactic isn&#8217;t for anyone who wants to thoroughly test updates before applying them, but if you don&#8217;t mind updates being automatically applied, you can do that by editing this similar line in the <em>wp-config.php<\/em> file to appear like this:<\/p>\n<div class=\"gist\" data-gist=\"ffd8cab3dc920672dd35ae5cb6af49e5\" data-gist-file=\"wp-config.php\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/ffd8cab3dc920672dd35ae5cb6af49e5.js?file=wp-config.php\">Loading gist ffd8cab3dc920672dd35ae5cb6af49e5<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>If you&#8217;re feeling ambitious, you can also <a href=\"https:\/\/wpmu-dev.pro\/blog\/tweaking-wp-config\/\" target=\"_blank\">enable automatic updates to essential plugins and themes<\/a> as well.<\/p>\n<h3>Further Editing the <em>.htaccess<\/em> File<\/h3>\n<p>There are also additional and recommended edits you can make to your <em>.htaccess<\/em> file to improve your WordPress site&#8217;s security. For details on any of these changes, check out <a href=\"https:\/\/wpmu-dev.pro\/blog\/htaccess\/\" target=\"_blank\">A Comprehensive Guide to Editing .htaccess for WordPress Security<\/a>.<\/p>\n<h4>Restrict PHP File Execution<\/h4>\n<p>In the event that your site is hacked, you can still <a href=\"https:\/\/www.acunetix.com\/websitesecurity\/wordpress-security-top-tips-secure-wordpress-application\/\" rel=\"noopener\" target=\"_blank\">prevent hackers from being able to execute the malware<\/a> they upload to your site by adding the rule below to your <em>.htaccess<\/em> file:<\/p>\n<div class=\"gist\" data-gist=\"a026e47d924bd9eb3df0aec2ca62b2fb\" data-gist-file=\".htaccess\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/a026e47d924bd9eb3df0aec2ca62b2fb.js?file=.htaccess\">Loading gist a026e47d924bd9eb3df0aec2ca62b2fb<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>It restricts PHP files from being executed from the uploads folder since that&#8217;s an incredibly common place for hackers to upload malware.<\/p>\n<h4>Protecting Your Site Against Script Injections<\/h4>\n<p>You&#8217;re on a serious roll now so you may as well prevent hackers from being able to inject malware into your PHP files by adding the following to your <em>.htaccess<\/em> file:<\/p>\n<div class=\"gist\" data-gist=\"f35ef4985420f92562b4fad625f00541\" data-gist-file=\".htaccess\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/f35ef4985420f92562b4fad625f00541.js?file=.htaccess\">Loading gist f35ef4985420f92562b4fad625f00541<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h3>Limit Login Attempts<\/h3>\n<p>By default, WordPress doesn&#8217;t limit the number of times you can attempt to log in or retrieve your password. This gives hackers near infinite leeway to continue with their brute force attacks until they&#8217;re successful.<\/p>\n<p>Instead of letting that happen, you can install a security plugin that lets you limit the number of login attempts. You can peruse the list that can be found further down to find a suitable plugin.<\/p>\n<p>For example, you can limit the number of login attempts that are allowed without touching any code by using <a href=\"https:\/\/wpmu-dev.pro\/project\/wp-defender\/\" target=\"_blank\">Defender<\/a>. It can be set up in a couple clicks as well.<\/p>\n<h3>Install a Server Firewall<\/h3>\n<p>Installing a firewall on your server is an excellent way to prevent hackers from being able to access your site and server right from the get go. This isn&#8217;t to be confused with a web application firewall (WAF) such as the one found in the Wordfence plugin.<\/p>\n<p>In the case of WordPress, a WAF is positioned inside your site instead of outside where it&#8217;s actually useful. The reasoning behind this is similar to the obscurity tactics mentioned earlier. If a hacker has already infiltrated your site, they&#8217;re in and a firewall inside your site isn&#8217;t going to stop them.<\/p>\n<p>The only way a hacker can be sufficiently stopped in their tracks is if you install a firewall on your server. Keep in mind that your host may already have a server-level firewall already installed for you. If you&#8217;re not sure, it&#8217;s best to contact them and ask.<\/p>\n<p>Still, a WAF or a server-level firewall as well is better than using no firewall at all.<\/p>\n<h2 id=\"troubleshoot-hacked-site\">Troubleshooting a Hacked Site<\/h2>\n<p>If your WordPress site has already been hacked, not to worry! I have you covered.<\/p>\n<p>There are many ways you can clean up and secure your site and you can check out these posts for details:<\/p>\n<ul>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/troubleshoot-hacked-wordpress-site\/\" target=\"_blank\">Help, I\u2019ve Been Hacked! How to Troubleshoot and Fix a WordPress Site<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/cleaning-up-after-wordpress-hack\/\" target=\"_blank\">How I Cleaned Up My Site After It Was Hacked and Blacklisted<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/removing-backdoor-exploits\/\" target=\"_blank\">Getting Constantly Hacked? How to Stop WordPress Backdoor Exploits for Good<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/security-scanning\/\" target=\"_blank\">How to Run a Security Scan on Your WordPress Site<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/get-off-googles-blacklist\/\" target=\"_blank\">Hacked? How to Clean Your Site and Get Off Google\u2019s Blacklist<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/restore-wordpress-backup-snapshot\/\" target=\"_blank\">How to Restore WordPress When It\u2019s Down or Locked with Snapshot Pro<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/getting-back-into-wordpress-admin-after-hack\/\" target=\"_blank\">Hacked? How to Get Back Into the WordPress Admin<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/delete-reset-wordpress\/\" target=\"_blank\">How to Manually Delete or Reset WordPress and Multisite<\/a><\/li>\n<\/ul>\n<p>Remember that prevention is better than the cure so it&#8217;s best to apply the security techniques mentioned above so you don&#8217;t have to go through getting hacked again or at all.<\/p>\n<h2 id=\"security-plugins\">WordPress Security with Plugins<\/h2>\n<p>For continued protection and security of your WordPress site&#8217;s it best to use a plugin. Below are the top security plugins that are reliable, updated often and are top-quality.<\/p>\n<p>You don&#8217;t need to install all of them. You can install one or install two with complementing features. Just be sure not to enable the same features in both plugins to prevent compatibility issues.<\/p>\n<ul class=\"dev-tutorial-list\"><li class=\"dev-tutorial-list__item\"><header class=\"dev-tutorial-list__item__header\"><h3 class=\"dev-tutorial-list__item__title\">Defender<\/h3><\/header><section class=\"dev-tutorial-list__item__image\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"200\" src=\"https:\/\/wpmu-dev.pro\/blog\/wp-content\/uploads\/2017\/06\/defender-plugin-free-600x200.png\" class=\"attachment-ratio-large size-ratio-large\" alt=\"Defender image\" aria-hidden=\"true\" \/><\/section><!-- end dev-tutorial-list__item__image --><section class=\"dev-tutorial-list__item__content\"><p>Defender is free\u00a0and incredibly simple to use with its intuitive interface. In a few clicks you can harden your site&#8217;s security. There&#8217;s also a premium version available if you fancy more security techniques that you can also set and forget in a couple clicks.<\/p>\n<\/section><!-- end dev-tutorial-list__item__content --><footer class=\"dev-tutorial-list__item__footer\"><p>Interested in Defender?<\/p><div class=\"dev-tutorial-list__item__cta\"><a target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/defender-security\/\" class=\"dui-btn dui-btn--sm dui-btn--brand dev-btn--Details\">Details<\/a><\/div><!-- end dev-tutorial-list__item__cta --><\/footer><!-- end dev-tutorial-list__item__footer --><\/li><!-- end dev-tutorial-list__item --><li class=\"dev-tutorial-list__item\"><header class=\"dev-tutorial-list__item__header\"><h3 class=\"dev-tutorial-list__item__title\">Sucuri Security<\/h3><\/header><section class=\"dev-tutorial-list__item__image\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"200\" src=\"https:\/\/wpmu-dev.pro\/blog\/wp-content\/uploads\/2017\/06\/sucuri-security-plugin-600x200.png\" class=\"attachment-ratio-large size-ratio-large\" alt=\"Sucuri Security image\" aria-hidden=\"true\" \/><\/section><!-- end dev-tutorial-list__item__image --><section class=\"dev-tutorial-list__item__content\"><p>Sucuri Security is a popular option for WordPress security. It has many features all rolled into one plugin as well as a premium version if you want to enable more features.<\/p>\n<\/section><!-- end dev-tutorial-list__item__content --><footer class=\"dev-tutorial-list__item__footer\"><p>Interested in Sucuri Security?<\/p><div class=\"dev-tutorial-list__item__cta\"><a target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/sucuri-scanner\/\" class=\"dui-btn dui-btn--sm dui-btn--brand dev-btn--Details\">Details<\/a><\/div><!-- end dev-tutorial-list__item__cta --><\/footer><!-- end dev-tutorial-list__item__footer --><\/li><!-- end dev-tutorial-list__item --><li class=\"dev-tutorial-list__item\"><header class=\"dev-tutorial-list__item__header\"><h3 class=\"dev-tutorial-list__item__title\">Wordfence<\/h3><\/header><section class=\"dev-tutorial-list__item__image\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"200\" src=\"https:\/\/wpmu-dev.pro\/blog\/wp-content\/uploads\/2017\/06\/wordfence-plugin-free-600x200.jpg\" class=\"attachment-ratio-large size-ratio-large\" alt=\"Wordfence image\" aria-hidden=\"true\" \/><\/section><!-- end dev-tutorial-list__item__image --><section class=\"dev-tutorial-list__item__content\"><p>This popular free plugin has over two million active installs and has many options to secure your site. Some of the most useful features become available if you upgrade. You can also check out\u00a0<a href=\"https:\/\/wpmu-dev.pro\/blog\/securing-your-wordpress-site-wordfence-security-review\/\" target=\"_blank\" rel=\"no referrer noopener\">Securing Your WordPress site: Wordfence Security Review<\/a> for details.<\/p>\n<\/section><!-- end dev-tutorial-list__item__content --><footer class=\"dev-tutorial-list__item__footer\"><p>Interested in Wordfence?<\/p><div class=\"dev-tutorial-list__item__cta\"><a target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/wordfence\/\" class=\"dui-btn dui-btn--sm dui-btn--brand dev-btn--Details\">Details<\/a><\/div><!-- end dev-tutorial-list__item__cta --><\/footer><!-- end dev-tutorial-list__item__footer --><\/li><!-- end dev-tutorial-list__item --><li class=\"dev-tutorial-list__item\"><header class=\"dev-tutorial-list__item__header\"><h3 class=\"dev-tutorial-list__item__title\">BulletProof Security<\/h3><\/header><section class=\"dev-tutorial-list__item__image\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"200\" src=\"https:\/\/wpmu-dev.pro\/blog\/wp-content\/uploads\/2017\/06\/bulletproof-security-plugin-600x200.jpg\" class=\"attachment-ratio-large size-ratio-large\" alt=\"BulletProof Security image\" aria-hidden=\"true\" \/><\/section><!-- end dev-tutorial-list__item__image --><section class=\"dev-tutorial-list__item__content\"><p>This is a security and database plugin all rolled into one, which helps <a href=\"https:\/\/wpmu-dev.pro\/blog\/speeding-up-wordpress\/\" target=\"_blank\">cut down on the number of plugins you use<\/a> to help speed up your site. There&#8217;s a premium version available which includes full-site backups and many other security features.<\/p>\n<\/section><!-- end dev-tutorial-list__item__content --><footer class=\"dev-tutorial-list__item__footer\"><p>Interested in BulletProof Security?<\/p><div class=\"dev-tutorial-list__item__cta\"><a target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/bulletproof-security\/\" class=\"dui-btn dui-btn--sm dui-btn--brand dev-btn--Details\">Details<\/a><\/div><!-- end dev-tutorial-list__item__cta --><\/footer><!-- end dev-tutorial-list__item__footer --><\/li><!-- end dev-tutorial-list__item --><li class=\"dev-tutorial-list__item\"><header class=\"dev-tutorial-list__item__header\"><h3 class=\"dev-tutorial-list__item__title\">iThemes Security<\/h3><\/header><section class=\"dev-tutorial-list__item__image\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"200\" src=\"https:\/\/wpmu-dev.pro\/blog\/wp-content\/uploads\/2017\/06\/ithemes-security-free-plugin-600x200.png\" class=\"attachment-ratio-large size-ratio-large\" alt=\"iThemes Security image\" aria-hidden=\"true\" \/><\/section><!-- end dev-tutorial-list__item__image --><section class=\"dev-tutorial-list__item__content\"><p>The iThemes Security\u00a0plugin has over 30 security features you can use and you can enable tons more if you upgrade. For a complete review, check out\u00a0<a href=\"https:\/\/wpmu-dev.pro\/blog\/ithemes-security-plugin-review\/\" target=\"_blank\" rel=\"noreferrer noopener\">Securing Your WordPress Site: iThemes Free Security Plugin Review<\/a>.<\/p>\n<\/section><!-- end dev-tutorial-list__item__content --><footer class=\"dev-tutorial-list__item__footer\"><p>Interested in iThemes Security?<\/p><div class=\"dev-tutorial-list__item__cta\"><a target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/better-wp-security\/\" class=\"dui-btn dui-btn--sm dui-btn--brand dev-btn--Details\">Details<\/a><\/div><!-- end dev-tutorial-list__item__cta --><\/footer><!-- end dev-tutorial-list__item__footer --><\/li><!-- end dev-tutorial-list__item --><li class=\"dev-tutorial-list__item\"><header class=\"dev-tutorial-list__item__header\"><h3 class=\"dev-tutorial-list__item__title\">SecuPress<\/h3><\/header><section class=\"dev-tutorial-list__item__image\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"200\" src=\"https:\/\/wpmu-dev.pro\/blog\/wp-content\/uploads\/2017\/06\/secupress-free-plugin-600x200.png\" class=\"attachment-ratio-large size-ratio-large\" alt=\"SecuPress image\" aria-hidden=\"true\" \/><\/section><!-- end dev-tutorial-list__item__image --><section class=\"dev-tutorial-list__item__content\"><p>With SecuPress, you can scan your site for malware and block bots and suspicious IP addresses. There&#8217;s also a premium version available with more features.<\/p>\n<\/section><!-- end dev-tutorial-list__item__content --><footer class=\"dev-tutorial-list__item__footer\"><p>Interested in SecuPress?<\/p><div class=\"dev-tutorial-list__item__cta\"><a target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/secupress\/\" class=\"dui-btn dui-btn--sm dui-btn--brand dev-btn--Details\">Details<\/a><\/div><!-- end dev-tutorial-list__item__cta --><\/footer><!-- end dev-tutorial-list__item__footer --><\/li><!-- end dev-tutorial-list__item --><li class=\"dev-tutorial-list__item\"><header class=\"dev-tutorial-list__item__header\"><h3 class=\"dev-tutorial-list__item__title\">SiteLock<\/h3><\/header><section class=\"dev-tutorial-list__item__image\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"200\" src=\"https:\/\/wpmu-dev.pro\/blog\/wp-content\/uploads\/2017\/06\/sitelock-plugin-600x200.png\" class=\"attachment-ratio-large size-ratio-large\" alt=\"SiteLock image\" aria-hidden=\"true\" \/><\/section><!-- end dev-tutorial-list__item__image --><section class=\"dev-tutorial-list__item__content\"><p>SiteLock has many valuable security features and can scan your site for security vulnerabilities with real-time updates. It&#8217;s also free to use.<\/p>\n<\/section><!-- end dev-tutorial-list__item__content --><footer class=\"dev-tutorial-list__item__footer\"><p>Interested in SiteLock?<\/p><div class=\"dev-tutorial-list__item__cta\"><a target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/sitelock\/\" class=\"dui-btn dui-btn--sm dui-btn--brand dev-btn--Details\">Details<\/a><\/div><!-- end dev-tutorial-list__item__cta --><\/footer><!-- end dev-tutorial-list__item__footer --><\/li><!-- end dev-tutorial-list__item --><\/ul><!-- end dev-tutorial-list -->\n<h2>Wrapping Up<\/h2>\n<p>By now, you&#8217;re all set and your WordPress site is safe and secure. While this isn&#8217;t absolutely <em>everything<\/em> you need to know about WordPress security (it would be difficult to add everything into one article!), it&#8217;s an exhaustive list of solid techniques to secure your site.<\/p>\n<p>For more details on WordPress security tactics, check out these:<\/p>\n<ul>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/defender\/\" target=\"_blank\">Give Hackers the Smack-Down with Defender<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/security-101\/\" target=\"_blank\">WordPress Security: Tried and True Tips to Secure WordPress<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/wordpress-security-tips\/\" target=\"_blank\">12 Ways to Secure Your WordPress Site You\u2019ve Overlooked<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/ultimate-wordpress-security-checklist\/\" target=\"_blank\">WordPress Security: The Ultimate 32-Step Checklist<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/must-do-steps-securing-wordpress\/\" target=\"_blank\">8 Must-Do Steps for Securing and Hardening Your WordPress Website<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/wordpress-nonces\/\" target=\"_blank\">Using Nonces to Strengthen WordPress Security<\/a><\/li>\n<li><a href=\"https:\/\/wpmu-dev.pro\/blog\/privacy-tips\/\" target=\"_blank\">Privacy Checklist: 10 Tips for Protecting Visitors to Your WordPress Site<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Hackers attack WordPress sites both big and small with tens of thousands of attacks happening per minute. Fortunately, there are many ways you can protect your WordPress site. Today, I want to share with you how you can make your WordPress site&#8217;s security air tight with basic through to advanced techniques. I&#8217;ll also explore how [&hellip;]<\/p>\n","protected":false},"author":54213,"featured_media":166432,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[557,263],"tags":[10810],"tutorials_categories":[],"class_list":["post-166017","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","category-tutorials","tag-wordpress-security"],"_links":{"self":[{"href":"https:\/\/wpmu-dev.pro\/blog\/wp-json\/wp\/v2\/posts\/166017","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmu-dev.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmu-dev.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmu-dev.pro\/blog\/wp-json\/wp\/v2\/users\/54213"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmu-dev.pro\/blog\/wp-json\/wp\/v2\/comments?post=166017"}],"version-history":[{"count":45,"href":"https:\/\/wpmu-dev.pro\/blog\/wp-json\/wp\/v2\/posts\/166017\/revisions"}],"predecessor-version":[{"id":223980,"href":"https:\/\/wpmu-dev.pro\/blog\/wp-json\/wp\/v2\/posts\/166017\/revisions\/223980"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmu-dev.pro\/blog\/wp-json\/wp\/v2\/media\/166432"}],"wp:attachment":[{"href":"https:\/\/wpmu-dev.pro\/blog\/wp-json\/wp\/v2\/media?parent=166017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmu-dev.pro\/blog\/wp-json\/wp\/v2\/categories?post=166017"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmu-dev.pro\/blog\/wp-json\/wp\/v2\/tags?post=166017"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmu-dev.pro\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=166017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}