Customize WHM Search for Your Users

Overview

You can add custom search keywords to WHM to let users find plugins more easily.

Find the plugins that support custom WHM search keywords

To find the plugins that support custom WHM search keywords, perform the following steps:

  1. Connect to the server with SSH as the root user.
  2. Run the following command: ls /var/cpanel/apps. The server will return a list of your server’s plugins. The list will resemble the following example:
    1cpanel-wp-toolkit.conf  imunify-antivirus.conf  whm-360-monitoring.conf  whm-wp-toolkit-api.conf  whm-wp-toolkit.conf 

You can add custom WHM search keywords to any plugin that does not start with cpanel. For example, you can add custom WHM search keywords to the whm-wp-toolkit.conf file to let users find WP Toolkit more easily, but not the cpanel-wp-toolkit.conf file.

Add a custom WHM search keyword

To add a custom search keyword to a WHM plugin, first ensure the plugin supports keywords. Then, perform the following steps:

  1. Connect to the server with SSH as the root user.
  2. Open the plugin’s .conf file with your preferred text editor.
  3. Add a new section to the bottom of the file with the searchtext option. This option lets you add custom search keywords as follows, where example is the custom search keyword:
    1# Search text
    2
    3searchtext=example
  4. Save your changes and exit the text editor.
  5. Use the command line interface to run the following command:
    1   rm -f /var/cpanel/pluginscache.yaml; /usr/local/cpanel/3rdparty/perl/536/bin/perl -MWhostmgr::Plugins -E 'Whostmgr::Plugins->plugins_data' 
    2   
    This removes the plugins cache so that the system will reload it with your new search keywords.
  6. Refresh your WHM browser window.

You will now be able to search for the WHM plugin with your custom keyword.

Remove a custom WHM search keyword

To remove a custom search keyword, perform the following steps:

  1. Connect to the server with SSH as the root user.
  2. Open the plugin’s .conf file with your preferred text editor.
  3. Delete the custom keyword you no longer want to use from the .conf file. If the custom keyword you want to remove is the only keyword in the .conf file, you must remove the searchtext option as well.
  4. Save your changes and exit the text editor.
  5. Use the command line interface to run the following command:
    1   rm -f /var/cpanel/pluginscache.yaml; /usr/local/cpanel/3rdparty/perl/536/bin/perl -MWhostmgr::Plugins -E 'Whostmgr::Plugins->plugins_data' 
    2   
    This removes the plugins cache so that the system will reload it without the keyword you removed.
  6. Refresh your WHM browser window.

You will no longer be able to use the removed custom keyword to search for the plugin in WHM.