When setting up a server you may want to arrange the groups of features within cPanel in a particular order.
Maybe you value email actions over databases and want to have the email features at the top of cPanel when a user logs in to cPanel.
That order is saved in the following location of each user's home directory.
To set the custom order you will need to log in to an existing cPanel account. Then arrange the feature group layout however you would like. To do this you can click and drag the dark blue bar above the group of features you want to move. This will create the xmaingroupsorder and xmainrollstatus files in the user's home directory. Now you have a template you can use for other accounts.
Here is an example of each file:
# cat xmaingroupsorder
# cat xmainrollstatus
How can I set the order for new accounts?
To automatically add custom files to new accounts you will use the skeleton directory. The contents of the skeleton directory will be copied to any new user's home directory during creation.
For accounts owned by the root user, the skeleton directory is located here:
For a reseller, it would be found here: (update reseller with the actual reseller username)
For more details on the skeleton directory please see our documentation.
Now we need to add the .cpanel/nvdata directories to the skeleton directory. You can use this command to create the directory structure:
mkdir -pv /root/cpanel3-skel/.cpanel/.nvdata/
Now you are ready to place the xmainrollstatus and xmaingroupsorder files in the skeleton directory.
The following commands will copy the files from an existing user to the skeleton directory.
cp /home/username/.cpanel/.nvdata/xmainrollstatus /root/cpanel3-skel/.cpanel/.nvdata/xmainrollstatus
cp /home/username/.cpanel/.nvdata/xmaingroupsorder /root/cpanel3-skel/.cpanel/.nvdata/xmaingroupsorder
How can I set the order for existing accounts?
You could copy the xmaingroupsorder and xmainrollstatus files to each user's home directory, but that would override any existing order they have already set up on their own.
A better way to change the feature order for existing accounts is to use the API call. Please be sure to update "username" with the actual cPanel username.
To see the current configuration the following API call would be used:
uapi --user=username NVData get names='xmaingroupsorder|xmainrollstatus'
To change the configuration you would use the following API call:
uapi --user=username NVData set names='xmaingroupsorder|xmainrollstatus' xmaingroupsorder='databases|files|domains|email|metrics|security|software|advanced|preferences' xmainrollstatus=''
The following documentation will contain additional information for the API calls.