Installing and Configuring cPanel on Your Server
Installing and Configuring cPanel on Your Server

How to Install and Configure cPanel on Your Server (2026 Guide)

How to install cPanel & WHM on a VPS or dedicated server: what you need first, the install command, the WHM setup wizard, and the security, update and backup settings to configure next.

cPanel & WHM is the control panel most shared hosting companies run, and you can install it on your own VPS or dedicated server too. WHM (Web Host Manager) is the server-level admin panel, and cPanel is the panel each hosting account gets. Installing it is mostly one command, but the preparation and the first configuration steps decide whether the server is reliable and secure.

This guide covers what you need before you start, how to install cPanel in 2026, and the WHM settings to configure straight after.

The Short Answer

StepWhat to do
1. Check the serverA fresh, supported Linux install (AlmaLinux, Rocky Linux, CloudLinux, or Ubuntu LTS), a public IP, root SSH access
2. Set a hostnameA fully qualified hostname such as server.example.com
3. Run the installercd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
4. Finish setup in WHMOpen https://your-server-ip:2087, accept the license, set contact email, nameservers and resolvers
5. Secure and maintainFirewall, cPHulk, AutoSSL, automatic updates, backups
CostA paid license is needed; new installs get a 15-day trial

If you only need to host a few of your own WordPress sites, a free panel or managed hosting may be a better fit. cPanel makes the most sense when you host many accounts or need the same setup your clients already know.

What You Need Before Installing

  • A dedicated server or VPS. cPanel needs the whole server, so don’t install it on a machine already running other panels or web servers.
  • A fresh, supported operating system. cPanel publishes a list of supported versions of AlmaLinux, Rocky Linux, CloudLinux, and Ubuntu LTS, with separate system requirement pages for each. Check that list for your exact version before you order the server. Install the minimal OS image and nothing else.
  • Enough RAM and disk. cPanel lists minimum and recommended RAM and disk space per operating system. Treat the minimum as the floor for a test server, not a production one. WordPress sites, email, and backups all need room.
  • A public IPv4 address. cPanel’s licensing checks the server’s IP. Servers behind NAT or on a local-only network need extra setup or won’t license.
  • Root SSH access. You run the installer as root.
  • A hostname. Use a fully qualified domain name, such as server.example.com, that points to the server’s IP. It should not be the same as a website domain you plan to host.
  • A license plan. cPanel is commercial software, priced by the number of accounts. A new installation can use a 15-day trial, but you need a paid license to keep using it.

Step 1: Connect to the Server and Update It

Log in as root over SSH:

ssh root@your-server-ip

Update the operating system packages before you install anything. On AlmaLinux, Rocky Linux, or CloudLinux:

dnf -y update

On Ubuntu:

apt update && apt -y upgrade

Reboot if the update installed a new kernel.

Step 2: Set the Hostname

Set the hostname to your fully qualified name:

hostnamectl set-hostname server.example.com

Then create a DNS A record for server.example.com that points to the server’s IP. WHM can also change the hostname later under Networking Setup > Change Hostname.

Step 3: Run the cPanel Installer

Start the installer with the command from cPanel’s installation guide:

cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

The installer checks the system, installs the web server, database server, mail, DNS, and the cPanel software. It usually takes a while, so run it inside screen or tmux if your SSH connection might drop. When it finishes, it prints the WHM address.

Step 4: Complete the Initial WHM Setup

Open WHM in your browser at https://your-server-ip:2087. The certificate warning on first visit is expected, because the server is still using a self-signed certificate. Log in as root.

The setup wizard asks you to:

  1. Accept the license agreement and start the trial if you don’t have a license yet.
  2. Enter a contact email address for server alerts. Use one you actually read.
  3. Set the nameservers. If the server will handle DNS for your sites, use names such as ns1.example.com and ns2.example.com, and register them as glue records at your domain registrar. If you use external DNS, such as your registrar or Cloudflare, you can leave DNS hosting to them.
  4. Check the networking settings, including the hostname and DNS resolvers.

Step 5: Secure the Server

