Guide to cPanel Interface Customization - Apply Styles

Introduction

For a style to display for a particular user in the cPanel interface, you must apply the style. Some methods to apply a style also require specific permissions on the server.

For example, to apply a style as the server-wide default cPanel style, you must have root access to the server.

Important:

After you apply a style that includes custom icons, you must run the /usr/local/cpanel/bin/sprite_generator utility to integrate the new icons. 

Apply a style

Styles on cPanel servers exist in two categories:

  • Default style — The style that cPanel accounts default to, if the users have not selected a current style
    • The root user sets the server's default style.
    • Resellers can set a default style for the accounts that they own.
  • Current style — A style that the cPanel user or reseller has selected to use for an account, instead of the default style.

Apply to the server as the default style

 

To apply a style as the server's default style, perform the following steps:

  1. Log in to the server via SSH as the root user. 
  2. Run the following command, where path_to_style represents the absolute path to the style that you wish to apply:

    ln -s path_to_style /var/cpanel/customizations/styled/default_style

    For example, to apply the/var/cpanel/customizations/styled/mystyle/styles.css style, run the following command:

    ln -s /var/cpanel/customizations/styled/mystyle/styles.css /var/cpanel/customizations/styled/default_style

 

Apply to a reseller's accounts as the default style

 

To apply a style to all of a reseller's accounts as the default style, perform the following steps:

  1. Log in to cPanel as the reseller. 
  2. Navigate to cPanel's Change Style interface (Home >> Preferences >> Change Style).
  3. Click Set as Default for the desired style.

 

Apply to a single user's account as the current style

 

To apply a style to a specific account through the cPanel interface, perform the following steps:

  1. Log in to cPanel as the desired user. 
  2. Navigate to cPanel's Change Style interface (Home >> Preferences >> Change Style).
  3. Click Apply for the desired style.

To apply a style to a specific account through the command line, perform the following steps:

  1. Log in to the server via SSH. 
  2. Run the following command, where username represents the cPanel account's username, and path_to_style represents the absolute path to the style that you wish to apply:

    ln -s path_to_style /home/username/var/cpanel/styled/current_style

    For example, to apply the/var/cpanel/customizations/styled/mystyle/styles.css style, run the following command:

    ln -s /var/cpanel/customizations/styled/mystyle/styles.css /home/username/var/cpanel/styled/current_style

 

Note:

To apply a style as the current style for every account on the server, create a script to run this command for each user. When you create this script, you may wish to use the WHM API 1 listaccts function to retrieve a list of the server's accounts. 

  • 0 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....