Introduction

AuthGuard is a powerful WordPress Login Page Customizer that lets you fully redesign the wp-login page, register form, and forgot password screen while enhancing security and user experience. Transform your default WordPress login into a professional, branded experience.

Built with modern PHP architecture and React for the admin interface, AuthGuard provides comprehensive customization options coupled with robust security features to protect your site from unauthorized access.

Visual Customizer

Full control over login page design including backgrounds, logos, forms, and buttons.

Security Suite

2FA, login limiting, CAPTCHA, and custom login URLs for enhanced protection.

Developer Friendly

PSR-4 architecture, REST API, WP-CLI commands, and extensive hooks.

Requirements

Before installing, ensure your environment meets the following requirements:

WordPress ≥ 5.8 PHP ≥ 7.4 MySQL 5.6+ Node.js ≥ 18 (for development)

AuthGuard requires PHP 7.4 or higher with the following extensions: mbstring, json, openssl, and mysqli. For development, Node.js and npm are required to build assets.

WordPress Install

The easiest way to install AuthGuard is through the WordPress admin panel. Navigate to Plugins → Add New, search for "AuthGuard", and click Install Now. Alternatively, upload the plugin zip file manually.

# Extract the plugin to wp-content/plugins/AuthGuard wp plugin install AuthGuard.zip --activate

Composer

For development or custom installations, install via Composer to handle PHP dependencies automatically.

# Install dependencies composer install # Install and build JavaScript assets npm install npm run build

Background

Customize the login page background with color, images, gradients, or video backgrounds. Add overlay effects and glass morphism for modern designs. Backgrounds support all standard CSS properties.

// Background options include: type: 'color' | 'image' | 'gradient' | 'video' overlay: string // CSS color value image: { url: string, position: string, size: string, repeat: string } video: string // Video URL (supports YouTube and local files)

Form Styling

Comprehensive form customization including wrapper styling, positioning, background, borders, padding, and glass effects. Support for left, right, and center alignment.

Fields

Customize input fields with full control over width, height, padding, margin, background, border, border-radius, and box-shadow. Typography options for labels and placeholders.

Button

Style the submit button with normal, hover, and active states. Control background color, text color, padding, margin, border, border-radius, box-shadow, and text-shadow.

Other Options

Additional customization options for login page behavior and elements:

Disable Remember Me Disable Lost Password Disable Registration Disable Back to Site Login by Username/Email/Both Registration with Password

Two-Factor Authentication

Add an extra layer of security with email-based two-factor authentication. Users receive a 6-digit verification code via email after successful password authentication. Codes expire after 5 minutes.

// 2FA Configuration code_ttl: 300 // seconds (5 minutes) max_attempts: 5 bypass_admins: false // Require 2FA for all users including admins

Features include detailed logging of all 2FA events, resend code functionality, and brute force protection with attempt limiting.

Limit Login Attempts

Protect against brute force attacks by limiting login attempts per IP address. Configure number of allowed attempts and lockout duration. IP and email blacklists provide additional protection.

Attempt Limiting IP Blacklist Email Blacklist CIDR Notation Custom Lockout Message Disable XML-RPC

Hide Login Page

Hide the default wp-login.php and wp-admin URLs from unauthorized users. Redirect guests to a custom login URL or show a 404 page. Prevents automated bots from finding your login page.

// Custom login URL example https://example.com/secret-login // Default URLs are hidden/redirected https://example.com/wp-login.php → 404 https://example.com/wp-admin → 404

Math Captcha

Add simple math-based captcha challenges to login, registration, and password reset forms. Prevent automated submissions while maintaining accessibility.

Login Redirects

Control where users are redirected after successful login based on their role. Configure separate redirects for administrators, editors, authors, contributors, and subscribers. Default redirects can be set globally.

// Role-based redirect example Administrator: https://example.com/wp-admin Editor: https://example.com/wp-admin/post-new.php Subscriber: https://example.com/my-account

Auto Login

Enable automatic login functionality for specific scenarios such as email verification links or one-time access tokens. Useful for password reset flows and temporary user access.

Architecture

AuthGuard follows PSR-4 autoloading standards with a modular, service-oriented architecture. The plugin is organized into distinct namespaces for maintainability and extensibility.

includes/ ├── Admin/ // Admin interface classes ├── API/ // REST API endpoints ├── CLI/ // WP-CLI commands ├── Core/ // Core functionality ├── Helpers/ // Utility functions ├── Hook/ // Action and filter hooks ├── Public/ // Frontend functionality ├── Services/ // Feature services ├── Plugin.php // Main plugin class └── UserMeta.php // User meta handling

REST Endpoints

AuthGuard exposes REST API endpoints for settings management and plugin functionality. All endpoints are prefixed with /AuthGuard/v1.

GET /AuthGuard/v1/settings → Get plugin settings POST /AuthGuard/v1/settings → Update plugin settings GET /AuthGuard/v1/logs/2fa → Get 2FA logs POST /AuthGuard/v1/import → Import settings GET /AuthGuard/v1/export → Export settings

AJAX Actions

Admin and public AJAX actions for dynamic functionality without page reloads.

// Admin AJAX (requires authentication) wp_ajax_AuthGuard_ajax_callback // Public AJAX (no authentication) wp_ajax_nopriv_AuthGuard_ajax_callback // 2FA verification admin_post_verify_email_2fa admin_post_resend_email_2fa

Hooks & Filters

Extensive hook system for customizing plugin behavior without modifying core files.

login_body_class login_headerurl login_form_defaults authenticate registration_errors wp_new_user_notification_email

Changelog

v1.0.0 — Initial release with login customizer, 2FA authentication, login limiting, hide login, math captcha, auto login, import/export, and comprehensive settings.