=== Blaminhor Essentials – All-in-One: SEO, Cache, SMTP & More ===
Contributors: blaminhor
Tags: seo, cache, smtp, backup, cookies
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 2.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

All-in-one: SEO, cache, SMTP, backup, cookie banner, redirections, broken links, duplicator, and more. 21 modules in one lightweight plugin.

== Description ==

**One plugin to replace twenty. Free forever.**

I was tired of my WordPress installs looking like a graveyard of single-purpose plugins — one for SEO, one for cache, one for SMTP, one for redirects, one for backups. Each one with its own dashboard, its own upsell banners, its own freemium dance. So I built Blaminhor Essentials.

**Why this plugin exists:**

*   **Every WordPress essential under one roof.** SEO, cache, SMTP, backup, cookie banner, redirections, broken links, duplicator, database optimizer, domain changer, fatal error recovery, favicon, HTTPS redirect, hide login, image sizes, maintenance mode, mute core emails, post types order, user role editor, classic editor, disable comments. Switch on what you use today; the rest stays out of your way until the day you need it.
*   **No tax for what you don't use.** Each module is independent: an inactive one loads no PHP, registers no hooks, enqueues no assets, runs no queries. You're only paying — in memory and milliseconds — for the features you actually turned on.
*   **Replaces what you already have.** SEO, cache, SMTP, backup, cookie banner, redirections, duplicator, user role editor, and a dozen more — the kind of dedicated plugins you've stacked one by one over the years, now in a single coherent toolkit. Built-in importers for Yoast, Rank Math, All in One SEO, WP Mail SMTP, Post SMTP, Easy WP SMTP, Redirection, and Safe Redirect Manager — your existing data comes with you.
*   **Free.** All features above are free. No tracking, no telemetry.
*   **Translated in 12 languages.** English, French, German, Spanish, Italian, Portuguese (PT & BR), Japanese, Russian, Turkish, Dutch, Indonesian.
*   **You can email me anytime.** `hi+wp@blaminhor.com`

**Available Features:**

= Cache & Performance =
Full performance stack: page cache, asset optimization, lazy load, audit, and Web Vitals dashboard.

*   **Page Cache**: Disk-based static cache with smart invalidation on content updates. WooCommerce cart, checkout, and my-account pages auto-excluded.
*   **Critical CSS**: Above-the-fold CSS extracted automatically per template (Page, Article, Archive, Home), works behind a CDN.
*   **PageSpeed Audit**: Run a Google PageSpeed Insights audit directly from the dashboard, with actionable recommendations that link straight to the right setting.

= SEO/GEO =
Complete SEO toolkit: meta tags, indexing control, social sharing, and XML sitemaps.

*   **Meta Tags & SERP Preview**: Manage SEO titles, descriptions, and focus keywords per content, with desktop/tablet/mobile preview of the Google result.
*   **XML Sitemaps**: Auto-generated sitemaps with optional Google Images support, and granular indexing control per content type.
*   **Import**: Migrate SEO data from Yoast SEO, Rank Math, or All in One SEO.

= Cookie Banner =
Self-hosted consent banner with automatic blocking of tracking scripts and embeds.

*   **Automatic Blocking**: Detects and blocks third-party scripts (Google Analytics, Meta Pixel, Hotjar, etc.) and embeds (YouTube, Vimeo, Maps) until the visitor consents.
*   **Compliance Presets**: One-click rules for GDPR, CCPA, LGPD, APPI, KVKK, POPIA, DPDP and other jurisdictions. Google Consent Mode v2 and IAB TCF v2.2 supported.
*   **Consent Log**: Every visitor choice recorded in a private table for GDPR Art.7 proof of consent. Records older than 13 months are deleted automatically.

= Backup & Restore =
Complete backup and restore solution with scheduling and external file support.

*   **Separate Archives**: Each component (database, plugins, themes, uploads) is saved as a separate archive for flexibility.
*   **Scheduled Backups**: Daily, weekly, or monthly with retention, plus automatic backup before WordPress core, plugin, or theme updates.
*   **Pre-Restore Safety**: Automatic backup created before any restore operation, with one-click undo.