Do these before you create any hosting accounts:

  • Firewall. Allow only the ports you use, such as SSH, HTTP/HTTPS, mail, DNS, and the cPanel and WHM ports (2083 and 2087). cPanel’s documentation lists the ports each service needs.
  • SSH. Log in with SSH keys, disable password login for root, and consider a non-default SSH port.
  • cPHulk Brute Force Protection. Turn it on in WHM to block repeated failed logins.
  • Security Advisor. Run WHM’s Security Advisor and work through its recommendations.
  • AutoSSL. Make sure AutoSSL is enabled so every domain on the server gets a free certificate. Also install a certificate for the server hostname, so WHM and webmail stop showing warnings.
  • Two-factor authentication. Turn it on for root and for reseller and cPanel users.

For WordPress-specific hardening, see our WordPress security best practices.

Step 6: Configure Updates and Backups

  • Updates. In Update Preferences, choose an update tier and keep automatic updates on. Operating system and cPanel security fixes matter more than new features.
  • Backups. In Backup Configuration, turn on scheduled backups and store them off the server, for example on a remote FTP, SFTP, or S3-compatible destination. A backup on the same disk won’t help if the server fails. Our guide on how to back up a WordPress site explains why off-site copies matter.
  • PHP versions. Use MultiPHP Manager to set a current PHP version as the default and per account. See how to update the PHP version in WordPress.

Step 7: Create Packages and Accounts

  1. In Add a Package, set limits for disk space, bandwidth, email accounts, databases, and addon domains.
  2. In Create a New Account, enter the domain, username, password, contact email, and package.
  3. Point the domain to the server, either through your nameservers or with an A record at your DNS provider.
  4. Log in to the new cPanel account and install WordPress. Our guide on how to install WordPress on cPanel covers both the one-click and manual methods.

If you’re moving existing sites, WHM’s Transfer Tool can copy accounts from another cPanel server. For single WordPress sites, see how to migrate a WordPress site to a new host.

Troubleshooting Common Problems

  • The installer stops early. The OS version isn’t supported, or the server isn’t a fresh install. Reinstall a minimal supported image and run it again.
  • WHM doesn’t load on port 2087. A firewall at the server or at your cloud provider is blocking the port.
  • License errors. The server’s public IP doesn’t match the license, or the server is behind NAT. Check the IP in WHM and with your license provider.
  • Sites don’t resolve. The domain’s nameservers or A record don’t point to the server yet, or the glue records for your own nameservers are missing.
  • Emails go to spam. Set up SPF, DKIM, and a matching reverse DNS (PTR) record for the server IP. WHM’s Email Deliverability tool checks SPF and DKIM for each domain.

Common Mistakes

  • Installing on a server with other software. cPanel expects to manage the web, mail, and DNS services itself.
  • Using a website domain as the hostname. Use a dedicated subdomain like server.example.com.
  • Skipping off-site backups. Most server disasters are disk failures or account mistakes, and only off-site copies survive them.
  • Leaving every port open. Close what you don’t use.
  • Forgetting the license. The trial ends, and the panel stops working until a license is active.

FAQ

Is cPanel free?

No. cPanel & WHM needs a paid license, priced by the number of accounts. A new installation can run on a 15-day trial, and only one trial is allowed per IP address.

Can I install cPanel on Ubuntu?

Yes, on the Ubuntu LTS versions cPanel lists as supported. Check the Ubuntu system requirements page before you install.

How long does the installation take?

It depends on the server’s speed and network. Expect to wait a while, and run the installer in screen or tmux so a dropped connection doesn’t interrupt it.

What’s the difference between cPanel and WHM?

WHM is the server administrator’s panel for creating accounts, packages, and server settings. cPanel is the panel each hosting account uses to manage its own files, databases, email, and domains.

Are there free alternatives?

Yes. We compare two in our guides to aaPanel and CloudPanel. For help choosing a server, see shared hosting vs VPS vs dedicated servers.

The Bottom Line

Installing cPanel is quick once the server is ready: a fresh supported OS, a proper hostname, a public IP, and a license plan. The work that matters comes after. Secure the server, turn on AutoSSL and automatic updates, and send backups off the server before you create accounts. Then cPanel gives you and your clients a familiar, stable way to run WordPress sites.

Sources & Further Reading

Articles are editorially reviewed by Jackober and factual claims are checked against cited sources.

1 comment
  1. I am extremely inspired with your writing abilities and
    also with the layout for your blog. Is this a paid topic
    or did you modify it yourself? Either way stay up the excellent high quality writing, it
    is uncommon to peer a great weblog like this one today.

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like