{"id":8655,"date":"2017-09-07T14:53:08","date_gmt":"2017-09-07T11:53:08","guid":{"rendered":"https:\/\/themeisle.com\/blog\/?p=8655"},"modified":"2023-08-19T03:34:45","modified_gmt":"2023-08-19T00:34:45","slug":"whitelist-ip-addresses-in-wordpress","status":"publish","type":"post","link":"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/","title":{"rendered":"How to Whitelist IP Addresses in WordPress to Restrict Login Access (via .htaccess)"},"content":{"rendered":"\n<p>Securing your WordPress website is one of your most critical management duties. A lot of websites find themselves the targets of random attacks, and if yours makes it onto that list, your site and its data could be at risk. To help avoid this problem, one security tip is to learn how to whitelist IP addresses in WordPress.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>This feature makes it so that only the people you trust will have access to your dashboard. It works at the server level, so anyone who tries to log in without authorization won&#8217;t even be able to see your WordPress login page. Plus, it&#8217;s simple enough to implement, as long as you don&#8217;t mind copying and pasting a few lines of code.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>\ud83d\udcda In this article, we&#8217;ll first quickly explain <a href=\"#what-are-ip-addresses\">what IP addresses are<\/a> and then we&#8217;ll talk about <a href=\"#what-whitelisting-is\">what whitelisting is<\/a> and how it works. After that we&#8217;ll teach you <a href=\"#how-to-whitelist-ip-addresses\">how to whitelist IP addresses<\/a> in WordPress with two simple steps.<\/p>\n\n\n\n<p>Let&#8217;s get to work! \ud83d\udcaa<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n\t\t<div class='ti-tweet-clear'><\/div>\n\t\t\t<div class='ti-tweet_wrapper'>\n\t\t    \t<div class='ti-tweet_text'>\n\t\t    \t\t<a href='https:\/\/twitter.com\/share?text=How+to+whitelist+%23IP+addresses+in+%23WordPress+to+restrict+login+access+%F0%9F%A7%91%E2%80%8D%F0%9F%92%BB&via=themeisle&related=themeisle&url=https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/' target='_blank' rel='nofollow'>How to whitelist #IP addresses in #WordPress to restrict login access \ud83e\uddd1\u200d\ud83d\udcbb<\/a>\n\t\t    \t<\/div>\n\t\t    \t<div class='ti-tweet_sharebtn'>\n\t\t    \t<a href='https:\/\/twitter.com\/share?text=How+to+whitelist+%23IP+addresses+in+%23WordPress+to+restrict+login+access+%F0%9F%A7%91%E2%80%8D%F0%9F%92%BB&via=themeisle&related=themeisle&url=https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/' target='_blank' rel='nofollow'>Click To Tweet \n\t\t    \t\t<span><\/span>\n\t\t    \t<\/a>\n\t\t    <\/div>\n\t\t<\/div>\n<\/div>\n<\/div>\n\n\n<div class=\"su-divider su-divider-style-dotted\" style=\"margin:40px 0;border-width:1px;border-color:#999999\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-are-ip-addresses\">What are IP addresses? \ud83e\udd14<\/h2>\n\n\n\n<p>IP addresses are crucial for enabling communication between devices on the internet. They serve as unique identifiers that facilitate the routing of data. Every device you use, whether it&#8217;s your mobile phone or computer, has an IP address. When you open a web browser or run an app, it communicates using the IP address of that device.<\/p>\n\n\n\n<p>Moreover, IP addresses help identify specific internet networks. Each device within your network might have its unique IP address locally. But to the outside world, all traffic from your network often appears to come from a single IP address, provided by your Internet Service Provider (ISP).<\/p>\n\n\n\n<p>\ud83d\udca1 If you&#8217;re curious, you can even check what the IP address of your internet network is right now by using our <a href=\"https:\/\/themeisle.com\/blog\/what-is-my-ip-address\/\">free IP checker tool<\/a>.<\/p>\n\n\n\n<p>In the context of websites, especially platforms like WordPress, grasping the importance of IP addresses is essential. Not only do they route data, but they also play a pivotal role in <a href=\"https:\/\/themeisle.com\/blog\/wordpress-login-security\/\">bolstering security<\/a>. By choosing which IP addresses can access certain parts of your website, you can significantly cut down on the risk of unauthorized access and potential cyber threats.<\/p>\n\n\n\n<p>Which brings us to&#8230;<\/p>\n\n\n<div class=\"su-divider su-divider-style-dotted\" style=\"margin:40px 0;border-width:1px;border-color:#999999\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-whitelisting-is\">What whitelisting is (and why it&#8217;s effective) \ud83d\udfe2<\/h2>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=1265840165  fetchpriority=\"high\" decoding=\"async\" width=\"871\" height=\"253\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ip-address-example.png\" alt=\"An example of an IP address.\" class=\"wp-image-8663\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:871\/h:253\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ip-address-example.png 871w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:87\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ip-address-example.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:223\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ip-address-example.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:15\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ip-address-example.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:139\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ip-address-example.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:231\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ip-address-example.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:86\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ip-address-example.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:113\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ip-address-example.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:78\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ip-address-example.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:871\/h:253\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ip-address-example.png 2x\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\">Restricting access to your dashboard is one of the best security measures you can implement.<\/figcaption><\/figure><\/div>\n\n\n<p>The terms &#8216;blacklisting&#8217; and &#8216;whitelisting&#8217; refer to access controls based on IP addresses. Blacklisting prevents access from specific IP addresses, whereas whitelisting allows access solely to designated IP addresses.<\/p>\n\n\n\n<p>That is &#8211; when you whitelist an IP address on a website, you grant access <em>only<\/em> to a specific network. A user can switch devices on that network, but they&#8217;ll need to be connected to a network with whitelisted access to reach the backend of your site.<\/p>\n\n\n\n<p>\ud83d\udc49 As you can imagine, this security feature offers a lot of advantages, because it:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Enables you to control who accesses your website<\/strong>. Limiting access only to specific IP addresses can help you prevent attacks on your site.<\/li>\n\n\n\n<li><strong>Is more effective than implementing login security measures<\/strong>. Think of your login screen as a door to which many people have keys. When you implement an IP whitelisting feature, you essentially designate a full-time security guard that makes sure only the people you&#8217;ve approved can enter that door.<\/li>\n\n\n\n<li><strong>Is easy to implement<\/strong>. If you&#8217;re a WordPress user, you can enable this feature by adding a few lines of code to one of <a href=\"https:\/\/themeisle.com\/blog\/wordpress-core-files\/\">your core files<\/a>. It&#8217;s very simple, even if you&#8217;re not a developer.<\/li>\n<\/ul>\n\n\n\n<p>It&#8217;s important to note that in most cases, you won&#8217;t want to limit access to your entire website unless it&#8217;s purely <a href=\"https:\/\/themeisle.com\/blog\/wordpress-staging-site\/\">a staging site<\/a>. Rather, you&#8217;ll just want to secure your back end and its login page.<\/p>\n\n\n<div class=\"su-divider su-divider-style-default\" style=\"margin:40px 0;border-width:15px;border-color:#4267cf\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Potential disadvantages of using this method<\/h3>\n\n\n\n<p>Of course, whitelisting IP addresses in WordPress can get tricky if you&#8217;re part of a large team. You&#8217;ll need to convince everyone to share their IPs with you, <em>and<\/em> figure out what to do for users with dynamic addresses (IPs that change regularly).<\/p>\n\n\n\n<p>Additionally, if you use this method, you won&#8217;t be able to access your site&#8217;s backend dashboard if you&#8217;re at a cafe or on vacation without updating the list of whitelisted IP addresses (<em>because you&#8217;ll have a different IP address<\/em>).<\/p>\n\n\n\n<p>In our experience, the best way to approach these problems is to <a href=\"http:\/\/www.techradar.com\/news\/the-best-vpn-services-and-vpn-deals-of-2017\" target=\"_blank\" rel=\"noopener\">use a VPN service<\/a> that offers your team members dedicated IP addresses. Then, as long as they remember to log into the service before trying to access your back end, they shouldn&#8217;t encounter any problems.<\/p>\n\n\n<div class=\"su-divider su-divider-style-dotted\" style=\"margin:40px 0;border-width:1px;border-color:#999999\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-whitelist-ip-addresses\">How to whitelist IP addresses in WordPress (in two steps) \u270c\ufe0f<\/h2>\n\n\n\n<p>Now that you understand the reasons to whitelist IP addresses in WordPress, it&#8217;s time to learn how to make it happen. As we mentioned earlier, you&#8217;ll need to tweak one of your WordPress files manually to implement this feature. Don&#8217;t worry \u2013 the process is simple, and we&#8217;ll guide you through every step.<\/p>\n\n\n\n<p>Before we jump in, it&#8217;s a smart idea to <a href=\"https:\/\/themeisle.com\/blog\/backup-a-wordpress-site-for-free\/\">back up your site<\/a> just in case. Then, make sure you have a list of all your team members&#8217; IP addresses ready. To find out what their (and your) IPs are, they can use a simple tool such as <a href=\"http:\/\/iplocation.net\/\" target=\"_blank\" rel=\"noopener\">IP Location Finder<\/a>. All they need to do is visit the site, note down their IP addresses, and share them with you.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Step 1: <a href=\"#step-1\">Locate your <em>.htaccess<\/em> file<\/a><\/li>\n\n\n\n<li>Step 2: <a href=\"#step-2\">Whitelist an IP address by editing your <em>.htaccess<\/em> file<\/a><\/li>\n<\/ul>\n\n\n<div class=\"su-divider su-divider-style-default\" style=\"margin:40px 0;border-width:15px;border-color:#4267cf\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1\">Step 1: Locate your <em>.htaccess <\/em>file \ud83d\udd0d<\/h3>\n\n\n\n<p>The file we need to modify for this feature to work properly is called <code>.htaccess<\/code>. It&#8217;s a WordPress core file that communicates directly with your server and enables you to set up &#8216;rules&#8217;. In this case, we&#8217;re going to tell it to block access to your dashboard login page for IPs not on an approved list.<\/p>\n\n\n\n<p>To do that, you&#8217;ll first need to access your site&#8217;s back end using an FTP client, such as <a href=\"https:\/\/filezilla-project.org\/\" target=\"_blank\" rel=\"noopener\">FileZilla<\/a>. You&#8217;ll need your FTP login information. You can find this information in your web host&#8217;s control panel or in the email your web host sent when you signed up for your plan:<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=1524775127  fetchpriority=\"high\" decoding=\"async\" width=\"796\" height=\"185\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ftp-accounts.png\" alt=\"An example of an FTP account.\" class=\"wp-image-8664\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:796\/h:185\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ftp-accounts.png 796w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:70\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ftp-accounts.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:178\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ftp-accounts.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:12\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ftp-accounts.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:112\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ftp-accounts.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:185\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ftp-accounts.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:69\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ftp-accounts.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:91\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ftp-accounts.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:63\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ftp-accounts.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:796\/h:185\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/ftp-accounts.png 2x\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n<p>Once you have your credentials, access your website via FTP and head to WordPress&#8217; <em>root<\/em> folder. This directory is often called either <code>public_html<\/code> or <code>www<\/code>, or is named after your site. Open it, and look for the <code>.htaccess<\/code> file within:<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=1774592266  fetchpriority=\"high\" decoding=\"async\" width=\"857\" height=\"259\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/htaccess.png\" alt=\"Editing your htaccess file to whitelist IP addresses in WordPress.\" class=\"wp-image-8665\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:857\/h:259\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/htaccess.png 857w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:91\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/htaccess.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:232\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/htaccess.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:15\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/htaccess.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:145\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/htaccess.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:240\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/htaccess.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:89\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/htaccess.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:118\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/htaccess.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:82\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/htaccess.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:857\/h:259\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/08\/htaccess.png 2x\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n<p>Now, right click on the file and choose the option that reads <em>View\/Edit<\/em>. This will open the file locally, using your default text editor. Keep the file open for now, and let&#8217;s move on to the next step.<\/p>\n\n\n<div class=\"su-divider su-divider-style-default\" style=\"margin:40px 0;border-width:15px;border-color:#4267cf\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2\">Step 2: Whitelist an IP address by editing your <em>.htaccess <\/em>file \u270d\ufe0f<\/h3>\n\n\n\n<p>To whitelist a set of IP addresses, you&#8217;ll need to copy and paste the following code into your<code> .htaccess<\/code> file (with a few changes):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;IfModule mod_rewrite.c&gt;\nRewriteEngine on\nRewriteCond %{REQUEST_URI} ^(.*)?wp-login\\.php(.*)$ &#091;OR]\nRewriteCond %{REQUEST_URI} ^(.*)?wp-admin$\nRewriteCond %{REMOTE_ADDR} !^IP_ADDRESS_ONE$\nRewriteCond %{REMOTE_ADDR} !^IP_ADDRESS_TWO$\nRewriteRule ^(.*)$ - &#091;R=403,L]\n&lt;\/IfModule&gt;<\/code><\/pre>\n\n\n\n<p>This code snippet restricts access to both your dashboard and its login page. Whenever someone attempts to access either one, WordPress will check their IP against the addresses in your list. If one of them is a match, they&#8217;ll be let through.<\/p>\n\n\n\n<p>In the example above, you can see there are two placeholders for individual IP addresses (<code>IP_ADDRESS_ONE<\/code> and <code>IP_ADDRESS_TWO<\/code>). You can add as many lines as you want following the same format, one right below the other, replacing the placeholder text with the actual IPs<strong>. Make sure to leave the &#8220;^&#8221; and &#8220;$&#8221; symbols before and after the IP address, though<\/strong>.<\/p>\n\n\n\n<p>Here&#8217;s what the code should look like for a site with three whitelisted addresses:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;IfModule mod_rewrite.c&gt;\nRewriteEngine on\nRewriteCond %{REQUEST_URI} ^(.*)?wp-login\\.php(.*)$ &#091;OR]\nRewriteCond %{REQUEST_URI} ^(.*)?wp-admin$\nRewriteCond %{REMOTE_ADDR} !^190.36.268.21$\nRewriteCond %{REMOTE_ADDR} !^190.43.281.27$\nRewriteCond %{REMOTE_ADDR} !^190.67.302.44$\nRewriteRule ^(.*)$ - &#091;R=403,L]\n&lt;\/IfModule&gt;<\/code><\/pre>\n\n\n\n<p>To avoid confusion, you should add this snippet to the bottom of your <code>.htaccess<\/code> file, below its default rules. When you&#8217;re ready, save your changes and test that your new security feature is working by having each whitelisted user try and log in. Whenever you gain or lose team members, you can simply return to the file and add or delete IP addresses as necessary.<\/p>\n\n\n\n<p>Now, anyone who isn&#8217;t connected to one of the whitelisted IP addresses will see something like this if they try to access your dashboard:<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=1701300779  data-opt-src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png\"  decoding=\"async\" width=\"965\" height=\"534\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:eco\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png\" alt=\"what happens to those for whom you didn't whitelist IP addresses in WordPress.\" class=\"wp-image-9004\" old-srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:965\/h:534\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 965w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:166\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:425\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:28\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:434\/h:240\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 434w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:717\/h:397\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 717w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:267\/h:148\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 267w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:352\/h:195\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 352w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:244\/h:135\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 244w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:965\/h:534\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 2x\" \/><noscript><img data-opt-id=1701300779  decoding=\"async\" width=\"965\" height=\"534\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png\" alt=\"what happens to those for whom you didn't whitelist IP addresses in WordPress.\" class=\"wp-image-9004\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:965\/h:534\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 965w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:166\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:425\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:28\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:434\/h:240\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 434w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:717\/h:397\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 717w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:267\/h:148\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 267w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:352\/h:195\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 352w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:244\/h:135\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 244w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:965\/h:534\/q:mauto\/f:best\/dpr:2\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/wordpress-whitelist.png 2x\" sizes=\"(max-width: 700px) 100vw, 700px\" \/></noscript><\/figure><\/div>\n\n<div class=\"su-divider su-divider-style-dotted\" style=\"margin:40px 0;border-width:1px;border-color:#999999\"><a href=\"#\" style=\"color:#999999\">Go to top<\/a><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion \ud83e\uddd0<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>Learning how to whitelist IP addresses in WordPress is simple, and it&#8217;s a highly effective way to <a href=\"https:\/\/themeisle.com\/blog\/protect-your-wordpress-site-using-wordfence\/\">protect your website<\/a> from intruders.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n\t\t<div class='ti-tweet-clear'><\/div>\n\t\t\t<div class='ti-tweet_wrapper'>\n\t\t    \t<div class='ti-tweet_text'>\n\t\t    \t\t<a href='https:\/\/twitter.com\/share?text=How+to+whitelist+%23IP+addresses+in+%23WordPress+to+restrict+login+access+%F0%9F%A7%91%E2%80%8D%F0%9F%92%BB&via=themeisle&related=themeisle&url=https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/' target='_blank' rel='nofollow'>How to whitelist #IP addresses in #WordPress to restrict login access \ud83e\uddd1\u200d\ud83d\udcbb<\/a>\n\t\t    \t<\/div>\n\t\t    \t<div class='ti-tweet_sharebtn'>\n\t\t    \t<a href='https:\/\/twitter.com\/share?text=How+to+whitelist+%23IP+addresses+in+%23WordPress+to+restrict+login+access+%F0%9F%A7%91%E2%80%8D%F0%9F%92%BB&via=themeisle&related=themeisle&url=https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/' target='_blank' rel='nofollow'>Click To Tweet \n\t\t    \t\t<span><\/span>\n\t\t    \t<\/a>\n\t\t    <\/div>\n\t\t<\/div>\n<\/div>\n<\/div>\n\n\n\n<p>Do keep in mind that if you want to implement this security measure, you&#8217;ll have to ask all your co-authors for their IPs, <em>and<\/em> figure out a way for those with dynamic addresses to be able to do their jobs.<\/p>\n\n\n\n<p>Additionally, you should remember that this method isn&#8217;t always ideal if you find yourself constantly working from different locations. That is unless you pay for a dedicated IP address from a VPN.<\/p>\n\n\n\n<p>\ud83d\udc49 Once you&#8217;ve taken care of those tasks, here&#8217;s how to whitelist IP addresses in WordPress in two short steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\ud83d\udd0d Locate your <code>.htaccess<\/code> file.<\/li>\n\n\n\n<li>\u270d\ufe0f Whitelist all the IP addresses you need by adding the provided code snippet to the file.<\/li>\n<\/ol>\n\n\n\n<p><strong><em>Do you have any questions about how to whitelist IP addresses in WordPress? Let&#8217;s clear them up in the comments section below!<\/em><\/strong><\/p>\n\n\n<style>.ticss-d144f107 strong{font-weight: 700;\n    letter-spacing: -0.2px;\n    line-height: 1.2;\n    display: inline-block;}<\/style>\n\n\n<div class=\"wp-block-columns speed-guide has-white-color has-text-color has-background has-link-color wp-elements-2f81f6c5526477b5b4d52d1ca4513949 is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\" style=\"background-color:#4267cf\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:40%\">\n<figure class=\"wp-block-image size-medium\"><img data-opt-id=30701221  data-opt-src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png\"  decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:eco\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png\" alt=\"speed guide\" class=\"wp-image-113040\" old-srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:1024\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:150\/h:150\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 150w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:768\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:50\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:240\/h:240\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 240w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:397\/h:397\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 397w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:600\/h:600\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 600w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:148\/h:148\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 148w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:195\/h:195\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 195w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:135\/h:135\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 135w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1080\/h:1080\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1080\/h:1080\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 2x\" \/><noscript><img data-opt-id=30701221  decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png\" alt=\"speed guide\" class=\"wp-image-113040\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:1024\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:150\/h:150\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 150w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:768\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:50\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:240\/h:240\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 240w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:397\/h:397\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 397w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:600\/h:600\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 600w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:148\/h:148\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 148w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:195\/h:195\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 195w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:135\/h:135\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 135w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1080\/h:1080\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1080\/h:1080\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 2x\" sizes=\"(max-width: 300px) 100vw, 300px\" \/></noscript><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-center ticss-58e79f2f\" style=\"font-size:14px\"><strong>FREE GUIDE<\/strong><\/p>\n\n\n\n<p class=\"ticss-d144f107\" style=\"font-size:25px\"><strong>4 Essential Steps to Speed Up Your&nbsp;WordPress Website<\/strong><\/p>\n\n\n\n<p class=\"ticss-3b627beb\">Follow the simple steps in our 4-part mini series and reduce your loading times by 50-80%.&nbsp;\ud83d\ude80<\/p>\n\n\n<p><div class=\"frm_forms  with_frm_style frm_style_themeisle\" id=\"frm_form_4_container\" data-token=\"fb1c9a091ebf3b4b7ff9baa1739000ad\">\n<form enctype=\"multipart\/form-data\" method=\"post\" class=\"frm-show-form  frm_pro_form \" id=\"form_site-speed-guide-below-post\" data-token=\"fb1c9a091ebf3b4b7ff9baa1739000ad\">\n<div class=\"frm_form_fields \">\n<fieldset>\n<legend class=\"frm_screen_reader\">Site Speed Guide - Below Post<\/legend>\r\n\r\n<div class=\"frm_fields_container\">\n<input type=\"hidden\" name=\"frm_action\" value=\"create\" \/>\n<input type=\"hidden\" name=\"form_id\" value=\"4\" \/>\n<input type=\"hidden\" name=\"frm_hide_fields_4\" id=\"frm_hide_fields_4\" value=\"\" \/>\n<input type=\"hidden\" name=\"form_key\" value=\"site-speed-guide-below-post\" \/>\n<input type=\"hidden\" name=\"item_meta[0]\" value=\"\" \/>\n<input type=\"hidden\" id=\"frm_submit_entry_4\" name=\"frm_submit_entry_4\" value=\"54e7aeb1c1\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/blog\/wp-json\/wp\/v2\/posts\/8655\" \/><input type=\"hidden\" name=\"item_meta[18]\" id=\"field_6px6q2\" value=\"\/blog\/wp-json\/wp\/v2\/posts\/8655\"  data-frmval=\"\/blog\/wp-json\/wp\/v2\/posts\/8655\"   \/>\n<div id=\"frm_field_15_container\" class=\"frm_form_field form-field  frm_required_field frm_none_container\">\r\n\t<label for=\"field_6px6q\" id=\"field_6px6q_label\" class=\"frm_primary_label\">Your Email\r\n\t\t<span class=\"frm_required\" aria-hidden=\"true\">*<\/span>\r\n\t<\/label>\r\n\t<input type=\"email\" id=\"field_6px6q\" name=\"item_meta[15]\" value=\"\"  autocomplete=\"email\"  placeholder=\"your@email.com\" data-reqmsg=\"Your Email cannot be blank.\" aria-required=\"true\" data-invmsg=\"Your Email is invalid\" aria-invalid=\"false\"  \/>\r\n\t\r\n\t\r\n<\/div>\n<div id=\"frm_field_17_container\" class=\"frm_form_field form-field  frm_none_container vertical_radio\">\r\n\t<div  id=\"field_6px6q3_label\" class=\"frm_primary_label\">Subscribe to our newsletter\r\n\t\t<span class=\"frm_required\" aria-hidden=\"true\"><\/span>\r\n\t<\/div>\r\n\t<div class=\"frm_opt_container\" aria-labelledby=\"field_6px6q3_label\" role=\"group\">\t\t<div class=\"frm_checkbox\" id=\"frm_checkbox_17-0\">\t\t\t<label  for=\"field_6px6q3-0\">\n\t\t\t<input type=\"checkbox\" name=\"item_meta[17][]\" id=\"field_6px6q3-0\" value=\"true\"  data-invmsg=\"Subscribe to our newsletter is invalid\" aria-invalid=\"false\"   \/> Subscribe to our newsletter<\/label><\/div>\n<\/div>\r\n\t\r\n\t\r\n<\/div>\n<div id=\"frm_field_14_container\" class=\"frm_form_field form-field \">\r\n\t<div class=\"frm_submit frm_flex\">\r\n<button class=\"frm_button_submit frm_final_submit\" type=\"submit\"   formnovalidate=\"formnovalidate\">FREE ACCESS<\/button>\r\n\r\n\r\n\r\n<\/div>\r\n<\/div>\n\t<input type=\"hidden\" name=\"item_key\" value=\"\" \/>\n\t\t\t<div id=\"frm_field_24_container\">\n\t\t\t<label for=\"field_sjki2\" >\n\t\t\t\tIf you are human, leave this field blank.\t\t\t<\/label>\n\t\t\t<input  id=\"field_sjki2\" type=\"text\" class=\"frm_form_field form-field frm_verify\" name=\"item_meta[24]\" value=\"\"  \/>\n\t\t<\/div>\n\t\t<input name=\"frm_state\" type=\"hidden\" value=\"tGKtIG19U6wyYcew8uBttSCrQ3hwN7mz3ha5X\/r9i4+PSAm6AeCFrcPBJiK38Y1i\" \/><\/div>\n<\/fieldset>\n<\/div>\n\n<p style=\"display: none !important;\" class=\"akismet-fields-container\" data-prefix=\"ak_\"><label>&#916;<textarea name=\"ak_hp_textarea\" cols=\"45\" rows=\"8\" maxlength=\"100\"><\/textarea><\/label><input type=\"hidden\" id=\"ak_js_1\" name=\"ak_js\" value=\"216\"\/><script>document.getElementById( \"ak_js_1\" ).setAttribute( \"value\", ( new Date() ).getTime() );<\/script><\/p><\/form>\n<\/div>\n<\/p>\n<\/div>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"Securing your WordPress website is one of your most critical management duties. A lot of websites find themselves the targets of random attacks, and if yours makes it onto that list, your site and its data could be at risk. To help avoid this problem, one security tip is to learn how to whitelist IP addresses in WordPress &#8211; which is what we&#8217;re going to teach you in this tutorial.","protected":false},"author":14,"featured_media":49146,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_stopmodifiedupdate":false,"_modified_date":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[272],"tags":[],"hashtags":[],"class_list":["post-8655","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-tutorials"],"wppr_data":{"cwp_meta_box_check":"No"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.8 (Yoast SEO v26.1.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Whitelist IP Addresses in WordPress to Restrict Login Access<\/title>\n<meta name=\"description\" content=\"Learning how to whitelist IP addresses in WordPress is a great security measure to restrict login access. Let&#039;s go through it step by step!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-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 Whitelist IP Addresses in WordPress to Restrict Login Access (via .htaccess)\" \/>\n<meta property=\"og:description\" content=\"Learning how to whitelist IP addresses in WordPress is a great security measure to restrict login access. Let&#039;s go through it step by step!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"Themeisle Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-09-07T11:53:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-19T00:34:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/whitelist-ip-addresses.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2180\" \/>\n\t<meta property=\"og:image:height\" content=\"1090\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"John Hughes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Hughes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/\"},\"author\":{\"name\":\"John Hughes\",\"@id\":\"https:\/\/themeisle.com\/blog\/#\/schema\/person\/0f080762cdcc47aee80f11536fe87242\"},\"headline\":\"How to Whitelist IP Addresses in WordPress to Restrict Login Access (via .htaccess)\",\"datePublished\":\"2017-09-07T11:53:08+00:00\",\"dateModified\":\"2023-08-19T00:34:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/\"},\"wordCount\":1617,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/themeisle.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/whitelist-ip-addresses.png\",\"articleSection\":[\"WordPress Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/\",\"url\":\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/\",\"name\":\"How to Whitelist IP Addresses in WordPress to Restrict Login Access\",\"isPartOf\":{\"@id\":\"https:\/\/themeisle.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/whitelist-ip-addresses.png\",\"datePublished\":\"2017-09-07T11:53:08+00:00\",\"dateModified\":\"2023-08-19T00:34:45+00:00\",\"description\":\"Learning how to whitelist IP addresses in WordPress is a great security measure to restrict login access. Let\\\\'s go through it step by step!\",\"breadcrumb\":{\"@id\":\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#primaryimage\",\"url\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/whitelist-ip-addresses.png\",\"contentUrl\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/whitelist-ip-addresses.png\",\"width\":2180,\"height\":1090,\"caption\":\"whitelist ip addresses in wordpress\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/themeisle.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Whitelist IP Addresses in WordPress to Restrict Login Access (via .htaccess)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/themeisle.com\/blog\/#website\",\"url\":\"https:\/\/themeisle.com\/blog\/\",\"name\":\"Themeisle Blog\",\"description\":\"WordPress Tutorials and Reviews for Beginners and Advanced\",\"publisher\":{\"@id\":\"https:\/\/themeisle.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/themeisle.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/themeisle.com\/blog\/#organization\",\"name\":\"VertiStudio\",\"alternateName\":\"Vertigo Studio SA\",\"url\":\"https:\/\/themeisle.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/themeisle.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2024\/02\/VertiStudio_logo1.png\",\"contentUrl\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2024\/02\/VertiStudio_logo1.png\",\"width\":718,\"height\":156,\"caption\":\"VertiStudio\"},\"image\":{\"@id\":\"https:\/\/themeisle.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/themeisle.com\/blog\/#\/schema\/person\/0f080762cdcc47aee80f11536fe87242\",\"name\":\"John Hughes\",\"description\":\"John is a self-taught WordPress designer and developer. He has been working with the CMS for over a decade, and has experience operating as a freelancer and as part of an agency. He\u2019s dabbled in everything from accessible design to website security. Plus, he has extensive knowledge of online business topics like affiliate marketing.\",\"sameAs\":[\"http:\/\/wordcandy.co\"],\"url\":\"https:\/\/themeisle.com\/blog\/author\/john-h\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Whitelist IP Addresses in WordPress to Restrict Login Access","description":"Learning how to whitelist IP addresses in WordPress is a great security measure to restrict login access. Let&#039;s go through it step by step!","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:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"How to Whitelist IP Addresses in WordPress to Restrict Login Access (via .htaccess)","og_description":"Learning how to whitelist IP addresses in WordPress is a great security measure to restrict login access. Let&#039;s go through it step by step!","og_url":"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/","og_site_name":"Themeisle Blog","article_published_time":"2017-09-07T11:53:08+00:00","article_modified_time":"2023-08-19T00:34:45+00:00","og_image":[{"width":2180,"height":1090,"url":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/whitelist-ip-addresses.png","type":"image\/png"}],"author":"John Hughes","twitter_card":"summary_large_image","twitter_misc":{"Written by":"John Hughes","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#article","isPartOf":{"@id":"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/"},"author":{"name":"John Hughes","@id":"https:\/\/themeisle.com\/blog\/#\/schema\/person\/0f080762cdcc47aee80f11536fe87242"},"headline":"How to Whitelist IP Addresses in WordPress to Restrict Login Access (via .htaccess)","datePublished":"2017-09-07T11:53:08+00:00","dateModified":"2023-08-19T00:34:45+00:00","mainEntityOfPage":{"@id":"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/"},"wordCount":1617,"commentCount":2,"publisher":{"@id":"https:\/\/themeisle.com\/blog\/#organization"},"image":{"@id":"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/whitelist-ip-addresses.png","articleSection":["WordPress Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/","url":"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/","name":"How to Whitelist IP Addresses in WordPress to Restrict Login Access","isPartOf":{"@id":"https:\/\/themeisle.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/whitelist-ip-addresses.png","datePublished":"2017-09-07T11:53:08+00:00","dateModified":"2023-08-19T00:34:45+00:00","description":"Learning how to whitelist IP addresses in WordPress is a great security measure to restrict login access. Let\\'s go through it step by step!","breadcrumb":{"@id":"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#primaryimage","url":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/whitelist-ip-addresses.png","contentUrl":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2017\/09\/whitelist-ip-addresses.png","width":2180,"height":1090,"caption":"whitelist ip addresses in wordpress"},{"@type":"BreadcrumbList","@id":"https:\/\/themeisle.com\/blog\/whitelist-ip-addresses-in-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/themeisle.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Whitelist IP Addresses in WordPress to Restrict Login Access (via .htaccess)"}]},{"@type":"WebSite","@id":"https:\/\/themeisle.com\/blog\/#website","url":"https:\/\/themeisle.com\/blog\/","name":"Themeisle Blog","description":"WordPress Tutorials and Reviews for Beginners and Advanced","publisher":{"@id":"https:\/\/themeisle.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/themeisle.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/themeisle.com\/blog\/#organization","name":"VertiStudio","alternateName":"Vertigo Studio SA","url":"https:\/\/themeisle.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/themeisle.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2024\/02\/VertiStudio_logo1.png","contentUrl":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2024\/02\/VertiStudio_logo1.png","width":718,"height":156,"caption":"VertiStudio"},"image":{"@id":"https:\/\/themeisle.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/themeisle.com\/blog\/#\/schema\/person\/0f080762cdcc47aee80f11536fe87242","name":"John Hughes","description":"John is a self-taught WordPress designer and developer. He has been working with the CMS for over a decade, and has experience operating as a freelancer and as part of an agency. He\u2019s dabbled in everything from accessible design to website security. Plus, he has extensive knowledge of online business topics like affiliate marketing.","sameAs":["http:\/\/wordcandy.co"],"url":"https:\/\/themeisle.com\/blog\/author\/john-h\/"}]}},"_links":{"self":[{"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/posts\/8655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/comments?post=8655"}],"version-history":[{"count":13,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/posts\/8655\/revisions"}],"predecessor-version":[{"id":80123,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/posts\/8655\/revisions\/80123"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/media\/49146"}],"wp:attachment":[{"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/media?parent=8655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/categories?post=8655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/tags?post=8655"},{"taxonomy":"hashtags","embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/hashtags?post=8655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}