April 29, 2019
April 29, 2019
cPanel is the most popular web hosting control panel. It’s the place to manage the backend of your website. However, you may come across a question or two while using it. That’s why in this all-in-one cPanel tutorial series, we’ll cover all of the common questions related to cPanel.
The File Manager is the tool that you need to do basic file management for your cPanel. Besides uploading and extracting files, you can also use it for creating files and folders, assigning permission, etc.
Basically, it shares the same functionality as an FTP client, although not as powerful.
Note: From here on we’ll only work with the public_html folder. All of the remaining folders are mostly required by the system to ensure the cPanel service is working properly.
First of all, there’s a window section that shows you a folder tree on the left, and a folder’s contents on the right. You can navigate to a folder by clicking on the appropriate one. For example, clicking the public_html folder will show you its content – .well-known, cgi-bin, robots.txt, etc.
Alternatively, you can also navigate to a specific folder by writing its full name path and clicking Go from the folder tree search feature.
There are several navigation functions available:
After learning about navigation, the next important thing is to get to know the file management features. There is a toolbar available to help you but you can also access most of the features by right-clicking on a specific item.
That’s basically all you need to know about the navigation and management features on the File Manager. Next, we’ll discuss bandwidth usage, which is another important aspect for your hosting plan.
Bandwidth is all of the incoming and outgoing traffic or data being transferred on your hosting account. The usage depends on many factors, including visitors, email communication, and may include the FTP connection.
You need to take a closer look at bandwidth usage, as it usually relates to the hosting plan that you subscribed to. cPanel will send an automated email notification when you’re close to the limit.
When you log in, you can immediately see the bandwidth use summary in the right-hand panel under the statistics section.
You can find the full statistics presented in detail by clicking the Bandwidth link from the previous step. Alternatively, you can also search bandwidth by name with the search feature.
When you click either of the two options, it will direct you to a new window that shows the consumption based on a daily, weekly, and monthly basis as well as the total sum of your usage.
Have a look at our development site’s daily bandwidth use as an example.
And as you can see, cPanel currently monitors traffic coming from these sources:
There you have it, all you need to know about bandwidth usage. It’s very helpful to understand what’s causing you reaching the quota limit and act accordingly.
Your disk space usage is the total sum of all data in your account including websites files, MySQL databases and e-mail messages.
cPanel will automatically send disk space warnings to your e-mail address once you have reached 80%, 90%, 98% and 100% disk usage. You can update your contact e-mail address in cPanel under Preferences section.
Login to your cPanel and on the right hand side, you will see a short summary of your Disk Space Usage.
Full details of your Disk Space Usage can be found by clicking on Disk Usage button under Files section of your cPanel.
Scroll down the page, then expand the folders with the > sign to the left of each folder. This will show exactly where your disk space is being used.
In order to remove unwanted files, click on the desired folder and File Manager will be opened in your browser.
Congratulations, you have learned how to check your Disk Space Usage in cPanel. It can be useful when you need to know what is causing you to reach the disk space quota limit.
Now let’s make your cPanel account more secure, by using two-factor authentication.
Since data on your cPanel account is very important, adding two-factor authentication (2FA) to it can be beneficial.
In brief, it’s one way to boost your account’s security. You can use software to generate a time-based one-time password (TOTP), which will give you an individual code that you have to input before accessing your account.
Once you click Go Back, it will direct you back to the login window. You’ll need to enter the six-digit token found on your Authy app. You’ll need to do this every time you attempt to log in.
Now, you’ve successfully created an additional security layer, making you a lot safer even when an unauthorized person has your account’s password.
In next part of our cPanel tutorial, we’ll show you how to create Add-on Domain in cPanel.
Add-on domains are additional domains stored as a subdomain of your main site. cPanel allows you to create and control multiple domains with a single account, and you can easily do so using the Addon Domains tool. Let’s get started.
From your main dashboard, search and open Addon Domains.
Once you open the tool, you need to fill out the form. Here’s the explanation for each field:
Once you’ve filled that, click the Add Domain button.
Now the addon domain is successfully created, you start uploading the website’s file to the newly created subfolder from the File Manager in your cPanel account.
Once the domain added, you should see it in the Modify Addon Domain list. Here’s the description for that section:
Now you’ve learned how to create and manage addon domains from your cPanel account. You can upload files and do backend management for a different domain by just using the same account.
Subdomains are extensions of a domain. They function separately from the main domain, thus they can be used to host additional websites. The format of a subdomain is: subdomain.domain.com.
Let’s say we have a domain mywebsite.com and we want to create a forum and a blog for the main site. We could locate them on forum.mywebsite.com and blog.mywebsite.com. These subdomains can also be accessed via mywebsite.com/forum and mywebsite.com/blog.
To create a subdomain, access subdomains section in cPanel.
If any errors or issues are encountered during this step, the hosting provider should be contacted for assistance.
All files/scripts should be uploaded to the Document Root directory specified in Step 2. The directory is automatically created in public_html and can be easily accessed using File Manager section of cPanel. If a subdomain is created using an Addon Domain, the subdomain’s Document Root will be created inside the root directory of the addon domain, for example: public_html/addon_domain_root/subdomain_root.
If a subdomain is no longer required, or the name was enterred incorrectly, it is always possible to remove it. A subdomain can be deleted by pressing the Remove button in cPanel->Subdomains section.
IMPORTANT! The root directory and files of the subdomain will not be removed. A manual deletion will have to be performed by using the File Manager or any FTP client.
To sum up, subdomains are a fast, cheap and effective way to create additional websites, as there is no need to purchase additional domain names. They can also be used to set up specific areas for your main website, such as a forum, blog, shop etc.
Having a different type of domain is a great way of “protecting” your brand. So, when you want your brand to be online, you probably would buy several domain names.
For example, when you launch the brand under yourdomain.com, you can also buy other popular TLDs for it, such as .org, .net, and specific country code options (.us for webmasters in the United States, or .jp for Japan).
So whenever visitors go to yourdomain.org, they’ll be pointed to your primary domain instead, yourdomain.com. You can set this up by using the domain parking method. cPanel provides you a tool called Aliases to do just that.
From your cPanel’s main dashboard, open the Aliases tool under the Domains section.
Enter the domain name you want to add under the Create a New Alias section and click Add Domain.
In this example, we’re adding hostinger-dev-cp-1.tech as an alias. So, when you visit that URL, you’ll get the same result as visiting hostinger-dev-cp-1.xyz.
You need to add a domain from a valid domain registrar. Otherwise, you’ll get an error message. You’ll also find necessary nameserver information and instructions to point out the DNS from your registrar.
Pro Tip: If you want to check and register domain names, you can do so using our domain checker.
Once you add the domain, it will appear in the aliases list. Now, click Manage Redirection.
In the form, enter the primary domain you want the alias to point to and click Save.
When you’ve successfully added the redirection, it takes up to 24 hours for the change to take effect, due to DNS propagation worldwide.
You’ve learned how to create an SRV record in the previous tutorial, so you must be quite familiar with the DNS Zone Editor interface. Here, we’ll discuss other things that you can do in it.
cPanel actually offers two different types of Zone Editor – Simple DNS Zone Editor and Advanced DNS Zone Editor. Let’s talk about the first option.
Once you open the tool, you’ll get the option to perform four different actions using the simple interface.
The first action allows you to add an A Record on your domain name. You can use this to map a domain’s IP address from a hosting service. Additionally, you can also use it to provide domain redundancy, by adding multiple A Records for the same domain.
To add one, simply click the button and fill all the required fields. In Name, you can enter the hostname for the record. In Address, you can enter the IPv4 address that you would like to point to. When finished, click Add an A Record.
A Canonical Name, or simply CNAME, can be used to map an alias name to a true domain name. You can use this to map a subdomain, such as www or mail, to its content from the main domain name. If you use Google Suite, you would also take a closer look of your CNAME Records.
Click CNAME Record. In the Name, enter the hostname for the record. And in CNAME, enter the subdomain name that you want to map.
Mail servers will use the Mail Exchange (MX) Record to determine the location of email delivery. You should provide the same value for MX Record and A Record, as they usually work hand in hand.
To add one, click the MX Record button. For Priority, the higher the value means preferable. As for Destination, you can use the same value for the appropriate A Record.
If you want to access the Advanced DNS Zone Editor, select it in the panel. It also contains a list of all different DNS records in your domain.
With the advanced editor, you can edit and set custom a TTL value for each of your records. This is pretty handy, especially if you want to edit a record from an inactive domain. Besides editing three previous settings, you can also create other types of records including:
Now you’ve learned how to use the Zone Editor, and you can now easily add, edit, or remove any records in your domain.
In the next cPanel tutorial, we’ll show you how to set up an SRV record in cPanel.
SRV records allow you to define the location of specific services to a different location. It’s commonly used for connecting websites and services that are hosted separately. Several services that usually use this are IMAP/POP3/SMTP, Minecraft servers, Teamspeak 3, etc.
There are several details in the SRV record that you need to input according to the service, protocol, and host that you use:
In this tutorial for cPanel, we’ll use Minecraft as an example. You can get the value details directly from the service provider — they will generate the SRV record details for you. Now, let’s add them.
When you log in, find the DNS Zone tool. It is available under the Domains section.
Once you’re done, the newly created record should appear in the Zone Record list. It usually takes less than 15 minutes for the SRV Record to take effect, but sometimes it might take up to 24 hours.
Should your SRV Record not start within 24 hours, you need to contact your hosting provider, to make sure that the details are in the correct format and the port number isn’t blocked.
For the next cPanel guide, we’ll talk about MySQL database.
Every website needs a place to store its data. Here, we’ll create a database for your website, along with creating and permitting a user to access it.
Once logged in, navigate to the MySQL Databases tool.
You’ll be directed to the MySQL Databases window. To create a database, input the name (without spaces) in the appropriate field and click Create Database. Once done, click Go Back.
When you scroll down, you’ll find the Add New User form available. When filling it out, enter the username without spaces. Enter your password and repeat it.
You can also use the Password Generator to create a stronger password combination. If you did, click I have copied this password in a safe place and click Use Password.
Once done, click Create User.
Once you click Go Back, you can fill the form Add User To Database. Select the user from the drop-down list, and choose the database to which the user would be assigned.
Once you click Add, you’ll be directed to the Manage User Privileges window.
In this step, all you have to do is to grant privileges to the user. If you’re creating an admin, you can check ALL PRIVILEGES and click the Make Changes button.
There you have it, you have successfully created a database, user and granted privileges that are required to access the website’s database. Keep in mind, we only created an empty database with this tutorial, so you need to manually create or import all the tables and entries to it.
For the next tutorial, we’ll be covering the Site Publisher, which has gained a lot of popularity for offering a simple way to publish a temporary website.
Enabling remote MySQL access can be beneficial for several reasons. This feature allows remote hosts (different servers) to access your mySQL database. For example, if you want to allow a third party, such as a shopping cart application, to use the database.
Find and open Remote MySQL® tool under the Databases section.
Enter the hostname or IP address in the Host field. If you want to access the database from the localhost, you can use your public IP address which can be found here. Or, simply enter a fully qualified domain name, like www.3dcart.com, then click Add Host.
Note: You can use the (%) character as a wildcard. For example, if you wish to grant access for all IPs that begin with 192.168.0, simply enter 192.168.0.%.
To remove previously granted access, you can do the following:
And that’s it. You can easily allow and remove remote access to your MySQL databases. For security reasons, please don’t give permission to an unauthorized person.
Creating an email account using the cPanel is a pretty straightforward process.
In your cPanel’s main dashboard, navigate to the Email section, or simply search for the Email Accounts tool.
Once everything is set up, click the Create button.
If you checked the Send a welcome email with instructions to set up a mail client, you’ll receive a configuration detail to set up an email client. You can then use it to set up your webmail through a client such as Mail, Microsoft Outlook, Mozilla Thunderbird, etc.
And that’s it, now you can use that email address to correspond with your audience.
The Site Publisher is a useful tool, enabling you to quickly create a simple website, even if you have never created one before. This interface provides templates to choose from, and you then simply add the appropriate information to it.
The Site Publisher tool is available under the Domains section.
Important: If you’re website somehow doesn’t show up, you need to delete the index.php file in the public_html folder that we created in the earlier tutorial.
While you’re developing the website, let’s first create an official email account. So your eager audience can still get in touch.
Next, we’ll show you how to backup your website.
You’ve probably heard this over and over again – backups are one of the most important things to do. As you need to have your website data in a safe place, just in case something went awry or you simply want to transfer the data somewhere else.
Even if your hosting provider helps you create a backup, we still highly recommend to perform this yourself. With cPanel, you can do that pretty easily.
In this tutorial, we’re saving the backup file on our Home Directory.
Click Generate Backup. Depending on your account size, it may take a while to generate the backup file.
There you have it, all you need to know about backups with cPanel. There are three options available, tailored to your needs.
In this part of cPanel tutorial, we will show you how to use the cPanel’s implemented Optimize Website feature. It allows you to compress certain types of files in order to enhance your website’s performance.
First of all, you need to enter your cPanel. After doing that, you can either use the cPanel’s search feature or manually find the Optimize Website tool:
After entering the tool’s page, you should see this window:
Refer to the previous image and follow the instructions below:
IMPORTANT! Do not add image types in the field, for example, .jpg or .png. These types are already compressed by default.
Congratulations, you have enabled cPanel’s Optimize Website feature for your website.
cPanel’s Optimize Website feature is useful if you wish for your site visitors to have a slightly better and faster experience when browsing your website. The website’s content is compressed before sending it to the visitor’s browser, therefore, it will take less time to load.
Error pages help inform visitors that there’s an issue with the webpage they’re trying to reach. A code number usually represents every error. For example, when a visitor is entering a nonexistent URL, they will get a 404 error. While unauthorized visitors accessing your website’s restricted area will see a 401 error.
Your web server software usually takes care of basic error pages. In this tutorial, you’ll learn how to create a custom one using the cPanel, to show HTTP status codes from 400 to 510.
The Error Pages tool is located under the Advanced section. Find and open it.
Once it is opened, you can do the following:
Once you choose which code to work with, you’ll be directed to the editing screen. Here you can use HTML code and insert some tags.
You can experiment with the variables to create a better custom error page. In the example, we’re trying to retain visitors by giving them a link to our homepage. Once you’re satisfied with the result, click Save.
You can simulate how the error page looks by simply entering a non-existing URL, such as https://www.yourdomain.com/non-existing-url.html to your browser.
It’s a good thing to have custom error pages, as not all visitors understand status codes. It’s also an effective way to retain visitors on your website, by offering them a chance to navigate to a URL that actually exists.
Sometimes, when you’re trying to access cPanel an error message stating “IP address has changed” appears. In most cases, this message is displayed when you establish a connection while using a network that has strict firewall rules. Or, you use a virtual private network (VPN) that occasionally changes your IP address.
As a security measure, cPanel doesn’t tolerate dynamic IP addresses. To fix this issue, you can use a custom tool called a cPanel proxy.
Things needed for this tutorial:
Note: If you have the same problem when accessing Webmail or WHM, you can also delete the appropriate DNS records here.
Note: If you previously deleted the Webmail and WHM entries, you might also create the subdomains named webmail and whm respectively.
Protip: Repeat Step 3 if you have the same issue with Webmail and WHM, and extract the tool in the appropriate directory.
You have successfully installed the cPanel proxy tool, helping access your cPanel account with ease. You can also login to the cPanel window directly, by entering cpanel.yourdomain.com in your browser.
In this section, you will learn how to use Cron Jobs feature. Cron jobs allow you to automate certain commands or scripts on your site. You can set a command or script to run at a specific time every day, week, etc. For example, you could set a Cron job to delete temporary files every week to free up disk space.
Access your cPanel using your login credentials. Afterward, you will need to find the Cron Jobs feature, which is located under Advanced section.
mycommand >/dev/null 2>&1.
To add a new Cron job, it is required to fill out the following fields:
php -f /home/YOUR_CPANEL_USERNAME/public_html/file.php
Click Add New Cron Job button. After clicking the button You will see
cPanel successfully added the cron job. message, this means that the Cron job was added successfully.
To remove your current Cron job, perform the following steps:
To edit your current Cron job, perform the following steps:
After following this cPanel guide you will be able to add, remove and edit Cron jobs to automate commands or scripts on your website. In the next tutorial, you’ll learn how to set up cPanel/WHM on your virtual private server (VPS).
If you’re using Hostinger, once you’ve subscribed to VPS hosting, you’ll get the option to have a server run on CentOS 7 with cPanel/WHM pre-installed. If that’s the case, you need to set up cPanel/WHM first.
Note: Hostinger offers a wide range of OS to install on your server, this includes CentOS, Debian, Fedora, Suse, and Ubuntu. You can easily install them with just a few clicks from your hPanel.
WHM allows you to perform global VPS configurations, install TLS, create accounts, and more. cPanel, grants you access to manage the backend of your website.
cPanel and Web Host Manager (WHM) are two different yet compatible services, that are essential when running a fully-functioning website or selling hosting packages.
You can access WHM using the IP address of your server on the port 2086 (HTTP) or 2087 (HTTPS/TLS). For example, say your VPS IP is 22.214.171.124. To reach WHM you can either enter http://126.96.36.199:2086/ or https://188.8.131.52:2087/ in your browser.
If you’re getting your connection is not private warning, don’t worry. WHM uses a self-signed certificate, which is not recognized by your browser. If you use Chrome, simply click the Advanced button and select Proceed to IP Address (unsafe).
Once clicked, you’ll be directed to the WHM login window. You need to fill in the root login details here.
Once logged in, you’ll get to the user agreement windows, which is the first section for the initial setup. Review the notes and click Agree to All.
In this section, you need to configure the nameservers. Nameservers map the server’s DNS information, allowing visitors to access the website hosted on your server. Once filled, click Finish.
Now you’ve successfully installed WHM/cPanel on your server. Note that the trial license activates immediately, you can use it for free up to 15-days. After that, you need to purchase a full license. Next, we’ll show you how to create a new feature list in WHM.
If you’re a hosting reseller and want to sell different packages and features for each of your client’s cPanel accounts, you can do so by using the Feature Manager from your Web Host Manager (WHM) account.
Once you clicked add, a window with a list of features will appear. Choose the appropriate features you want to enable for a specific hosting package that you offered to a client. When you’re finished, click Save.
You’ll receive a confirmation message when it’s successfully created. The feature list management box will also appear.
Now you can offer a hosting package with custom features tailored to different kinds of clients. If you need more information on how to create a new account and assign the package, check out this tutorial.
If you’re migrating from shared hosting to VPS, you can transfer the full cPanel backup to the new server. For a safe and efficient migration, we’ll show you how to move the backup using Secure Copy Protocol (SCP) from the cPanel.
Login to your VPS member area and copy the dedicated IP, SSH username and password, and port values to a text editor, we’ll need it for the next step. If you’re on Hostinger, the details are available under the Server Management section.
You’ve already learned how to create a backup in previous tutorial. For this step, instead of saving the file to the Home Directory, select SCP as the Backup Destination. You need to enter the following information into the fields:
Once you fill all the information, click Generate Backup button.
Once you clicked that, a notification window stating the backup is in progress appears. cPanel will also inform you about the backup’s status in your specified email address.
Please be aware that the backup generation and transfer can take some time, as it depends on your account’s size. When your data is fully transferred, we’re going to restore the backup on your new VPS.
Now, once the previous backup transfer is completed, you’ll receive an email notification message. All you have to do is restore it on the VPS so that you can manage the account in its new home.
There are two methods that you can do to restore the file, restoring from the existing backup or a local backup file. Either way, you need to have the proper file in hand.
When you’re satisfied with the settings, click the Restore button. You’ll see a progress window while the process takes place.
Once it’s complete, you’ll also see a summary reporting the upload result. If you see any issues associated with the services you use, please contact your former provider.
Your new account should now be available on the List Accounts section.
Restoring an account with a local file is also a straightforward process. Open the tool from the previous step, here choose the Restore with File option instead. Locate the backup (it should be an archive file) on your computer.
Once you’re finished with the settings, click Restore. You’ll see the same progress window and summary like in the previous section.
Now you’ve learned how to restore your account using an existing transferred backup, or by uploading a local file directly to your VPS. You’re ready for the last tutorial, to fully migrate from a shared hosting service to VPS.
Congratulations! You’ve completed all of the tutorials in this cPanel series, addressing the most common questions you and other webmasters have when starting to use cPanel/WHM.
Of course, there are other features and tasks that we haven’t covered yet. That’s why, if you stumble upon new issues or find any cool tricks in cPanel/WHM, don’t be shy and share them in the comment section below!
May 03 2019
March 25 2020
Really nice & informative tutorials on cPanel & It would be really helpful for the beginners. As all the points for beginners like an explanation of cPanel file manager, Adding an add on Domain, Checking the bandwidth & disk space usage is really important to understand for the ones who are managing their website. As before going to the tutorial on cPanel, Beginners need to get detailed information on cPanel firstly with advantages & many more so there is a complete guide on cPanel for beginners, Hope this helps the beginners to understand detailed about cPanel.