cPanel Hosting Setup Guide: Installation, Configuration, and Alternatives
Complete guide to setting up cPanel on a VPS. Covers installation, WHM configuration, security hardening, and cost-effective alternatives like DirectAdmin and CyberPanel.
Daniel Meier
Systems Administrator
cPanel has been the standard web hosting control panel for over two decades and for good reason. It turns the complexity of managing a web server into a point and click interface that anyone can use. You do not need to know Linux commands to create email accounts, install WordPress, manage databases, or configure DNS. Everything happens through a web browser.
But cPanel is not free, and the licensing changes over the past few years have made it significantly more expensive than it used to be. Understanding what cPanel actually does, how to set it up, and whether it is worth the cost for your situation saves you from either overpaying for features you do not need or struggling without a tool that would make your life dramatically easier.
At its core, cPanel is a graphical interface for server management tasks that would otherwise require command line knowledge. It sits on top of a Linux server running Apache or LiteSpeed and provides tools for managing every aspect of web hosting.
cPanel handles file management through a built in file manager that works like a simplified version of Windows Explorer. You can upload files, edit code, change permissions, and manage directories without needing an FTP client or SSH access. For quick edits to a configuration file or uploading a few images, the file manager is faster than setting up an FTP connection.
It also manages domains and subdomains. Adding a new domain to your server takes about 30 seconds in cPanel. It automatically creates the directory structure, configures the web server, and sets up the DNS zone. Doing the same thing manually requires editing Apache configuration files, creating directories, setting permissions, and restarting the web server.
One of the most used features of cPanel is email management. You can create email accounts on your domain, set up forwarders, configure autoresponders, manage spam filters, and access webmail through Roundcube or Horde. For small businesses that want professional email addresses without paying for Google Workspace or Microsoft 365, cPanel email hosting is a cost effective alternative.
The email system includes SPF, DKIM, and DMARC configuration tools that help ensure your emails actually reach their destination instead of landing in spam folders. Setting these up manually requires editing DNS records and configuring mail server software, which is tedious and error prone. cPanel makes it a few clicks.
cPanel includes phpMyAdmin for MySQL database management. You can create databases, manage users, run queries, import and export data, and optimize tables through a web interface. For WordPress sites and other PHP applications that use MySQL, this is essential for troubleshooting and maintenance.
Creating a new database and user in cPanel takes about a minute. You click through the MySQL Databases section, enter a name, create a user with a password, and assign the user to the database with appropriate permissions. The manual process involves logging into MySQL from the command line, running several SQL commands, and making sure you get the privilege grants exactly right.
cPanel includes SSL certificate management with AutoSSL, which automatically provisions and renews free SSL certificates for all your domains. It also provides IP blocking, hotlink protection, directory password protection, and ModSecurity web application firewall management.
The backup system lets you create full or partial backups of your account and download them or store them remotely. You can schedule automatic backups and restore individual files, databases, or email accounts without affecting the rest of your server.
cPanel and WHM are two sides of the same coin. WHM stands for Web Host Manager and it is the server administration interface. cPanel is the end user interface.
WHM is where you configure server wide settings, create hosting accounts, manage PHP versions, configure the firewall, set up backup schedules, and monitor server resources. If you own the server, you use WHM to manage it. Each hosting account you create in WHM gets its own cPanel interface.
If you are running a single website on a VPS, you use WHM to set up the server and cPanel to manage your site. If you are a web designer hosting client sites, you use WHM to create separate accounts for each client, and each client gets their own cPanel login to manage their individual site.
Installing cPanel on a fresh VPS is straightforward but there are requirements you need to meet first.
cPanel requires a clean installation of AlmaLinux 8, Rocky Linux 8, or CloudLinux 8. CentOS 7 is still supported but reaching end of life. Ubuntu is not supported by cPanel, which is a common point of confusion. If your VPS is running Ubuntu, you need to reinstall with a supported operating system.
For hardware, cPanel recommends at least 2 CPU cores, 2GB of RAM, and 20GB of disk space as minimums. In practice, you want at least 4GB of RAM for a server hosting more than a couple of sites. cPanel itself, along with Apache, MySQL, and the mail server, uses about 1.5GB of RAM before you add any websites. A 2GB server leaves almost nothing for your actual applications.
Log into your VPS via SSH as root. Make sure the hostname is set to a fully qualified domain name, not just a short name. cPanel requires this and the installation will fail without it.
Run the cPanel installation script from their official repository. The script downloads and installs everything automatically. This process takes 30 to 60 minutes depending on your server speed and internet connection. Do not interrupt it. Go make coffee, come back, and it should be done.
Once installed, access WHM through your browser at your server IP address on port 2087. The first time setup wizard walks you through basic configuration including nameserver setup, networking, and your main hosting account. Follow the prompts and you will have a working cPanel server in about 10 minutes.
After the initial setup, there are several things you should configure before hosting any sites.
PHP version: Set the default PHP version to the latest stable release. cPanel supports multiple PHP versions simultaneously through MultiPHP Manager, so different sites can run different versions if needed.
Firewall: Install and configure CSF, ConfigServer Security and Firewall. It integrates with WHM and provides a much better firewall than the basic iptables setup. CSF also includes login failure detection, process tracking, and suspicious file reporting.
Backup configuration: Set up automatic daily backups in WHM. Configure a remote backup destination so your backups are not stored on the same server as your data. If the server fails, backups on the same disk are useless.
Email deliverability: Configure your server hostname's reverse DNS to match your mail server hostname. Set up SPF and DKIM for your domains. Without these, email sent from your server will likely end up in spam folders.
cPanel's licensing costs have pushed many people to explore alternatives. Here are the main options and how they compare.
DirectAdmin is the closest competitor to cPanel in terms of features and usability. It costs significantly less, with licenses starting around 2 dollars per month compared to cPanel's 15 to 45 dollars. The interface is less polished than cPanel but covers all the essential features. Migration from cPanel to DirectAdmin is possible but requires some manual work.
CyberPanel is free and open source. It uses LiteSpeed or OpenLiteSpeed as the web server instead of Apache, which provides better performance for WordPress and PHP sites. The trade off is a smaller community, fewer integrations, and occasional bugs that take longer to fix than commercial products. For budget conscious users who are comfortable troubleshooting, CyberPanel is a solid option.
CloudPanel is another free option that takes a more modern approach. It has a clean interface, supports Nginx and Apache, and includes built in Node.js and Python application support. It is lighter weight than cPanel, using less RAM and CPU, which leaves more resources for your actual websites.
For experienced users, running a server without a control panel is the most resource efficient option. Every control panel adds overhead. The RAM and CPU used by cPanel could instead be used by your applications. If you are comfortable with the command line and only manage a few sites, going panelless saves money and resources.
The answer depends on how many sites you manage and how much your time is worth.
For a single personal website, cPanel is probably overkill. A free panel like CloudPanel or CyberPanel handles the basics, and the 15 to 45 dollars per month you save on licensing adds up to 180 to 540 dollars per year.
For a web designer or agency managing 10 to 50 client sites, cPanel pays for itself many times over. The time saved on routine tasks like creating email accounts, managing SSL certificates, and handling backups across dozens of sites easily exceeds the licensing cost. The familiar interface also means clients can manage basic tasks themselves without contacting you.
For reseller hosting businesses, cPanel with WHM is essentially a requirement. Clients expect cPanel because it is what they know. Offering an alternative panel means more support requests from confused users and potential lost sales from people who specifically want cPanel.
If you need reliable hosting with cPanel support, BlastVPS web hosting plans include the resources you need to run cPanel smoothly with room for your sites to grow.
Using the default cPanel backup location on the same drive as your data is the most common and most dangerous mistake. If the drive fails, you lose both your data and your backups simultaneously. Always configure remote backup storage.
Ignoring server resource limits is another frequent issue. Each cPanel account should have resource limits set in WHM to prevent one site from consuming all the server resources. Without limits, a single site getting a traffic spike or running a poorly coded plugin can slow down every other site on the server.
Running outdated PHP versions because a plugin requires it creates security vulnerabilities. If a plugin only works on PHP 7.2, that plugin is abandoned and should be replaced. Running old PHP versions exposes your server to known exploits that attackers actively scan for.
Not monitoring disk space catches people off guard. Email accounts, log files, and backup files grow over time. A full disk causes email delivery failures, database crashes, and website errors. Set up disk usage alerts in WHM to warn you before you run out of space.
Ready to Deploy?
Get a high-performance VPS with instant setup, full root access, and 24/7 support.
Written by Daniel Meier
Systems Administrator
Specializes in Windows & Linux server environments with a focus on security hardening.