= SMTP Mailer =
Reliable email delivery with multi-relay fallback.

*   **12+ Providers**: Preset configs for Brevo, SendGrid, Mailgun, AWS SES, Postmark, SparkPost, Mailjet, SMTP2GO, Elastic Email, Gmail, Outlook, Zoho, and custom SMTP.
*   **Relay Fallback**: Define multiple relays. If the primary fails, it automatically tries the next one.
*   **Import**: Migrate settings from WP Mail SMTP, Post SMTP, or Easy WP SMTP.

= Redirections 301 =
Manage 301 redirections with simple rules or regex patterns.

*   **Simple Redirects & Regex**: Create basic URL redirects or advanced regex patterns, with per-rule toggle and hit counter.
*   **Slug Change Detection**: Get notified when a post or taxonomy slug changes to add a redirect in one click.
*   **Import Options**: Import from CSV or from other plugins (Redirection, Safe Redirect Manager).

= Broken Links Checker =
Keep your site healthy by finding dead links.

*   **Deep Scan**: Scans posts, pages, and custom post types for both internal and external broken URLs.
*   **Real-Time Results**: View scan progress and broken links as they are found, batched to prevent server timeouts.
*   **Smart Management**: Recheck individual links, edit the source post, or dismiss false positives.

= Content Duplicator =
Duplicate posts, pages, and custom post types with precision.

*   **Complete Copy**: Duplicates content, excerpt, parent, template, menu order, and all custom fields, taxonomies and child posts.
*   **Smart Options**: Choose new status (draft, publish, private), copy author, date, and comments.
*   **Admin Integration**: 'Duplicate' links in list view, edit screen, and admin bar. Bulk duplication and taxonomy duplication supported.

= Database Optimizer =
Optimize and clean your WordPress database for better performance.

*   **Overview Dashboard**: See database size, overhead, and items to clean at a glance.
*   **Smart Cleanup**: Remove post revisions, auto-drafts, trashed posts, spam comments, expired transients, and orphaned meta.
*   **Scheduled Cleanup**: Daily, twice daily, or weekly schedule, with configurable revisions per post and pre-cleanup backup prompt.

= Domain Changer =
Change your site domain and update all database references in one click.

*   **One-Click Migration**: Update all database references to the new domain automatically, including serialized data in options and post meta.
*   **Preview Changes**: See how many rows will be affected before making changes, with database-backup prompt before applying.
*   **Change History**: Track previous domain changes with timestamps.

= Fatal Error Recovery =
Recover from fatal errors without FTP access.

*   **Recovery Interface**: Access a standalone page to manage plugins when your site is down; deactivation goes through the database (files remain intact).
*   **Smart Detection**: Identifies which plugin caused the error from the stack trace.
*   **Secure Access & Email**: Secret recovery URL prevents unauthorized access, with optional email notification on detected errors.

= Hide Login Page =
Protect your login page from bots and brute force attacks.

*   **Custom Login URL**: Replace wp-login.php with a custom URL of your choice.
*   **Block Direct Access**: Blocks access to wp-login.php and wp-admin for non-logged-in users, with custom redirect target (e.g. a 404 page).
*   **Safety First**: Module disabled by default. Compatible with Fatal Error Recovery for lockout prevention.

= HTTPS Redirect =
Force secure connections for your entire site.

*   **Automatic Redirect**: All HTTP requests redirected to HTTPS with a 301 permanent redirect, including wp-admin and wp-login.php.
*   **Mixed Content Fix**: Optionally fix HTTP URLs in page output to prevent browser warnings.
*   **HSTS Support**: Enable HTTP Strict Transport Security header with configurable max-age.

= Image Sizes =
Take control of your media library and disk space.

*   **Disable Sizes**: Prevent WordPress, themes, and plugins from generating unused thumbnail sizes, with disk-space cleanup of the obsolete files.
*   **Custom Sizes**: Register new image sizes with exact crop settings directly from the UI.
*   **Regenerate Thumbnails**: Re-create thumbnails for existing images after changing settings.

