{"id":341,"date":"2012-01-22T11:48:14","date_gmt":"2012-01-22T02:48:14","guid":{"rendered":"http:\/\/www.santoshkori.com\/blog\/?p=341"},"modified":"2012-08-23T17:29:33","modified_gmt":"2012-08-23T08:29:33","slug":"11-quick-tips-to-securing-your-wordpress-site","status":"publish","type":"post","link":"https:\/\/www.santoshkori.com\/blog\/11-quick-tips-to-securing-your-wordpress-site\/","title":{"rendered":"11 Quick Tips to Securing Your WordPress Site"},"content":{"rendered":"<p>WordPress is the most used open-source platform nowadays for any type  of websites: whether it is blog, CMS or any other custom solution.  WordPress is naturally based on PHP (among other languages), so, as a  PHP developer I always make sure to cover\/apply some tips for WordPress  to make secure and speedup the site which I develop. In this WordPress  tutorial you will find tips and tricks for securing WordPress and  otimizing your WordPress blog.<\/p>\n<p><!--more--><\/p>\n<p>This section will going to cover the tips related to securing your  WordPress site. Tips includes protecting files, login restriction,  WordPress admin restriction, database protection, etc.<\/p>\n<h2>Security Tip 1: Stay Updated<\/h2>\n<div><a href=\"https:\/\/www.santoshkori.com\/blog\/wp-content\/uploads\/2012\/01\/upgrade_wordpress.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-342 alignnone\" title=\"upgrade wordpress\" src=\"https:\/\/www.santoshkori.com\/blog\/wp-content\/uploads\/2012\/01\/upgrade_wordpress.jpg\" alt=\"upgrade wordpress\" width=\"581\" height=\"103\" srcset=\"https:\/\/www.santoshkori.com\/blog\/wp-content\/uploads\/2012\/01\/upgrade_wordpress.jpg 581w, https:\/\/www.santoshkori.com\/blog\/wp-content\/uploads\/2012\/01\/upgrade_wordpress-300x53.jpg 300w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><\/a><\/div>\n<p>The most important tip for securing the self hosted WordPress  websites is also the most obvious; WordPress provides updates with  security fixes all of the time. When you get the notification in admin  panel, don\u2019t ignore it! It\u2019s the single most effective way to secure  your site from attacks, and yet so many people leave their site (and  their client sites) un-updated for fear of breaking their themes and\/or  plugins.<\/p>\n<p><strong>Here\u2019s the real tip though:<\/strong> If you themes and plugins don\u2019t work with the latest version of WordPress, they\u2019re probably not all that secure to begin with <img decoding=\"async\" src=\"http:\/\/wp.tutsplus.com\/wp-includes\/images\/smilies\/icon_wink.gif\" alt=\";)\" title=\"\"><\/p>\n<hr \/>\n<h2>Security Tip 2: Create Custom Secret Keys for Your <em>wp-config.php<\/em> File<\/h2>\n<p>All of the confidential details for your WordPress site are stored in the <strong>wp-config.php<\/strong> in your WordPress root directory. Secret keys are one of the bits of  information stored in that file\u2026 so make sure you change the default  secret keys to something else.<\/p>\n<div><a rel=\"attachment wp-att-343\" href=\"https:\/\/www.santoshkori.com\/blog\/wordpress\/wordress-security\/11-quick-tips-to-securing-your-wordpress-site\/attachment\/wordpress_security_keys\/\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-343 alignnone\" title=\"wordpress_security_keys\" src=\"https:\/\/www.santoshkori.com\/blog\/wp-content\/uploads\/2012\/01\/wordpress_security_keys.jpg\" alt=\"wordpress ecurity keys\" width=\"447\" height=\"365\" srcset=\"https:\/\/www.santoshkori.com\/blog\/wp-content\/uploads\/2012\/01\/wordpress_security_keys.jpg 447w, https:\/\/www.santoshkori.com\/blog\/wp-content\/uploads\/2012\/01\/wordpress_security_keys-300x244.jpg 300w\" sizes=\"auto, (max-width: 447px) 100vw, 447px\" \/><\/a><\/div>\n<p>If you are not sure for what to place in the default values, go to <a href=\"https:\/\/api.wordpress.org\/secret-key\/1.1\/salt\/\" target=\"_blank\" rel=\"noopener\">this link<\/a>, and it will generate the random keys for you.<\/p>\n<hr \/>\n<h2>Security Tip 3: Change the Database Prefix<\/h2>\n<p>A lot of the basic setup stuff for WordPress is the same across lots  of sites\u2026 especially if you use a one-step install wizard through your  webhost. This is super convenient, but lots of common setup values like,  your database prefix(es), are known to hackers as a result. If you  don\u2019t change the database prefix, the table names of your site\u2019s  database are easily known to the person who trying to hack your site.<\/p>\n<div><a rel=\"attachment wp-att-344\" href=\"https:\/\/www.santoshkori.com\/blog\/wordpress\/wordress-security\/11-quick-tips-to-securing-your-wordpress-site\/attachment\/wp_database_prefix\/\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-344 alignnone\" title=\"wordpress database prefix\" src=\"https:\/\/www.santoshkori.com\/blog\/wp-content\/uploads\/2012\/01\/wp_database_prefix.jpg\" alt=\"wordpress database prefix\" width=\"467\" height=\"142\" srcset=\"https:\/\/www.santoshkori.com\/blog\/wp-content\/uploads\/2012\/01\/wp_database_prefix.jpg 467w, https:\/\/www.santoshkori.com\/blog\/wp-content\/uploads\/2012\/01\/wp_database_prefix-300x91.jpg 300w\" sizes=\"auto, (max-width: 467px) 100vw, 467px\" \/><\/a><\/div>\n<hr \/>\n<h2>Security Tip 4: Protect Your <em>wp-config.php<\/em> File<\/h2>\n<p>As mentioned earlier, the wp-config.php file contains all the  confidential details of your site. So it\u2019s pretty important that you  protect it at all costs. An easy way to protect this file is to simply  place the following code in your <strong>.htaccess<\/strong> file on your server.<\/p>\n<p><code><br \/>\norder allow,deny<br \/>\ndeny from all<br \/>\n<\/code><\/p>\n<hr \/>\n<h2>Security Tip 5: Protect Your .htaccess File<\/h2>\n<p>We can protect our wp-config.php file as mentioned above, but what about protecting the <strong>.htaccess<\/strong> file itself? Don\u2019t worry, we can use the same .htaccess file to protect  itself from being preyed upon. You just need to place below code in  your .htaccess file.<br \/>\n<code><br \/>\norder allow,deny<br \/>\ndeny from all<br \/>\n<\/code><\/p>\n<hr \/>\n<h2>Security Tip 6: Hide Your WordPress Version<\/h2>\n<p>Another good idea is to remove the generator meta for the WordPress.  This meta shows the version of your WordPress site. If you have enabled  the WordPress version, then hackers will know the security lacking of  your website. If you absolutely can not update your WordPress version  (tip #1), this is a good failsafe to at least hide the fact that you\u2019re  not on the most current version.<\/p>\n<p>To do this you need to place below code in<strong> function.php<\/strong> of your active theme.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n    &lt;Files .htaccess&gt;\r\n       order allow,deny\r\n       deny from all\r\n    &lt;\/Files&gt;\r\n<\/pre>\n<p>You can go one step further and additionally remove it from RSS feeds using this:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n    &lt;Files .htaccess&gt;\r\n       order allow,deny\r\n       deny from all\r\n    &lt;\/Files&gt;\r\n<\/pre>\n<hr \/>\n<h2>Security Tip 7: Install WordPress Security Scan Plugin<\/h2>\n<p>This is a good plugin which scans your WordPress installation and  give the suggestion accordingly. This plugin will check for below  things:<\/p>\n<ul>\n<li>Passwords<\/li>\n<li>File Permissions<\/li>\n<li>Database Security<\/li>\n<li>WordPress Admin protection<\/li>\n<\/ul>\n<p>Download the plugin from <a href=\"http:\/\/wordpress.org\/extend\/plugins\/wp-security-scan\/\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<p>There are other security scans as well \u2013 for instance, <a href=\"http:\/\/vaultpress.com\/\" target=\"_blank\" rel=\"noopener\">VaultPress <\/a>(which we\u2019ll mention below) will do this as well as part of a much bigger package of security services.<\/p>\n<hr \/>\n<h2>Security Tip 8: Limit The Number of Failed Login Attempts<\/h2>\n<p>This nice plugin can limit the number failed login attempts; Useful  in case of someone is trying to guess your password manually or using a  robot.<\/p>\n<p>You can download plugin from <a href=\"http:\/\/wordpress.org\/extend\/plugins\/login-lockdown\/\" target=\"blank\" rel=\"noopener\">here<\/a>.<\/p>\n<hr \/>\n<h2>Security Tip 9: Ask Apache Password Protect<\/h2>\n<p>Here is one more good plugin provided by the Ask Apache. which gives you more control over your blog in terms of security.<\/p>\n<p>You can protect your site with 401 authorization in easy steps. All these you can manage from the WordPress admin panel.<\/p>\n<p>You can download this plugin from <a href=\"http:\/\/wordpress.org\/extend\/plugins\/askapache-password-protect\/\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<hr \/>\n<h2>Security Tip 10: Don\u2019t Use \u201cadmin\u201d As Your Username (and Pick Strong Passwords)<\/h2>\n<p>This one\u2019s perhaps the easiest of them all \u2013 WordPress normally will  setup your main admin account name as \u201cadmin\u201d, so it\u2019s usually the first  username that hackers will try using. As of version 3.0 you can change  this during the initial setup, but it\u2019s easy to forget that you can go  back and change it even if you setup your site before version 3.0. So,  pick a new name other than admin <img decoding=\"async\" src=\"http:\/\/wp.tutsplus.com\/wp-includes\/images\/smilies\/icon_wink.gif\" alt=\";)\" title=\"\"><\/p>\n<p>Additionally, picking strong passwords for all of the users on your  blog (and your MySQL database) are fundamental ways to boost your  security. Use the<a href=\"http:\/\/strongpasswordgenerator.com\/\" target=\"_blank\" rel=\"noopener\"> Strong Password Generator<\/a> if you can\u2019t come up with one on your own.<\/p>\n<hr \/>\n<h2>Security Tip 11: Last but not Least, Backup!<\/h2>\n<p>I have placed the backup as the last item here. but don\u2019t consider it  as a less important. Regular backup of your site will make you fill  safer than any other above. There are several plugins available for  WordPress which manage the backup for you.<\/p>\n<p>Here are some free plugins for WordPress backup.<\/p>\n<ul>\n<li><a href=\"http:\/\/wordpress.org\/extend\/plugins\/backupwordpress\/\" target=\"_blank\" rel=\"noopener\">Backup WordPress<\/a><\/li>\n<li><a href=\"http:\/\/wordpress.org\/extend\/plugins\/wp-db-backup\/\" target=\"_blank\" rel=\"noopener\">WP DB Backup<\/a><\/li>\n<\/ul>\n<p>But if you are more serious about the backup for your blog then you  should go with the paid solution. The two biggest premium solutions out  there right now are <a href=\"http:\/\/pluginbuddy.com\/purchase\/backupbuddy\/\" target=\"_blank\" rel=\"noopener\">Backup Buddy<\/a> and <a href=\"http:\/\/vaultpress.com\/\" target=\"_blank\" rel=\"noopener\">VaultPress<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress is the most used open-source platform nowadays for any type of websites: whether it is blog, CMS or any other custom solution. WordPress is naturally based on PHP (among other languages), so, as a PHP developer I always make sure to cover\/apply some tips for WordPress to make secure and speedup the site which [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[176],"tags":[182,183,181,725],"class_list":["post-341","post","type-post","status-publish","format-standard","hentry","category-wordress-security","tag-quick-tips-to-securing-your-wordpress","tag-quick-tips-to-wordpress-securing","tag-securing-your-wordpress","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/posts\/341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/comments?post=341"}],"version-history":[{"count":14,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/posts\/341\/revisions"}],"predecessor-version":[{"id":694,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/posts\/341\/revisions\/694"}],"wp:attachment":[{"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/media?parent=341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/categories?post=341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.santoshkori.com\/blog\/wp-json\/wp\/v2\/tags?post=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}