Customize the WHM Interface with CSS
Posted by Allura on 17 01 2019.
There are various ways to customize the WHM interface with CSS, namely:
- Create a new theme directory
- Create the CSS files
- Apply the new WHM theme
Create a New Theme Directory
- Firstly, on the command line, one needs to SSH in to the server on which one wishes to create the theme.
- Then one needs to create the /usr/local/cpanel/whostmgr/docroot/themes/themename/ directory, where themename will represent the desired theme name.
It is to note that WHM’s Theme Manager interface (WHM >> Home >> Themes >> Theme Manager) can be used to upload themes. With this interface, theme can be developed in any location and then uploaded before applying the theme.
Create the CSS Files
In order to create and modify the following CSS files in the new directory, one can use the preferred text editor. The files are:
- css — File customizing the WHM interface’s left navigation menu.
- css — File customizing the WHM interface’s main content area for some and not all, of WHM’s interfaces.
Note that the system will apply this CSS over WHM’s existing theme style sheets automatically.
Apply the new WHM Theme
Use either of the methods to work.
- Firstly, one needs to log in to WHM as the root user.
In that case, one must keep in mind to log in to the server as the root user so as to customize the WHM theme.
- One can use WHM’s Theme Manager interface ( WHM >> Home >> Themes >> Theme Manager ) to upload the theme, if still not developed the theme on the server.
- One can navigate to WHM’s Change WebHost Manager® Theme interface ( WHM >> Home >> Themes >> Change WebHost Manager® Theme ).
- To view the theme, one can click on the magnifying glass icon.
- Lastly, click on Switch to theme.
One can run this command in order to set the new customized link via the command line:
echo ‘themename’ > ~/.whmtheme
Here, themename will represent the new theme’s name.
There are three ways to work on, in order to customize the WHM interface with CSS. Applying the new WHM theme involves two methods, either of which can be used to get the desired result. All these ways are outlined broadly in this article.