Skip to content

This WordPress plugin connects WHM to your site via the WHM API to display server stats, website lists, and individual site uptime/downtime. Users can add or remove sites, including external ones, and view all data in a dashboard with shortcode support and incident notifications.

Notifications You must be signed in to change notification settings

blackat5445/whm-info-wordpress-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖥️ WHM Info (Servers OverWatch)

License: GPL v2 Version WordPress Bootstrap PRs Welcome

🚀 A powerful WordPress plugin for monitoring and managing WHM servers with elegant dashboards

FeaturesInstallationUsageDocumentationContributing


Maintained by Kasra Falahati Sponsored by Agenzia Magma

www.kasra.euagenziamagma.it


📋 Table of Contents


🌟 Overview

WHM Info (Servers OverWatch) is a comprehensive WordPress plugin that seamlessly connects to your WHM (Web Host Manager) server infrastructure and provides real-time monitoring, elegant dashboards, and powerful management tools. Built with modern web technologies and a focus on user experience, this plugin transforms server monitoring into a beautiful, intuitive experience.

🎯 Key Highlights

  • 🔐 Secure WHM API Integration - Direct connection to your WHM server with encrypted credentials
  • 📊 Real-time Monitoring - Live server statistics and website status tracking
  • 🎨 Beautiful UI - Modern, animated interface built with Bootstrap 5 (primary color: #075b63)
  • 📱 Responsive Design - Perfect display on all devices and screen sizes
  • 🔔 Smart Notifications - Automated email alerts for server and website issues
  • 📈 Historical Data - Track performance trends over time with interactive Chart.js visualizations
  • 🎭 Dual Dashboards - Public status page and private admin dashboard
  • Performance Optimized - Conditional asset loading and efficient caching
  • 🎨 Brand Customization - White-label capabilities with custom branding
  • 🔌 WHM Info Connect - Child plugin for deep WordPress site inspection

✨ Features

🖥️ Server Management

  • ✅ Real-time server status monitoring
  • ✅ CPU, bandwidth, and disk usage tracking
  • ✅ Automated health checks every 15 minutes (configurable)
  • ✅ Historical performance data with Chart.js visualization
  • ✅ Server uptime tracking
  • ✅ Apache status monitoring
  • ✅ MySQL information tracking
  • ✅ SSL certificate information

🌐 Website Monitoring

  • Direct Connected Websites - Automatic monitoring of all WHM accounts
  • Indirect Connected Websites - Manual addition of external sites
  • ✅ Individual website status tracking with response time
  • ✅ Enable/disable monitoring per website
  • ✅ Custom website naming and organization
  • ✅ Disk usage and resource monitoring
  • ✅ Connection status tracking (activated/not activated)
  • ✅ Site detail pages with WordPress metadata (when WHM Info Connect is installed)

🎨 User Interface

  • ✅ Bootstrap 5 framework for consistent design
  • ✅ Material Design Icons (MDI) integration
  • ✅ Animate.css for smooth animations
  • ✅ SweetAlert2 for beautiful dialogs
  • ✅ Toastr notifications for user feedback
  • ✅ Responsive tables with search, sort, and pagination
  • ✅ Mobile-optimized layouts

🔧 Administration

  • ✅ Intuitive settings interface with tabbed navigation
  • ✅ WHM API configuration with connection testing
  • ✅ Direct and indirect website management
  • ✅ Binoculars API for child plugin communication
  • ✅ Notification settings and email preferences
  • ✅ Personal branding customization (logo, favicon, colors)
  • ✅ Maintenance news management system

📊 Dashboards

  • Public Dashboard - [whmin_public_dashboard] - Status page for clients
  • Private Dashboard - [whmin_private_dashboard] - Admin-only detailed view
  • ✅ Interactive charts and graphs
  • ✅ Filterable and sortable data tables
  • ✅ Real-time status indicators

🔔 Notifications

  • ✅ Email notifications for status changes
  • ✅ Customizable notification preferences
  • ✅ Test notification functionality
  • ✅ Multiple recipient support
  • ✅ Status change tracking and alerts

💻 Requirements

  • WordPress: 5.8 or higher
  • PHP: 7.4 or higher
  • WHM Access: Valid WHM server with API access
  • MySQL: 5.7 or higher (or MariaDB equivalent)
  • Server: Apache or Nginx with mod_rewrite enabled

Recommended

  • PHP 8.0 or higher for optimal performance
  • HTTPS/SSL certificate for secure API communication
  • Dedicated hosting or VPS for production use

📦 Installation

Method 1: Upload via WordPress Admin

  1. Download the latest release ZIP file
  2. Navigate to WordPress Admin → Plugins → Add New
  3. Click Upload Plugin button
  4. Choose the whm-info.x.x.x.zip file
  5. Click Install Now
  6. Click Activate Plugin

Method 2: Manual Installation

  1. Download and extract the plugin ZIP file
  2. Upload the whm-info folder to /wp-content/plugins/
  3. Navigate to WordPress Admin → Plugins
  4. Find "WHM Info" and click Activate

Method 3: Development Installation

# Clone the repository
git clone https://github.com/blackat5445/whm-info-wordpress-plugin.git

# Navigate to WordPress plugins directory
cd /path/to/wordpress/wp-content/plugins/

# Copy or symlink the plugin
ln -s /path/to/whm-info whm-info

# Activate via WP-CLI (optional)
wp plugin activate whm-info

Post-Installation Setup

  1. Navigate to WHM INFO → Settings
  2. Configure your WHM API credentials
  3. Test the connection
  4. Configure notification preferences
  5. Add your websites to monitor
  6. Create pages with shortcodes for dashboards

📁 Project Structure

whm-info/
│
├── 📄 whm-info.php                 # Main plugin file & bootstrap
├── 📄 README.md                    # This file
├── 📄 .gitignore                   # Git ignore rules
├── 📄 build.bat                    # Windows build script
│
├── 📂 includes/                    # Core plugin logic
│   ├── 📄 class-whm-info.php      # Main plugin class (core initialization)
│   │
│   ├── 📂 api/                    # API Integration
│   │   └── 📄 whm-api.php         # WHM API connection & methods
│   │
│   ├── 📂 functions/              # Business Logic Functions
│   │   ├── 📄 server-status.php          # Server monitoring functions
│   │   ├── 📄 sites-status.php           # Website status checks
│   │   ├── 📄 private-sites-status.php   # Private monitoring logic
│   │   ├── 📄 email.php                  # Email notification system
│   │   ├── 📄 maintenance-news.php       # Maintenance news management
│   │   ├── 📄 site-meta.php              # Site metadata handling
│   │   └── 📄 site-detail-page.php       # Site detail page rendering
│   │
│   ├── 📂 shortcodes/             # Frontend Display
│   │   ├── 📂 public/
│   │   │   └── 📄 dashboard.php          # [whmin_public_dashboard]
│   │   └── 📂 private/
│   │       └── 📄 dashboard.php          # [whmin_private_dashboard]
│   │
│   ├── 📂 settings/               # Admin Configuration
│   │   ├── 📄 api-settings.php           # WHM API & Binoculars API configuration
│   │   ├── 📄 direct-connected-websites.php   # Direct sites management
│   │   ├── 📄 in-direct-connected-websites.php # Indirect sites management
│   │   ├── 📄 sites-settings.php         # General site settings
│   │   ├── 📄 public-settings.php        # Public dashboard settings
│   │   ├── 📄 private-settings.php       # Private dashboard settings
│   │   ├── 📄 notification-settings.php  # Alert configuration
│   │   └── 📄 personal-branding.php      # Branding customization
│   │
│   └── 📂 util/                   # Utility Functions
│       └── 📄 uninstall-confirm.php      # Safe uninstall handler
│
├── 📂 templates/                  # HTML Templates
│   ├── 📄 settings.php                   # Admin settings page
│   ├── 📄 about.php                      # About page
│   ├── 📄 site-detail.php                # Site detail page template
│   ├── 📄 email-status-notification.php  # Email notification template
│   ├── 📂 admin/
│   │   ├── 📄 info-whm-connect.php      # WHM Info Connect page
│   │   ├── 📄 direct-connected-websites.php
│   │   ├── 📄 in-direct-connected-websites.php
│   │   └── ... (other admin templates)
│   ├── 📂 public/
│   │   └── 📄 public-dashboard.php      # Public dashboard template
│   └── 📂 private/
│       └── 📄 private-dashboard.php     # Private dashboard template
│
├── 📂 assets/                     # Frontend Assets
│   ├── 📂 admin/                  # Admin Area Assets
│   │   ├── 📂 css/
│   │   │   └── 📄 admin.css              # Admin styles (Bootstrap-based)
│   │   └── 📂 js/
│   │       ├── 📄 admin.js               # Core admin scripts
│   │       ├── 📄 admin-api-settings.js  # API settings functionality
│   │       ├── 📄 admin-direct-connected.js # Direct sites management
│   │       ├── 📄 admin-in-direct-connected.js # Indirect sites
│   │       ├── 📄 admin-notification-settings.js # Notifications
│   │       └── 📄 admin-personal-branding.js # Branding controls
│   │
│   ├── 📂 public/                 # Public Frontend Assets
│   │   ├── 📂 css/
│   │   │   └── 📄 public.css             # Public dashboard styles
│   │   └── 📂 js/
│   │       └── 📄 public.js              # Public dashboard scripts & charts
│   │
│   ├── 📂 private/                # Private Frontend Assets
│   │   ├── 📂 css/
│   │   │   └── 📄 private.css            # Private dashboard styles
│   │   └── 📂 js/
│   │       └── 📄 private.js             # Private dashboard scripts
│   │
│   └── 📂 vendor/                 # Third-party Libraries
│       └── 📂 bootstrap/
│           ├── 📂 css/
│           │   └── 📄 bootstrap.min.css
│           └── 📂 js/
│               └── 📄 bootstrap.bundle.min.js
│
├── 📂 Child-plugin/               # WHM Info Connect Child Plugin
│   └── 📄 whm-info-connect.zip           # Downloadable child plugin
│
├── 📂 languages/                  # Internationalization
│   └── 📄 whmin.pot                      # Translation template
│
└── 📂 dist/                       # Build Output (not in repository)
    └── 📄 whm-info.x.x.x.zip             # Packaged plugin releases

🎯 Architecture Principles

  • Function-Based: All core logic uses functions, not classes (as per requirements)
  • Modular Design: Each feature in its own file for maintainability
  • Separation of Concerns: Clear division between API, logic, UI, and settings
  • Template System: All HTML in dedicated template files under templates/
  • Asset Optimization: Conditional loading based on page context
  • Scalability: Easy to add new features, APIs, and monitoring types
  • Primary Color: #075b63 used throughout for consistent branding

🚀 Usage

Basic Setup

  1. Configure WHM API

    • Go to WHM INFO → Settings → API Settings
    • Enter your WHM server hostname (e.g., server.example.com)
    • Provide API token and username
    • Click Test Connection
    • Save settings
  2. Configure Binoculars API (Optional - for WHM Info Connect)

    • Enable Binoculars API in API Settings
    • Generate and save API token
    • Copy the API URL and token for use in child plugins
  3. Add Websites to Monitor

    • Direct Connected: Automatically detected from WHM
    • Indirect Connected: Manually add external websites
    • Enable/disable monitoring for each site as needed
  4. Create Dashboard Pages

    Public Status Page:  [whmin_public_dashboard]
    Private Admin View:  [whmin_private_dashboard]
    
  5. Configure Notifications

    • Set email addresses for alerts
    • Choose notification preferences
    • Test notification system

📝 Shortcodes

Public Dashboard

[whmin_public_dashboard]

Displays a beautiful public-facing status page showing:

  • Overall server status
  • Individual website statuses
  • Historical uptime data
  • Interactive charts
  • Custom branding

Permissions: Accessible to all visitors


Private Dashboard

[whmin_private_dashboard]

Displays a comprehensive admin dashboard with:

  • Detailed server metrics (CPU, bandwidth, disk usage)
  • Individual website statistics
  • Resource usage graphs
  • Connection status indicators
  • Full monitoring data
  • Apache, MySQL, and SSL information

Permissions: Requires manage_options capability (admin only)


⚙️ Configuration

WHM API Settings

Navigate to WHM INFO → Settings → API Settings

Setting Description Required
WHM Hostname Your WHM server hostname (e.g., server.example.com) ✅ Yes
API Token WHM API token ✅ Yes
Username WHM root username ✅ Yes
Port WHM port (default: 2087) Optional
SSL Verify Verify SSL certificates Recommended

Binoculars API Settings

Setting Description
Enable API Enable/disable the Binoculars API for child plugins
API Token Generated token for authentication
API URL REST API endpoint URL

Website Management

Direct Connected Websites

Automatically synced from your WHM server:

  • Enable/disable monitoring per site
  • Customize display names
  • View resource usage
  • Track suspension status
  • View connection status (agent installed)
  • Search, sort, and filter websites

Indirect Connected Websites

Manually add external sites:

  • Custom website name
  • Website URL
  • Hosting provider selection
  • Connection type (Standard API or Without API)
  • Enable/disable monitoring
  • Manual or automatic status checking

Notification Settings

Configure alert preferences:

  • Email Recipients: Multiple email addresses
  • Notification Types: Status change alerts
  • Test Notifications: Send test emails to verify configuration
  • Email Templates: HTML email notifications with status details

Dashboard Settings

Public Dashboard Settings

  • Enable Server Graph: Show/hide historical uptime chart
  • Enable Hosted Counter: Display count of hosted websites
  • Enable Managed Counter: Display count of managed websites

Private Dashboard Settings

  • Site Status Check Interval: Configure how often to check site status (in minutes)
  • Request Timeout: Set timeout for HTTP requests (in seconds)

Personal Branding

White-label the plugin interface:

  • Custom Logo: Upload your company logo
  • Favicon: Custom favicon for status pages
  • Company Name: Display name in headers
  • Footer Text: Custom footer message

🔌 WHM Info Connect

WHM Info Connect is a companion child plugin that extends monitoring capabilities by providing detailed WordPress metadata from each monitored site.

Features

  • Sends WordPress core version information
  • Reports active theme details
  • Lists all active plugins with versions
  • Provides PHP version and server information
  • Communicates securely via Binoculars API

Installation

  1. Go to WHM INFO → WHM Info Connect
  2. Download the whm-info-connect.zip file
  3. Install on target WordPress sites
  4. Configure API URL and token
  5. Activate the connection

Benefits

  • Deep Site Inspection: View WordPress metadata directly in WHM Info
  • Version Tracking: Monitor WordPress, PHP, theme, and plugin versions
  • Centralized Management: All site information in one dashboard
  • Security Monitoring: Track outdated software across all sites

🔌 API Integration

WHM API Connection

The plugin uses the WHM API v1 for secure communication:

// Example: Fetching server status
$status = whmin_get_server_status();

// Example: Getting website list
$websites = whmin_get_whm_accounts();

// Example: Checking specific site
$site_info = whmin_get_site_details($username);

Binoculars API Endpoints

GET  /wp-json/whmin/v1/status
GET  /wp-json/whmin/v1/server-info
POST /wp-json/whmin/v1/activate-connection

Cron Jobs

  • Event: whmin_status_check_event
  • Frequency: Every 15 minutes (default)
  • Function: whmin_check_and_log_statuses()
  • Purpose: Automated status checking and logging

🎨 Customization

Custom Styling

Override default styles by enqueueing your CSS:

function my_custom_whm_styles() {
    wp_enqueue_style(
        'my-whm-custom',
        get_stylesheet_directory_uri() . '/whm-custom.css',
        array('whmin-public-css'),
        '1.0.0'
    );
}
add_action('wp_enqueue_scripts', 'my_custom_whm_styles', 20);

Modify Color Scheme

The primary color #075b63 is used throughout. To change:

  1. Via Admin: WHM INFO → Settings → Personal Branding
  2. Via Code: Override CSS variables
:root {
    --whmin-primary: #075b63;
    --whmin-primary-dark: #054854;
    --whmin-primary-light: #096d77;
}

Custom Templates

Override templates in your theme:

your-theme/
└── whm-info/
    ├── public-dashboard.php
    └── private-dashboard.php

Filters & Actions

// Modify server status display
add_filter('whmin_server_status', 'my_custom_status', 10, 1);

// Add custom notification recipients
add_filter('whmin_notification_emails', 'my_custom_emails', 10, 1);

// Customize dashboard data
add_filter('whmin_dashboard_data', 'my_dashboard_modifier', 10, 2);

// Modify WHM API timeout
add_filter('whmin_whm_api_timeout', function($timeout) { return 10; });

🤝 Contributing

We welcome contributions from the community! Here's how you can help:

Reporting Issues

🐛 Found a Bug?

  • Check existing Issues
  • Create a new issue with detailed description
  • Include WordPress version, PHP version, and steps to reproduce

Suggesting Features

💡 Have an Idea?

  • Open a feature request issue
  • Describe the use case and expected behavior
  • Explain how it benefits users

Code Contributions

  1. Fork the Repository

    git clone https://github.com/yourusername/whm-info.git
    cd whm-info
  2. Create a Feature Branch

    git checkout -b feature/your-feature-name
  3. Make Your Changes

    • Follow WordPress coding standards
    • Use function-based approach (not class-based for business logic)
    • Comment your code
    • Test thoroughly
  4. Commit Your Changes

    git add .
    git commit -m "Add: Your feature description"
  5. Push and Create Pull Request

    git push origin feature/your-feature-name

Coding Standards

  • Follow WordPress Coding Standards
  • Use function-based approach (not class-based for business logic)
  • Add PHPDoc comments for all functions
  • Test with PHP 7.4+ and WordPress 5.8+
  • Ensure Bootstrap compatibility
  • Keep primary color scheme #075b63
  • Place templates in templates/ directory
  • Use Material Design Icons for UI elements

📜 License

GNU General Public License v2.0

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

📄 Full License Text


👏 Credits

Development Team

Kasra Falahati
Lead Developer
🌐 Website💻 GitHub

Sponsored By

Agenzia Magma
Agenzia Magma - Digital Innovation Partner
🌐 agenziamagma.it

Technologies Used

Special Thanks

  • WordPress community for excellent documentation
  • Bootstrap team for the incredible framework
  • All contributors and testers
  • The open-source community

🆘 Support

Documentation

📚 Full Documentation: GitHub Wiki

Community Support

💬 Get Help:

Professional Support

For premium support, custom development, or enterprise solutions:

📧 Email: Contact via website
🌐 Website: www.kasra.eu
🏢 Agency: agenziamagma.it


📊 Project Status

Aspect Status
Development 🟢 Active
Version 1.1.0
WordPress Compatibility 5.8+
PHP Compatibility 7.4+
Production Ready ✅ Yes
Documentation ✅ Complete

🗺️ Roadmap

Version 1.2.0 (Planned)

  • Multi-language support (Italian, English, Spanish)
  • Advanced filtering and search capabilities
  • Export data to CSV/PDF
  • Telegram notifications integration

Version 1.3.0 (Planned)

  • cPanel API integration
  • Plesk API integration
  • Advanced analytics dashboard
  • Custom report builder
  • Mobile app companion

📈 Stats & Metrics

GitHub stars GitHub forks GitHub watchers

GitHub issues GitHub closed issues GitHub pull requests


💙 Made with love by Kasra Falahati

🏢 Proudly sponsored by Agenzia Magma


If you find this plugin helpful, please consider:

  • ⭐ Starring the repository
  • 🐛 Reporting issues
  • 💡 Suggesting features
  • 🤝 Contributing code
  • Buying me a coffee

Last Updated: November 7, 2025

License: GPL v2

About

This WordPress plugin connects WHM to your site via the WHM API to display server stats, website lists, and individual site uptime/downtime. Users can add or remove sites, including external ones, and view all data in a dashboard with shortcode support and incident notifications.

Resources

Stars

Watchers

Forks

Packages

No packages published