GICT knowledge base
How to Restrict IP Addresses from Accessing WordPress Dashboard?
Published
WordPress is the most popular CMS and the number of installations keeps growing. The popularity of WordPress makes it an easy target for hackers.. To avoid such issues, you can protect your WordPress dashboard by restricting certain IP addressesss.
You can add the following code to your .htaccess file inside the wp-admin directory.
order deny,allow
# Replace the below x.x.x.x with your IP address #
allow from x.x.x.x
deny from all
There are also plugins that serve the same purpose.
WP Ban
WP ban allows you to block or ban specific IP address or an entire IP range. It will display a custom ban message when the banned IP/ range tries to visit your blog. It will also keep a record of how many times the restricted IP address or Ip ranges visit your blog.
1) Install and activate the WP Ban plugin.
2) On your WordPress dashboard, select the Ban menu under settings.
You can enter the IP address, IP address range, Banned message, etc. Once you are done customizing, save changes at the bottom.
IP Ban
IP Ban is a security plugin used for protecting websites from unwanted IP addresses or user agents. You can add IP addresses or user agents creating your own blacklist.
1) Install and activate IP Ban plugin.
2) On your WordPress dashboard, select the simple IP Ban menu under settings.
You can enter the IP address, User Agent List that you want to ban. You may specify a redirect url, when a user from a banned ip/user agent accesses your site, the user will be redirected to the specified URL.
You can also install plugins like Limit Login Attempts, Simple Security, etc to protect your WordPress dashboard. Limit Login Attempts plugin allows for you to block IP address from making further attempts after a particular limit is reached. Simple Security Plugin for WordPress is an Access Log to track Logins and Failed Login Attempts for the admin area of your WordPress website.
If you need any further help please contact our support department.
Related guides
How to Find Services That Need a Restart After Updates with needrestart
Find services using outdated libraries with needrestart on Ubuntu. Read restart reports, review automatic restart policy and plan maintenance safely.
Firewall and SecurityHow to Connect Two Servers Privately with WireGuard
Connect two servers with WireGuard and keep PostgreSQL on the tunnel. Verify peer traffic, private database access and denied public connections.
Firewall and SecurityGICTServer HIPAA Hosting: BAA and Shared Responsibilities
Review GICTServer HIPAA hosting responsibilities and download the BAA and provisioning checklist. Request service-specific coverage through a support ticket.
Firewall and SecurityHow to Sign and Verify Files with Minisign
Sign release files with Minisign, share an authenticated public key, verify downloads, and stop processing when signatures fail.




