Admin IP Lockdown
Restricts wp-admin and wp-login.php to allowed IP addresses, with Cloudflare support, dynamic DNS hostnames for home IPs that change, and an emergency email unlock link so you can't lock yourself out.
Screenshots
Most attacks on a WordPress site go through its login page: bots guessing passwords around the clock, passwords leaked from other sites, scripts probing wp-admin for weak spots. If only you and your team ever sign in, the rest of the internet doesn't need to see that page at all. Admin IP Lockdown opens wp-admin and wp-login.php only to the IP addresses you list. Everyone else gets a short "Access restricted" page and never sees a login form.
Allow single addresses, ranges like 203.0.113.0/24 or 203.0.113.*, and IPv6 networks. If your home IP keeps changing, add a free dynamic DNS hostname instead: whatever address it points at is let in, and a change is picked up within a minute. Behind Cloudflare it uses Cloudflare's visitor address, but only on requests that really come from Cloudflare's network, so nobody can fake their way in by sending that header themselves. Load balancers and firewalls such as Sucuri can be set up too.
You can't lock yourself out. Your own address goes on the list when you activate it, and every save checks it first. Stuck on a new network? The "Access restricted" page can email an administrator a one-time unlock link that lets in the network they're on, and the site's admin address hears about every unlock. Staff accounts get two more protections: they can only sign in from allowed addresses through any login form, including a shop's account page and XML-RPC, and their sessions only work from allowed addresses, so a stolen login cookie is useless anywhere else. Customers keep signing in as usual.
Features
- Lock the login page. wp-admin and wp-login.php only open for the addresses you list. Everyone else gets "Access restricted" instead of a login form.
- IPs, ranges and IPv6. Allow single addresses, ranges like 203.0.113.0/24 or 203.0.113.*, and whole IPv6 networks.
- Home IP that changes. Add a dynamic DNS hostname and its current address is let in. A new address works within a minute.
- Emergency unlock email. Locked out on the road? Email yourself a one-time link that lets in the network you're on, for as long as you choose.
- Can't lock yourself out. Your own address is checked on every save, and a change that would shut you out isn't saved.
- Cloudflare-aware. Uses Cloudflare's visitor address only on requests from Cloudflare's own network, so it can't be faked.
- No side doors. Staff can't sign in through other login forms or XML-RPC from unlisted networks, and the answer never gives away a correct password.
- Stolen cookies stay useless. Staff sessions only work from allowed addresses, so a copied login cookie gets nowhere else.
- Shops keep working. Customers sign in as usual, and the background requests your forms, carts and search use stay open.
- See who was turned away. The Activity tab shows what was blocked in the last 7 days, with a one-click Allow for a colleague.
- Built for agencies. Always allow your office IP from wp-config.php on every client site, and manage the list over WP-CLI.
- Works behind proxies. Load balancers and firewalls like Sucuri are supported, and their forwarding header is read safely.
- Click Download above to save
admin-ip-lockdown.zip. Leave it zipped. - In your WordPress dashboard, go to Plugins > Add New Plugin and click Upload Plugin.
- Choose the ZIP and click Install Now, then Activate Plugin.
To update later, upload a newer ZIP the same way. WordPress offers to replace the installed version and keeps your settings.
What Happens If I Lock Myself Out?
On the "Access restricted" page, open "Administrator? Email me an unlock link" and enter your account's email address. The link lets in the network you open it from for 24 hours, or however long you choose. If email isn't an option, add one line to wp-config.php, run a WP-CLI command, or rename the plugin's folder over FTP; the settings page lists all of these. Saves are checked first too, so you can't lock yourself out from the settings page by mistake.
My Home IP Address Keeps Changing. Will It Still Work?
Yes. Set up a free dynamic DNS hostname (DuckDNS, No-IP and Dynu all have one, and many routers can keep it updated) and add the hostname instead of the address. Whatever it points at is let in, and a new address works within a minute.
Does It Work With Cloudflare?
Yes, with nothing to set up. Behind Cloudflare, every request arrives from a Cloudflare server, so the plugin reads the visitor's real address from Cloudflare's header, but only when the request really comes from Cloudflare's network. The IP detection tab shows the address the site sees for you and how it got it.
Can Customers Still Log In to My WooCommerce Store?
Yes. Customers sign in on the shop's account page, which isn't locked, and only staff accounts (or administrators only, if you prefer) are limited to allowed addresses. If customers or members sign in on wp-login.php itself, switch off the login page lock; staff sign-ins stay limited either way.
Isn't Changing the Login URL Enough?
A hidden login URL only hides the form. It leaks through links, emails and browser history, and bots can still sign in through XML-RPC or a shop's account page. An IP lockdown blocks every one of those routes for anyone not on your list, whatever the URL.
Will It Break Jetpack, the Mobile App or My Integrations?
No. XML-RPC is left open unless you lock it, and application passwords, which apps and automation tools use, keep working from any address unless you switch that off.
What Does It Store?
Your settings, what your hostnames point to, networks unlocked by email while their access lasts, and a log of blocked attempts (address, page and count) kept for 30 days. Query strings are never stored. Deleting the plugin removes all of it.
- See https://github.com/jmsprsns/admin-ip-lockdown/releases for the full release history.
Download
More Free WordPress Plugins
Thumbnail Size Manager
See every image size your site makes, where each one came from, how many files it has and whether anything uses it. Switch off the sizes you don't need, clean up their files after a dry run, and regenerate the rest.Phone Click Tracking
See which pages, traffic sources and campaigns make people call or text you. Every tel:, sms:, WhatsApp and email click is logged in WordPress, with Google Business Profile and AI referrals, a Google Ads conversion export and client reports.Text Us Widget
An iOS-style "Text Us" button that opens Messages on iPhone, iPad and Mac (and Android, if you like), with Cloudflare Turnstile to hide your number from bots and tap tracking by device and page.Let's Grow Your Business
Want some free consulting? Let's hop on a call and talk about what we can do to help.
