Introduction

This tutorial creates a custom cPanel style and applies it to the cPanel or Webmail interfaces.

Create a custom cPanel style




Create a new directory for the new style.

Create the directory that will contain your style's styles.css file and its images and other assets.

To create a directory from the command line, run the following command, where mystyle represents your style's name:

mkdir mystyle


This tutorial moves the directory to the correct location in step 5. However, if you wish, you can create the directory in the appropriate location as part of step 1. 



 


 



Create the styles.css file.

Create the styles.css file within the directory that you just created. Use your preferred text editor to add the desired CSS code to the file.

This tutorial uses the styles.css file. However, in cPanel & WHM version 60 and later, you can also choose to use a minified styles.min.css file. We strongly recommend that you include both the styles.css and styles.min.css files.



 


 



Add custom icons.

You can replace the cPanel interface's default icons with custom icons for your style.

For additional information about icon requirements, read our Guide to cPanel Interface Customization - Custom Icons and Logos documentation. 



 


 



Add a preview image.


 


 



Move the style directory to the appropriate location on the server.

In cPanel & WHM version 60 and later, you can skip steps 5 through 7 of this tutorial. Instead, compress the style directory as a .tar.gz file, and then use WHM's Customization interface (WHM >> Home >> cPanel >> Customization) to upload and apply the style.

Use the mv command to move your style's directory to the appropriate location on the server:


 


 



Apply the style.

Use the appropriate method to apply the style to one or more cPanel accounts on the server:


 


 



If the style includes custom icons, run the sprite_generator utility.

After you apply a style that uses custom icons, run the following command, where mystyle represents the style name:

/usr/local/cpanel/bin/sprite_generator --theme paper_lantern --style mystyle

The /usr/local/cpanel/bin/sprite_generator utility integrates your icons into the new icon set.


 


 



Troubleshoot custom styles.

If you experience problems after you apply a custom style, read our Troubleshoot Custom Styles documentation.