cPanel® Blog

Zero to WordPress

Here at cPanel, Inc., we want to empower our users to take control of their own cPanel & WHM server. This can seem very daunting at first, but we are here to show you anyone can build a cPanel & WHM server with a WordPress site. We will be addressing some very technical topics, but have linked additional tutorials with more information. Let’s begin!

Getting Started

By the end of this tutorial, you will have purchased a domain, picked a cPanel license type, and set up a server. In this example, we will be using a cPanel Solo license and a CentOS droplet from DigitalOcean. Feel free to purchase a domain from any registrar of your choosing such as GoDaddy or Namecheap. Wherever you buy your domain from, make sure to choose the option without hosting since we will be using a DigitalOcean droplet to host our WordPress site.

Setting Up a Droplet in DigitalOcean

Once you’ve created an account with DigitalOcean, you will create a droplet by clicking the big green Create button at the top righthand side of the page. For your droplet to be compatible with cPanel & WHM, you will need to select the CentOS option. The minimum size we recommend is 4GB of memory and 80 GB of disk space. DigitalOcean also gives users the option of selecting a data center. Choose a location that is closest to you, although any option will work well.

There are two different methods to access the droplet once it’s been provisioned, via SSH key or password. If you chose to use it, the SSH key must be added to your account before provisioning the droplet. If you choose to not use an SSH key, an email will be sent to your specified DigitalOcean account email address with the droplet’s IP address and a temporary root password.

Please note – if you choose not to utilize an SSH key you will be required to use the temporary password to access the SSH server. Once you have logged in using this method, you will be prompted to set a new root password. This is the same password you will use to access the root account of WHM. Make sure to remember it and store it in a safe place.

For this tutorial, we will use the DigitalOcean nameservers. You will need to assign your hostname to your new droplet and set up your hostname. To make sure everything connects you can log into your domain registrar and point your domain to your droplet name server. The place to define the nameservers can usually be found under “Manage” in settings at your registrar. Until your domain is pointed to all name servers associated with your droplet, you will not be able to access your server via the domain.

For more advanced users that would like to build and maintain their own nameservers, here is a tutorial on how to set those up.

Purchasing a cPanel License

cPanel & WHM servers require a paid license. You must purchase a cPanel license for each cPanel & WHM server that you wish to run. To purchase a license, you can either visit the cPanel store or acquire one from our Partners and Distributors. If you are using a DigitalOcean droplet, you can choose between a cPanel Solo license or a VPS license. After selecting your license type and term, you will assign your server’s IP address to your license. Your server’s IP address can be found in your DigitalOcean account. It is the IP address associated with your server.

Install cPanel & WHM via the Command Line

DigitalOcean Droplets are managed using a terminal and SSH. Connecting to the server will differ wildly depending on what kind of computer you’re connecting from such as a Windows or Mac. Personally, I followed these directions and found them to be extremely helpful. How To Connect To Your Droplet with SSH

After connecting your droplet with SSH, you may install cPanel & WHM using your terminal by running the following command:

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

Warning, this step takes at least 20 – 30 minutes, so plan accordingly.  Once cPanel & WHM has successfully been installedyou may access the WHM login portal.

Logging Into WHM for the First Time

There are two ways to login, but the easiest way to get started is to use your server’s IP address and port 2087. That login would look like this: https://127.0.0.1:2087. Replace that 127.0.0.1 in the address with the IP of your server. Please note, you will need to accept the SSL warning the first time you log in. For more tips on logging in for the first time, please reference our knowledge base here: How to Log in to Your Server. 

You will notice when you log into WHM for the first time you will be taken through a guided setup process for configuring your server. For most users, the default configuration will be fine, and you will only need to confirm the configuration that is provided for you by clicking ‘Next’ at the bottom of each interface. Once you have completed the configuration process, WHM will open for you automatically.  

Though there are a ton of features available to you in WHM, at this point we will be focusing our attention on the “Account Functions” feature.

Setting up cPanel Credentials and Installing cPAddons Site Software

Once successfully logged into WHM, you will navigate to the Account Functions feature followed by Create a New Account. In Create a New Account you will be asked to provide your domain name as well as create a username and password. These are the credentials that you may use to log in to cPanel. 

If you have already created an account package, you can assign it to this account in the Package section of the Create a New Account page. Settings are where the theme and language of the cPanel interface can be set. Under DNS Settings choose which nameservers will be set (probably your DigitalOcean nameservers), and either enable or disable SPF and DKIM records. Lastly, there are Reseller Settings and Mail Routing Settings, which can be left at the default setting. Finish creating your cPanel account by selecting the blue Create button.

To install WordPress as a cPAddon, we must enable the WordPress cPAddon via WHM’s Install cPAddons Site Software interface with the following steps:

  1. Navigate to WHM’s Install cPAddons Site Software interface (WHM >> Home >> cPanel >> Install cPAddons Site Software).
  2. Select the WordPress checkbox.
  3. Click Update cPAddon Config.

Logging Into cPanel for the First Time

The easiest way to get started is to use your server’s IP address and port 2083. That login would look like this: https://127.0.0.1:2083. Once this entire process has been completed, you will be able to log in using yourdomain.com/cpanel, but for now, use your IP address. Again, your IP address can be found in your DigitalOcean account. It is the IP assigned to your droplet server. Use the username and password you just created in WHM using the Account Functions feature to log in. The main cPanel interface has a plethora of features just like WHM. To open the WordPress Manager, you can either search WordPress in the search bar or navigate to the bottom of the features list and select “WordPress Manager.”

The WordPress Manager will take you to a mostly blank page where your only option is to install or manage your current WordPress sites. Since this is your first time installing WordPress, you will select the “Install” button.

You will be prompted to create credentials for your WordPress site as part of the installation process. You will also have the opportunity to define a blog name or create a MySQL Database in the advanced settings of this process.

Upon completion of the configuration process, you will select the final Install button, and you’re all done! Load your domain in your browser, and you will see the WordPress interface! If you ever need to make changes to your WordPress configuration, you can always make changes under “Manage”. You will also use that interface to uninstall WordPress and starting over from scratch if you’d like. We are making significant improvements to the WordPress Manager this year. Read our product update from January to see what we have planned!

That’s a wrap!

Well done! You have successfully set up your first cPanel & WHM server, and installed WordPress on it. You can now feel the satisfaction of building your own website from scratch. With that said, this is where we hand off the reins. To continue learning more about WordPress go to https://learn.wordpress.com.

If you want to talk to us directly, the best way is to find us in Houston at this year’s cPanel Conference in October! We’re still accepting speaker submissions, and we would love to hear from you! Join us on Slack or Discord for more information.