EDZNET Security Guard

By EDZNET

60+ active installationsVersion 1.7.2

Requires 2FA for administrators, blocks new admin creation, refuses URL-credential logins, and emails you on admin logins. Locked to first admin.

Description

EDZNET Security Guard stops the most common takeover techniques seen on compromised WordPress sites:

Two-Factor Authentication

Require two-factor authentication (2FA) for administrator logins using the TOTP standard (RFC 6238) and any authenticator app — Google Authenticator, Authy, 1Password, Microsoft Authenticator, or similar. Setup is guided: the administrator scans a QR code from their profile or the login page and enters a 6-digit code that changes every 30 seconds. The code is verified on the server against an encrypted secret, and after a successful 2FA login the normal “admin logged in” email is still sent.

You can require 2FA for all administrators, force new administrators to set it up, or force every administrator to enroll on their next login. Existing administrators are never locked out — anyone who hasn’t set it up yet is walked through enrollment before they can finish logging in.

Block Administrator Creation

A compromised admin account will often create a second administrator account as a backdoor — one that survives after the original breach is cleaned up. While this setting is enabled, no new user can be created with the Administrator role and no existing user can be promoted to one. Existing administrators are unaffected, so the first administrator can still manage the site and change the setting whenever a legitimate admin account is needed.

Block URL Credentials

Brute-force scripts frequently hammer wp-login.php with credentials baked into the URL, e.g. https://yoursite.com/wp-login.php?log=Ben&pwd=T3m. While enabled, any visit to the login page with credentials in the query string is refused with 403 Forbidden. All logins must use the normal login form.

Admin Login Alerts

Every time an administrator signs in, an email is sent with the username, the IP address they connected from, their browser, and the exact time. Legitimate admin logins are rare, so an alert for a login you didn’t make is an early warning that an account may be compromised. Alerts are on by default and go to the first administrator’s email address — you can point them at any address from the settings page.

Block Accounts

Block any account from logging in with a single click — the “Block login” action appears on the Users screen, and “Unblock login” restores it whenever you’re ready. A blocked account is refused at the login screen with a friendly message, and its existing sessions are ended immediately so it can’t stay signed in. Because the plugin is built around the first-administrator lock, it can also block administrator accounts: any administrator can block a non-admin account, while only the first administrator can block another administrator. The first administrator’s own account can never be blocked, so you can’t lock yourself out of the site.

Every attempt to sign in as a blocked account is logged — username, IP address, browser and time — on the EDZNET Guard settings page, so you can see who keeps trying.

Plugin Audit and Unverified Plugin Blocking

A common way into a WordPress site is to sign in with a stolen password, upload a fake plugin as a ZIP file and activate it. These fake plugins often hide themselves from the Plugins screen and quietly inject scripts for visitors.

Security Guard checks every installed plugin against the official file checksums published by WordPress.org, so it knows whether each plugin is an untouched WordPress.org release, a WordPress.org plugin whose files have been changed, or something installed from elsewhere. It also scans plugin and must-use plugin code for high-risk techniques: running hidden or decoded code, running commands sent in a web request, loading code from a blockchain (“EtherHiding”), hiding plugins from the Plugins screen and heavy obfuscation.

  • New plugins that can’t be verified are blocked from activation until the site’s first administrator approves them in EDZNET Guard > Plugin audit, for example a premium plugin bought from its developer. The check runs before the plugin’s code is loaded, on the Plugins screen, through the REST API and through WP-CLI.
  • Plugins that were already installed are never blocked, only flagged, so turning the feature on can’t break a working site. EDZNET’s own plugins are exempt from the block too.
  • Plugins with high-risk code are always blocked until approved, and you are emailed as soon as one is found. The Plugins screen shows each plugin’s status, and a warning appears if a plugin is hidden from it.
  • An approval is re-flagged if the approved plugin’s code changes later.

The audit runs daily and whenever a plugin is activated, and can be run at any time from the Plugin audit screen. Blocking can be switched off (plugins are then only flagged) from the settings page.

Vulnerability Watch (with an EDZNET Geo API Pro key)

Most hacked WordPress sites are running a plugin with a vulnerability that was published weeks earlier, and a fix that was never installed. Vulnerability Watch checks the WordPress version, plugins and themes on your site against a database of known WordPress vulnerabilities, updated daily, and tells you what to fix first.

  • Severity first: each finding is rated critical, high, medium or low, with the version that fixes it, or a clear warning when there is no fix yet.
  • Checked twice a day and straight after every update, from EDZNET Guard > Vulnerability Watch. Affected plugins are also marked on the Plugins screen.
  • Email alerts for new critical and high-risk findings, sent to the same address as the other Security Guard alerts.
  • Site risk score (Low, Medium, High or Critical) combining known vulnerabilities with Security Guard’s own checks: the Plugin audit, two-factor login, waiting updates and the number of administrators. Also shown in a dashboard widget.

