WHM plugins work in adding the system administrator level functionality to cPanel and WHM users. This tutorial is applicable only for cPanel and WHM version 66 and later.
One can create one’s own plugin’s backend code. In that case one can use the preferred programming language to write one’s own plugin’s backend code.
One must add appropriate Access Control List (ACL) checks, if the plugin’s functionality requires specific permissions.
Provide one or more interfaces in order to allow WHM users to access your plugin within the WHM interface.
One can read our Guide to WHM Plugins – Interfaces documentation to gather more information.
One can also read our Create a New WHM Interface in Template Toolkit and Create a New WHM Interface in PHP tutorials to get an idea about the steps in creating a basic WHM interface.
One can include an installation script with the help of these WHM plugins.
To add an installation script, these actions are to be performed:
Note that AppConfig registration does not search for or run installation scripts automatically. The system administrators must decompress the files and run the installation script manually whenever they will install plugins.
One can read our Guide to WHM Plugins – Installation Scripts documentation to gather information on Bash installation script.
While providing an uninstallation script, one must be sure of removing the plugin’s icon, files, and directories, and then unregister the plugin with AppConfig.
Make sure that the installation script store your plugin’s icon in the /usr/local/cpanel/whostmgr/docroot/addon_plugins/ directory.
You can run your plugin’s installation script and ensure the correct and proper plugin functions.
To get an idea about how to troubleshoot the common WHM plugin development issues, we recommend to read our Guide to Testing Custom Code documentation.
WHM plugin usages and ways of working are outlined vividly in this article.