Guide to WHM Plugins

Introduction

WHM plugins add new functionality to the WHM interface.Third-party developers can add icons that link to new WHM interfaces, or to other files or locations, to the WHM Plugins interface (Home >> Plugins).

Note:

For information about cPanel plugins, read our Guide to cPanel Plugins documentation.

Plugin development workflow

When you create a WHM plugin, we recommend the following workflow:

  1. Create your custom application (the plugin's backend code).

  2. Create the plugin's interfaces.

    Note:

    You may also wish to create a package extension for your plugin. Package extensions add custom fields to packages and accounts. These fields can accept customized non-standard variables that you can use in your WHM plugin.

  3. Use the AppConfig system to register your plugin with the WHM interface.
  4. Compress your plugin's files for distribution. The compressed file contains the application source files, the plugin registration file, and an installation script. For example:
    • /var/cpanel/apps/example.conf — The configuration file.
    • /usr/local/cpanel/whostmgr/docroot/cgi/example — The file that contains the backend code from step 1.
    • /usr/local/cpanel/whostmgr/docroot/addon_plugins/ — The .jpg icon image file.
    • /usr/local/cpanel/whostmgr/docroot/templates/ — The plugin interface directory.  
       

      Note:

      We recommend that you compress your plugin's files as a tarball (.tar.gz) file, which makes the plugins easier to distribute.

Plugin files

WHM interfaces can include HTML, Template Toolkit, PHP, or CGI files. You must store plugin interface files in the/usr/local/cpanel/whostmgr/docroot/templates/ directory.

WHM icons

When you register your plugin, the AppConfig configuration file automatically adds your plugin's icon to the WHM interface.

  • WHM icons must be 25x25 pixels.
  • Image files must be .gif or .jpeg images.
  • Images must possess white backgrounds, and cannot be transparent.
  • 20 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....