= Favicon Generator =
One image, perfect branding everywhere.

*   **Universal Support**: Generates PNG icons (16, 32, 48), Apple Touch Icon (180), Android Chrome (192, 512), and Windows Tiles.
*   **Manifest & Config**: Automatically serves `site.webmanifest` and `browserconfig.xml`, with configurable theme and background colors.
*   **Simple**: Upload one high-res square image (512x512+), and we handle the rest.

= Maintenance Mode =
Simple, effective Coming Soon and Maintenance pages.

*   **Two Modes**: Choose between "Maintenance" (503 Service Unavailable) or "Coming Soon" (200 OK).
*   **Access Control**: Whitelist user roles (e.g., Administrators) or specific IP addresses, with optional login link for restricted users.
*   **Customization**: Set headline, message, background color, and text color.

= User Role Editor =
Full control over user roles and capabilities.

*   **Role Management**: Create, clone, rename, and delete custom roles, with one-click reset to WordPress defaults.
*   **Capability Editor**: Visual interface to assign or remove capabilities per role, with human-readable labels.
*   **Per-User Capabilities**: Grant or revoke capabilities for individual users beyond their role; import/export roles as JSON.

= Post Types Order =
Reorder any post type or taxonomy with drag and drop.

*   **Drag & Drop**: Intuitive sortable list to reorder posts, pages, and custom post types.
*   **Taxonomy Support**: Reorder categories, tags, and custom taxonomies with auto-sort applied on the frontend.
*   **Capability Control**: Choose which user role can reorder items (Administrator, Editor, or Author).

= Classic Editor & Widgets =
Restore the classic editor and/or classic widgets independently.

*   **Classic Editor**: Disables the Block Editor (Gutenberg) and restores the traditional TinyMCE editor.
*   **Classic Widgets**: Disables the block-based Widgets editor and restores the classic Widgets screen.
*   **Independent Toggles**: Enable or disable each feature independently, and remove block library CSS from frontend.

= Disable Comments =
Kill comment spam by removing the comment system entirely.

*   **Site-wide Disable**: Disable comments on posts, pages, and custom post types in one click.
*   **Hide from Admin**: Remove the Comments menu, the Discussion settings, and comment-related dashboard widgets.
*   **Reversible**: Toggle off the module to instantly restore native WordPress comments without data loss.

= Mute Core Emails =
Silence automatic emails from WordPress.

*   **Auto-Updates**: Mute email notifications after automatic core, plugin, or theme updates.
*   **User & Comment Emails**: Control emails for new user registration, password/email changes, and comment notification/moderation.
*   **Granular Control**: Enable or disable each email type individually; system recovery-mode emails are kept on by default.

== Installation ==

1. Upload the `blaminhor-essentials` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to "Blaminhor Essentials" in the admin menu.
4. Turn on the features you need.

== WP-CLI Commands ==

Every module is fully configurable from the command line through the `wp blaminhor ...` namespace — useful for scripts, CI/CD, fixtures, and AI assistants like Claude Code or Cursor. The CLI delegates to the same validation pipeline as the admin UI, so settings stay consistent.

Discover the full command tree:

`wp help blaminhor`
`wp help blaminhor <subcommand>`

Lifecycle:

`wp blaminhor info`
`wp blaminhor modules list [--active-only|--inactive-only] [--category=<slug>]`
`wp blaminhor modules activate <module-id>`
`wp blaminhor modules deactivate <module-id> [--yes]`

A few examples per module (full reference: see the bundled `llms.txt`):