Vulnerability Watch comes with an EDZNET Geo API Pro key (https://edznet.io/api-services) and covers one site per key. If EDZNET Geolocation already has a Pro key, turning it on is one click. Without a key, you can choose to see a free count of the known vulnerabilities affecting your site. Nothing is sent until the first administrator turns one of them on; see External Services below.

First Administrator Lock

The same first-administrator lock applies to every setting in the plugin — including two-factor authentication — so a compromised admin account cannot quietly weaken the protections.

Comment Controls

The same first-administrator lock protects three comment tools:

  • Disable comments globally — turn commenting off site-wide with a single toggle. Comment forms disappear from the front end and newly published posts default to closed comments.
  • Force close comments — one click updates every existing post so comments and pingbacks are closed, without having to edit posts one by one.
  • Delete all pending comments — a danger action that permanently deletes every comment still awaiting moderation, without first marking each as spam or trashing it. Confirmation is required before it runs.

Front-end Content Tuning

Hide what you don’t want visitors to see, with each toggle independent of the others:

  • Hide post authors — removes the “by [author]” meta from your posts.
  • Hide post dates — removes publish dates from your posts.
  • Hide comment closed text — removes the “Comments are closed” / “Comments Off” wording that appears under posts where commenting is disabled.

These are quick front-end filters and CSS rules that work with most themes.

Go Further: EDZNET Geolocation

Security Guard pairs naturally with our EDZNET Geolocation plugin. Once installed, block whole countries or continents from your site’s pages, only allow logins from the countries you choose (login protection, Geolocation 1.6 or later), block individual IPs, and see where comments, logins and registrations come from — a useful layer on top of the protections here. Security Guard detects the plugin and links straight to its country-blocking screen. With both plugins active and a Geolocation API key set, admin login alert emails also show where the login came from (city, region, country and internet provider), so a sign-in from an unexpected country stands out straight away. You can grab it from WordPress.org: https://wordpress.org/plugins/edznet-geolocation/

The block, the alert, and the comment and content toggles are on/available by default and need no configuration after activation. Two-factor authentication is off by default — turn it on from the settings page (you’ll be prompted to set up your own code first).

Source Code

This plugin is distributed as complete, human-readable source. Every PHP, JavaScript and CSS file shipped in the plugin ZIP is the original source file — nothing is minified, compiled, obfuscated, transpiled or bundled, and there is no build step, package manager or build tool of any kind involved in producing a release. What you download is what was written.

Runtime CSS lives in css/ and runtime JavaScript in js/, both loaded through wp_enqueue_style() / wp_enqueue_script(). The only third-party file is the QR-code library credited below, which is also shipped as its original unminified source.

Third-Party Libraries

  • qrcode.js (js/qrcode.js) — by davidshimjs, based on the “QR Code for JavaScript” library by Kazuhiko Arase. Licensed under the MIT license. Upstream: https://github.com/davidshimjs/qrcodejs. Shipped unmodified and unminified; used to draw the TOTP enrollment QR code in the browser so that no secret ever leaves the site.

External Services

WordPress.org plugin checksums. To verify installed plugins, the plugin audit requests the published checksums for each installed plugin from WordPress.org: https://downloads.wordpress.org/plugin-checksums/<plugin-slug>/<version>.json. Only the plugin’s folder name (slug) and version number are sent, as part of the URL. No information about your site, its users or its visitors is sent. Requests are made when the audit runs (daily, when a plugin is activated, and when you click “Run audit now”), and results are cached. This service is provided by WordPress.org: terms https://wordpress.org/about/domains/ and privacy policy https://wordpress.org/about/privacy/.

Login locations (only with EDZNET Geolocation). If the separate EDZNET Geolocation plugin is active and configured, the IP address of an administrator who signs in is looked up through that plugin’s own geolocation service so the login alert can show its location. Security Guard makes no request of its own for this; see the EDZNET Geolocation plugin for details of that service. Without EDZNET Geolocation, no IP address is sent anywhere.

EDZNET Vulnerability Watch (only when you turn it on). This is EDZNET’s own service at edznet.io, used only after the first administrator turns on Vulnerability Watch or the free count on the EDZNET Guard > Vulnerability Watch screen.

  • Turning on Vulnerability Watch sends your Geo API Pro key, your site’s address, a random install ID and a one-time secret to https://edznet.io/api/guard/v1/activate. edznet.io then calls your site once at <your site>/?rest_route=/edznet-guard/v1/verify with a random challenge, and the plugin answers with a code made from that one-time secret. This confirms the request came from your site. The route answers only while an activation is in progress.
  • Each check sends your site’s address, its WordPress version, and the folder name (slug) and version number of each installed plugin and theme to https://edznet.io/api/guard/v1/check, with the site’s own token. Checks run twice a day, a minute after you install or update WordPress, a plugin or a theme, and when you click “Check now”.
  • The free count sends the same WordPress version and plugin and theme slugs and versions, without your site’s address, to https://edznet.io/api/guard/v1/summary once a day and when you click “Count again”.
  • Turning Vulnerability Watch off tells https://edznet.io/api/guard/v1/release to free the key.

No information about your users, visitors, content or settings is sent. The vulnerability data is provided to EDZNET by Wordfence Intelligence, and each finding shows its source and copyright notice. Terms: https://edznet.io/terms-of-service.php. Privacy policy: https://edznet.io/privacy-policy.php.

Two-factor codes are generated and verified entirely on your own server, and the QR code is drawn in the browser by the bundled qrcode.js.

Installation

  1. Upload the edznet-security-guard folder to /wp-content/plugins/.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. The protections are now active. Review them under EDZNET Guard in the admin menu.

FAQ

Which account can change the settings?

The site’s first administrator account — the user with the Administrator role and the earliest registration date (registration dates are not changed when an account is renamed). If that account is deleted, the lock moves to the next earliest-registered administrator.

My host manages my site. Can their account own the settings?

Yes. A managed-hosting tool can name its own administrator account as the owner with the edznet_guard_first_admin_id filter (only an existing administrator is accepted). Your own administrator account keeps working as normal; only the locked Security Guard settings are then changed by your host. EDZNET Hands-Off sites work this way.

I’m an admin but the settings are locked. Why?

Only the first administrator account can change these settings. This is intentional: a compromised admin account should not be able to disable the protections.

Can the first administrator create new admins?

Yes — temporarily disable “Block administrator creation”, create the account, then re-enable it.

Does this work with REST API or XML-RPC user creation?

Yes. The block is enforced at the core wp_insert_user() level, so admin-created users, REST API calls, and XML-RPC requests are all refused while the setting is enabled.

What triggers an admin login alert?

Any successful sign-in by a user with the Administrator role — including the first administrator. Each alert includes the username, display name, IP address, browser, the time of the login (with timezone) and whether a two-factor code was verified. Alerts are sent to the first administrator’s email unless you set a different address on the settings page.

On sites with several administrators, the wording depends on who signed in. When the alert is about your own login it says “If this was you, no action is needed”. When it is about another administrator it names them and explains how to check with them, block the account and reset its password if the login wasn’t expected.

How does two-factor authentication work?

Once enabled, an administrator enters their username and password as usual, then a 6-digit code from an authenticator app (Google Authenticator, Authy, 1Password, Microsoft Authenticator, and any other TOTP-compatible app). The code is generated from a secret that is only shown once, as a QR code or a text key, and verified server-side against that secret. Codes refresh every 30 seconds.

Where does an administrator set up two-factor authentication?

In their profile under “EDZNET Guard — Two-Factor Authentication”, or on the login page itself: an administrator who hasn’t set up 2FA yet is shown the enrollment screen at their next login instead of being signed straight in.

I lost my phone / authenticator app. How do I sign in?

The first administrator can open the administrator’s profile and reset (remove) their two-factor authentication, then they sign in again and set up a new secret. If the locked-out administrator IS the first administrator, the secret can be removed with one click from their own profile by an administrator who has already completed 2FA — or, if nobody can get in, the two-factor authentication can be turned off directly in the database by deleting the edznet_guard_2fa_enabled option.

What is Vulnerability Watch and what does it cost?

It checks the WordPress version, plugins and themes on your site against a database of known vulnerabilities and tells you what to fix. It comes with an EDZNET Geo API Pro key, which also covers geolocation lookups (https://edznet.io/api-services). Each key covers Vulnerability Watch on one site; the free count needs no key.

Does Vulnerability Watch work on a staging copy of my site?

No. A copy on another address is recognised as a copy and stops using the live site’s key, so your live site keeps being checked. Use a separate key for a staging site that needs its own checks.

How do I move Vulnerability Watch to another site?

Click “Turn off” on the old site, or release the key from your Geo API Pro service in the EDZNET client area, then turn it on on the new site. A key that hasn’t been used for 60 days is freed automatically.

Does this plugin offer geo-blocking?

Not built in — but it pairs with our EDZNET Geolocation plugin, which blocks whole countries or continents from your site’s pages, can limit logins to the countries you choose (wp-login.php, other login forms, XML-RPC and application passwords), blocks individual IPs, and shows where comments, logins and registrations come from. When Geolocation is active, Security Guard links straight to its country-blocking screen. Install it from WordPress.org.

How do I block a user from logging in?

On the Users screen, hover over a user and click Block login. The account is refused at the login screen and its existing sessions are ended. Click Unblock login (or the button on the EDZNET Guard settings page) to restore it at any time.

Can I block an administrator?

Yes. Any administrator can block a non-admin account; only the site’s first administrator can block another administrator. The first administrator’s own account can never be blocked, so the site owner can’t be locked out.

Can I see who tried to log in with a blocked account?

Yes. Every attempt is recorded on the EDZNET Guard settings page under Blocked login attempts — username, email, IP address, browser and time, newest first (up to the last 100).

Can I turn off the admin login alerts?

Yes. Untick “Email me when an administrator logs in” on the EDZNET Guard settings page. The toggle is locked to the first administrator like the other settings.

Who can use the comment controls?

Only the site’s first administrator. “Disable comments globally” is a protected setting, and the “Close commenting on all posts” and “Delete all pending comments” buttons are locked the same way so a compromised admin account cannot purge comments or weaken moderation.

Does disabling comments globally delete existing comments?

No. It only hides comment forms and makes new posts default to closed. To change existing posts, use “Close commenting on all posts”. To remove comments that are waiting for moderation, use “Delete all pending comments”.

How do the “hide author”, “hide date” and “hide comment closed text” toggles work?

They are front-end filters and CSS rules. Hidden content is removed from the markup the theme outputs, and a small stylesheet hides common author/date/comment-closed elements. Because themes structure their post meta differently, these are a best-effort helper for most themes rather than a guarantee for every theme.

Do the front-end toggles affect the admin?

No. Hiding post authors, dates and comment-closed text only affects the front end of the site. The admin screens always show full author and date information.

Changelog

1.7.2

  • New (for managed hosting): the edznet_guard_first_admin_id filter sets which administrator owns the protected settings (only an existing administrator, or super admin on multisite, is accepted), edznet_guard_locked_notice changes the “Settings locked” text so it can say who manages the site, and edznet_guard_allow_admin_grant lets trusted code give its own management account the Administrator role while “Block administrator creation” is on. Both are off unless something uses them; nothing changes for other sites.

1.7.1

  • Readme: EDZNET Geolocation 1.6 adds login protection (only allow logins from chosen countries), so the geo-blocking notes now mention it.
  • Readme: a Vulnerability Watch key can also be released from the Geo API Pro service in the EDZNET client area.

1.7.0

  • New: Vulnerability Watch (EDZNET Guard > Vulnerability Watch). With an EDZNET Geo API Pro key, Security Guard checks your WordPress version, plugins and themes against a database of known vulnerabilities, updated daily, twice a day and after every update. Findings show their severity and the version that fixes them, affected plugins are marked on the Plugins screen, and new critical and high-risk findings are emailed to you.
  • New: site risk score and dashboard widget, combining known vulnerabilities with the Plugin audit, two-factor login, waiting updates and the number of administrators.
  • New: without a key, an optional free count of the known vulnerabilities affecting your site.
  • Readme: EDZNET Geolocation blocks countries from your site’s pages; it does not block the login page by country, as the readme said before.

1.6.0

  • New: WordPress Multisite support. Network-activate the plugin and manage login protection, two-factor authentication, admin login alerts, blocked accounts and the Plugin audit from Network Admin. They are owned by the network’s first super admin, with one daily audit for the whole network. Comment and front-end settings stay on each site’s own page.
  • New: on a network, unverified plugins stay blocked for site administrators too, and 2FA and login alerts cover the administrators of every site, whichever site’s login page they use.
  • Fix: “Block administrator creation” now works. It never actually blocked new administrators before, because it checked a field WordPress doesn’t pass. It now blocks every way of granting the Administrator role (Users screens, REST API, WP-CLI and other plugins). If you need to add an administrator, the first administrator must turn the setting off first. Existing administrators are not affected.

1.5.3

  • Fix: old Elementor build files named after a widget (for example assets/js/accordion.d0e98fa492444fcce9f9.bundle.js) are now also recognised as leftovers from earlier versions, so they no longer mark the plugin as modified.

1.5.2

  • Fix: the Plugin audit no longer flags long encoded strings that are only data, such as the Unicode line-break table in html2canvas (bundled with Elementor Pro). A string is reported when it decodes or unpacks to readable code, or when the same file runs code built at runtime.
  • Fix: old JavaScript build files left behind by earlier updates (for example Elementor’s hashed assets/js/*.bundle.js files) no longer mark a plugin as modified. They are still scanned for risky code, and the audit lists how many there are.

1.5.1

  • Fix: deleting a plugin now clears its Plugin audit warning straight away. Before, the warning stayed on the Plugins screen and dashboard until the next audit ran. Installing or updating a plugin also re-checks it immediately.

1.5.0

  • New: plugin audit. Every plugin is checked against WordPress.org’s published file checksums and scanned for high-risk code (hidden or decoded code, commands from web requests, blockchain-loaded scripts, plugins that hide themselves, obfuscation). Results are on the new EDZNET Guard > Plugin audit screen and on the Plugins screen.
  • New: plugins that can’t be verified against WordPress.org are blocked from activation until the first administrator approves them. Plugins installed before this version, and EDZNET plugins, are only flagged, never blocked. Plugins with high-risk code are always blocked until approved, and the alert address is emailed when one is found.
  • New: with EDZNET Geolocation active, admin login alerts show the location and internet provider of the IP address.

1.4.4

  • Fix: admin notices from other plugins (for example review or upgrade prompts) were displayed inside the EDZNET Security Guard settings page header. They now appear below it.

1.4.3

  • Improved: admin login alert emails are now worded for multi-administrator sites. An alert about another administrator names them and explains how to confirm the login with them, block the account and reset its password, instead of telling the recipient “If this was you, no action is needed”. Alerts about your own login keep the “if this was you” wording.
  • Improved: login alerts now show the time with its timezone and whether the sign-in was verified with a two-factor code.
  • New: refreshed settings page with a branded header, a status bar and settings grouped into cards (Login protection, Two-factor authentication, Comments, Front-end content).
  • Tweak: the “Delete all pending comments” confirmation moved from an inline onsubmit attribute into the enqueued js/admin.js.

1.4.2

  • Removed the site-wide “EDZNET Geolocation” admin notice. The companion-plugin recommendation now appears only on the plugin’s own EDZNET Guard settings page, so no other admin screen is touched.
  • All admin and login-screen CSS moved out of PHP into css/admin.css and css/login.css, and all JavaScript into js/qr-init.js and js/profile-2fa.js, loaded via wp_enqueue_style() / wp_enqueue_script(). No inline style attributes remain in the plugin’s markup.
  • Hardening: every admin_post handler (block/unblock account, clear blocked-login log, two-factor setup/removal) now verifies the nonce first and then re-checks current_user_can( 'manage_options' ) explicitly, instead of relying only on the first-administrator identity check.
  • The Users-screen notices are now gated on the list_users capability.
  • Documented in the readme that the plugin ships complete unminified source with no build step, credited the bundled MIT-licensed qrcode.js library, and stated explicitly that the plugin contacts no external service.

1.4.1

  • Security and UI fixes.

1.4.0

  • Added two-factor authentication for administrators (TOTP / RFC 6238, works with Google Authenticator, Authy, 1Password and more). QR-code or text-key enrollment from the profile or the login page, optional “require for all admins”, “force new admins to enroll”, and “force enrollment on next login” toggles. Locked to the first administrator.
  • Added account blocking: “Block login” / “Unblock login” row actions on the Users screen, able to block administrator accounts (first administrator only), with immediate session termination and a log of every attempted sign-in by blocked accounts.
  • Added a recommendation for the companion EDZNET Geolocation plugin (geo-blocking by country and visitor tracking), with direct links to its blocking screen once it’s installed.

1.3.0

  • Added admin login alerts: emails the first administrator (or a custom address) with the username, IP address, browser and time whenever an administrator signs in. On by default, locked to the first administrator.

1.2.0

  • Added front-end content tuning: “Hide post authors”, “Hide post dates” and “Hide comment closed text” toggles, each independent and locked to the first administrator.

1.1.0

  • Added “Disable comments globally” toggle (hides front-end comment forms, new posts default to closed).
  • Added “Close commenting on all posts” bulk action.
  • Added “Delete all pending comments” danger action. All comment controls are locked to the first administrator.

1.0.0

  • Initial release. Blocks creation/promotion of administrator accounts and refuses login attempts that pass credentials through the URL. Settings locked to the site’s first administrator.