Getting Started with cPanel/WHM

Published on: Mon, Oct 26, 2015 at 5:11 pm EST
Linux Guides Server Apps cPanel

cPanel/WHM is a very powerful system when used correctly. Vultr offers One-Click cPanel so you can simply deploy a server with cPanel pre-installed, which includes a license. In this guide, I'll go over some common actions performed in cPanel.

Changing the server hostname

The cPanel server hostname can be changed from the command line. cPanel requires the hostname is an FQDN (fully qualified domain name), and that it is registered with a registrar, otherwise cPanel/WHM won't function properly.

The hostname can be changed with the following command:

/usr/local/cpanel/bin/set_hostname YourHostname

For example:

/usr/local/cpanel/bin/set_hostname cpanel01.example.com

After changing the hostname, cPanel will update it in most configurations, and restart a number of services such as MySQL.

Installing a cPanel theme

There are cPanel themes on the web that can improve the design of your cPanel and make it more attractive. cPanel themes can be installed from WHM so that your clients can use them. In WHM, go to the "Themes" section and click "Theme Manager". Click "Manage Themes" under the cPanel logo. You can now upload a .tar file for your theme:

cpanel_1.png

Themes are purchased from 3rd-party companies, and can be applied per user or group.

Updating your cPanel/WHM license

If you have to update the license your cPanel/WHM installation uses because you're getting an error that says your license is invalid, simply execute:

/usr/local/cpanel/cpkeyclt

This will update the cPanel license by contacting their servers. Then try again.

Common Paths

  • Web directory: /home/name/public_html
  • PHP directory: /usr/bin/php
  • MySQL directory: /var/lib/mysql
  • Perl directory: /usr/bin/perl
  • Ruby directory: /usr/lib/ruby/
  • Apache log: /usr/local/apache/logs/error_log

Want to contribute ?

You could earn up to $300 by adding new articles