* SMTP: `wp blaminhor smtp add-relay --name=Gmail --host=smtp.gmail.com --port=587 --encryption=tls --from-email=hello@example.com`, `wp blaminhor smtp test --to=admin@example.com`
* Redirections: `wp blaminhor redirections add --source=/old --target=/new`, `wp blaminhor redirections list --search=/blog`
* SEO/GEO: `wp blaminhor seo set --sitemap-enabled=true --ai-block-chatgpt=true`, `wp blaminhor seo list-urls`
* Maintenance: `wp blaminhor maintenance enable --headline="Be right back"`, `wp blaminhor maintenance disable`
* HTTPS Redirect: `wp blaminhor https-redirect enable --hsts=true`
* Database Optimizer: `wp blaminhor db-optimizer scan`, `wp blaminhor db-optimizer clean --tasks=revisions,spam_comments`
* Cache: `wp blaminhor cache purge`, `wp blaminhor cache status`
* Backup: `wp blaminhor backup list`, `wp blaminhor backup delete <prefix> --yes`

All listing commands accept `--format=table|json|csv|yaml|count|ids` for scripting. Mutating commands require `--user=<admin-login>` for the capability check. Sensitive values (SMTP passwords, recovery keys) are never printed in cleartext.

The Backup module exposes `list` and `delete` only — creating and restoring a backup remain admin-only, where the stepped AJAX flow avoids PHP timeouts and the pre-restore safety net runs.

== Frequently Asked Questions ==

= Will activating all features slow down my site? =
No. Each module only loads its code when activated. Disabled modules have zero impact on performance.

= Can I replace multiple plugins with this one? =
Yes, that's the main goal. Blaminhor Essentials can replace Redirection, Yoast/Rank Math, WP Mail SMTP, UpdraftPlus, Duplicate Post, User Role Editor, and many others.

= How do I migrate my data from other plugins? =
Several modules include import features:
- **SMTP**: Import from WP Mail SMTP, Post SMTP, Easy WP SMTP
- **SEO**: Import from Yoast SEO, Rank Math, All in One SEO
- **Redirections**: Import from Redirection plugin, Safe Redirect Manager, or CSV

= Can I backup my entire site? =
Yes. The Backup module creates separate archives for database, plugins, themes, and uploads. You can schedule automatic backups (daily, weekly, monthly) and set retention limits.

= What happens if a backup restore goes wrong? =
The plugin automatically creates a safety backup before any restore. If something goes wrong, you can undo with one click.

= Does the SMTP module support multiple providers? =
Yes. You can configure multiple relays with automatic fallback. If the primary fails, it tries the next one in your list.

= Can I duplicate Elementor/Divi pages? =
Yes. The Content Duplicator fully supports all major page builders including Elementor, Divi, Beaver Builder, Brizy, and Oxygen.

= Will SEO data be lost if I switch from Yoast or Rank Math? =
No. Use the import feature in the SEO module to migrate your titles, descriptions, and keywords before switching.

= Can I control which user roles can access certain features? =
Yes. For example, the Post Types Order module lets you choose which roles can reorder content (Administrator, Editor, or Author).

= What if my site crashes after a plugin update? =
The Fatal Error Recovery module detects PHP fatal errors and provides a secret recovery URL to deactivate problematic plugins without FTP access.

= Does the plugin work with multisite? =
Most modules work on individual sites within a multisite network. Since version 1.7.1, backup files (Backup, Domain Changer, DB Optimizer) are stored in separate subdirectories per site, so backups are fully isolated. Full network-level administration is not yet supported.

