{"id":25202,"date":"2018-01-25T02:38:16","date_gmt":"2018-01-25T08:38:16","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=25202"},"modified":"2022-12-05T06:39:49","modified_gmt":"2022-12-05T12:39:49","slug":"how-to-limit-dashboard-access-in-wordpress","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/","title":{"rendered":"How to Limit Dashboard Access in WordPress"},"content":{"rendered":"
<\/div>

\"How<\/p>\n

In today’s tutorial, we’ll show you, How to Limit Dashboard Access in WordPress. WordPress is the most popular CMS in the world and is used to power over 60% of all websites using a CMS. With WordPress being so popular, WordPress sites are the most popular target for hackers who want to exploit the WordPress security vulnerabilities. To minimize the chances of your WordPress site being hacked, you should restrict access to the WordPress admin dashboard area and update the WordPress core, plugins and themes as soon as updates are available. Limiting the access to the WordPress admin area will help you to mitigate many common security threats. In this blog post, we will show you how to limit your WordPress site and to restrict access to the WordPress admin area, using the .htaccess<\/code> file if you are using Apache as you web server, or with nginx location rule if you are using Nginx as your web server.<\/p>\n

<\/p>\n

Limiting access to the WordPress dashboard area with .htaccess file<\/h2>\n

If you are using Apache as your web server and you have a static IP address assigned to your machine then the easiest way to restrict access to the WordPress admin area to a specific IP address is to use the .htaccess<\/code> file. The .htaccess<\/code> file is a hidden text file which resides in the WordPress root directory, usually named public_html<\/code>. For example if your IP address is 123.123.123.123<\/code> to allow access to the WordPress admin area and to the WordPress login page only to your IP address, open the .htaccess<\/code> file and add the following:<\/p>\n

RewriteEngine on\r\nRewriteCond %{REQUEST_URI} ^(.*)?wp-admin$ [OR]\r\nRewriteCond %{REQUEST_URI} ^(.*)?wp-login\\.php(.*)$ \r\nRewriteCond %{REMOTE_ADDR} !^123.123.123.123$\r\nRewriteRule ^(.*)$ - [R=403,L]\r\n<\/code><\/pre>\n

The rule above will show a 403 Forbidden message to anyone trying to access the WordPress admin area and WordPress login page except to the allowed IP address 123.123.123.123<\/code>.<\/p>\n

Limiting access to the WordPress dashboard\u00a0 area with nginx rule<\/h2>\n

If you are using nginx as your web server then instead of editing .htaccess<\/code> file you need to add the following location rule to your domain Nginx server block:<\/p>\n

location ~ ^\/(wp-admin|wp-login\\.php) {\r\n    allow 123.123.123.123;\r\n    deny all;\r\n}\r\n<\/code><\/pre>\n

Same as before, the rule above will show A 403 Forbidden message to anyone trying to access the WordPress admin area and WordPress login page except to the allowed IP address 123.123.123.123<\/code>.<\/p>\n

If you have a dynamic IP address, is not recommended to restrict access to the WordPress admin area to a single IP address because your IP address will change when you restart your router and you will not be able to access the WordPress admin area.<\/p>\n


\n

If you use one of our WordPress VPS Hosting<\/a> services, you can simply ask our expert Linux admins to protect your WordPress site and to restrict access to the WordPress admin area for you. They are available 24×7 and will take care of your request immediately.<\/p>\n

PS.<\/strong><\/span> If you liked this post, on how to restrict dashboard Access in WordPress,\u00a0 please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"

In today’s tutorial, we’ll show you, How to Limit Dashboard Access in WordPress. WordPress is the most popular CMS in … <\/p>\n

Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":25455,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1710,1703],"tags":[61,37,49,148],"yoast_head":"\nHow to Limit Dashboard Access in WordPress - RoseHosting<\/title>\n<meta name=\"description\" content=\"How to Limit Dashboard Access in WordPress - RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Limit Dashboard Access in WordPress - RoseHosting\" \/>\n<meta property=\"og:description\" content=\"How to Limit Dashboard Access in WordPress - RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-25T08:38:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-05T12:39:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-Limit-Dashboard-Access-in-WordPress.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Limit Dashboard Access in WordPress\",\"datePublished\":\"2018-01-25T08:38:16+00:00\",\"dateModified\":\"2022-12-05T12:39:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/\"},\"wordCount\":490,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-Limit-Dashboard-Access-in-WordPress.jpg\",\"keywords\":[\".htaccess\",\"apache\",\"nginx\",\"wordpress\"],\"articleSection\":[\"CMS, CRM, ERP\",\"Security\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/\",\"name\":\"How to Limit Dashboard Access in WordPress - RoseHosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-Limit-Dashboard-Access-in-WordPress.jpg\",\"datePublished\":\"2018-01-25T08:38:16+00:00\",\"dateModified\":\"2022-12-05T12:39:49+00:00\",\"description\":\"How to Limit Dashboard Access in WordPress - RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#primaryimage\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-Limit-Dashboard-Access-in-WordPress.jpg\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-Limit-Dashboard-Access-in-WordPress.jpg\",\"width\":1200,\"height\":600,\"caption\":\"How to Limit Dashboard Access in WordPress\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.rosehosting.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Limit Dashboard Access in WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"name\":\"RoseHosting\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RoseHosting\",\"https:\/\/x.com\/rosehosting\",\"https:\/\/www.linkedin.com\/in\/rosehosting\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\/\/www.rosehosting.com\",\"https:\/\/www.facebook.com\/rosehosting.helpdesk\"],\"url\":\"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Limit Dashboard Access in WordPress - RoseHosting","description":"How to Limit Dashboard Access in WordPress - RoseHosting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"How to Limit Dashboard Access in WordPress - RoseHosting","og_description":"How to Limit Dashboard Access in WordPress - RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2018-01-25T08:38:16+00:00","article_modified_time":"2022-12-05T12:39:49+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-Limit-Dashboard-Access-in-WordPress.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Limit Dashboard Access in WordPress","datePublished":"2018-01-25T08:38:16+00:00","dateModified":"2022-12-05T12:39:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/"},"wordCount":490,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-Limit-Dashboard-Access-in-WordPress.jpg","keywords":[".htaccess","apache","nginx","wordpress"],"articleSection":["CMS, CRM, ERP","Security"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/","name":"How to Limit Dashboard Access in WordPress - RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-Limit-Dashboard-Access-in-WordPress.jpg","datePublished":"2018-01-25T08:38:16+00:00","dateModified":"2022-12-05T12:39:49+00:00","description":"How to Limit Dashboard Access in WordPress - RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-Limit-Dashboard-Access-in-WordPress.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-Limit-Dashboard-Access-in-WordPress.jpg","width":1200,"height":600,"caption":"How to Limit Dashboard Access in WordPress"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-limit-dashboard-access-in-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Limit Dashboard Access in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"]},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/25202"}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=25202"}],"version-history":[{"count":3,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/25202\/revisions"}],"predecessor-version":[{"id":43712,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/25202\/revisions\/43712"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/25455"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=25202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=25202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=25202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}