= How can I get support? =
Email hi+wp@blaminhor.com or visit [wp.blaminhor.com](https://wp.blaminhor.com/). You can also use the feedback form on the plugin dashboard.

== Screenshots ==

1. Modular dashboard – Enable only the features you need with instant toggle activation.
2. SMTP Mailer – Configure multiple relays with automatic fallback and detailed logging.
3. SEO/GEO – Edit meta titles and descriptions with live mobile and desktop SERP preview.
4. Backup – Select components to backup (database, plugins, themes, uploads) with scheduling.
5. Database Optimizer – Overview of database size with one-click optimization actions.
6. Fatal Error Recovery – Detect PHP fatal errors and recover without FTP access.
7. Image Sizes – Manage all registered thumbnail sizes and disable unused ones.
8. User Role Editor – Edit capabilities per role with search, add/clone roles, and per-user overrides.

== Changelog ==

= 2.0.2 =
* Fixed: Cache & Performance - Clear button on per-template Critical CSS rows is now a standard secondary button, visually consistent with the adjacent Generate button.
* Updated: Core - Dashboard vertical spacing tightened so the header, search bar and category grid stay compactly aligned on a single 16px rhythm.

= 2.0.1 =
* Updated: Core - Button corners now match the WordPress 7 native style (2px radius) for a tighter, more familiar look across every module.

= 2.0.0 =
* Improved: Core - Plugin redesigned across all 21 modules on a unified visual grammar aligned with WordPress 7: buttons, fields, tables, tabs and notices share the same look.
* Improved: Core - Full WCAG 2.1 AA accessibility: keyboard navigation, screen-reader support (ARIA), focus rings on every interactive element and reduced-motion support.
* Improved: Core - Codebase modernised on PHP 8.1 with strict types, enums and value objects for tighter security and faster execution.
* Improved: Core - Save bar at top and bottom of every module shows the unsaved-changes count and offers one-click Cancel and Save.
* Improved: Core - Redesigned tab bar (per-tab unsaved-changes dot, Alt+1..9 keyboard shortcuts), and tabs persist in the URL for reloads and shared links.
* Improved: Core - Dashboard loads faster with a lighter stylesheet footprint, and module pages follow your WordPress admin colour scheme.
* Added: Core - Optional 'Alerts & quick actions' dashboard widget that surfaces module alerts and exposes shortcut buttons on the WP dashboard (off by default).
* Improved: SEO/GEO - Content Overview redesigned with stat cards, filters, search, pagination, bulk actions (indexed/noindex/clear meta) and a new 'All indexed types' view.
* Improved: Cookie Banner - GDPR Article 7 personal-data exporters and erasers added for privacy-rights requests.
* Improved: Broken Links - Scan terminal prefixes each line with a status icon (success/warning/error) for clearer reading.
* Fixed: Core - Security hardening: Domain Changer SQL injection during migration, Backup filename injection on downloads, Cache & Performance POST input handling.
* Fixed: Core - Localisation gaps closed: Backup list dates, SEO/GEO archive date placeholder and Broken Links result counts now follow the active language (singular/plural).

Older entries (versions 1.0.0 to 1.11.0) are archived in `changelog.txt` shipped with the plugin.

== Upgrade Notice ==

= 2.0.2 =
Patch: cleaner Critical CSS Clear button, tighter Dashboard spacing on a single 16px rhythm, and a "What's new" panel that stays on the v2.0 highlights across patches. Safe to install.

= 2.0.1 =
Patch: tighter WordPress 7-style button corners across all 21 modules. Cosmetic refinement, safe to install.

= 2.0.0 =
v2 is here, and it's my biggest overhaul yet: I rebuilt the plugin from scratch on PHP 8 (safer, faster), with an interface that builds on WordPress 7 but modernises everything for an accessible, end-to-end consistent experience. I hope you'll love it!

== Privacy Policy ==

Blaminhor Essentials does not collect any personal data. The SMTP Mailer feature stores email metadata locally if logging is enabled, but this data stays on your server.

== Third Party Services ==

This plugin allows you to optionally configure connections to external SMTP services for email delivery. **No data is sent to any external service unless you explicitly configure an SMTP relay.**

When you configure the SMTP Mailer module, your emails will be sent through the service you choose. The following services have preset configurations available: Gmail, Microsoft Outlook/Office 365, Brevo (formerly Sendinblue), SendGrid, Mailgun, Amazon SES, Postmark, Elastic Email, SparkPost, Mailjet, SMTP2GO, Zoho Mail.

You can also configure any other SMTP server using the "Other" option. Please review the privacy policy of any third-party service you choose to use.


== Support ==

For support or feedback, email me at **hi+wp@blaminhor.com** or visit **[https://wp.blaminhor.com/](https://wp.blaminhor.com/)**.
