cPanel Tutorial

cPanel is the most popular web hosting control panel. It’s the place to manage the back-end 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.

Hostinger cPanel Hosting – Video Tutorial

How to Use cPanel’s File Manager

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.

Step 1. How to Find the File Manager

  1. Once you’ve logged into your cPanel account, you should find the File Manager. It’s located under the Files section. Or, you can also search for it by name as we did in the previous tutorial.file manager tool in cpanel
  2. When you open the tool, you’ll be directed to a new window that shows you navigation and management options along with a directory of folders and files that your website has.file manager dashboard

Important! 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.

Step 2. How to Navigate the File Manager

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.

The public.html folder

Alternatively, you can also navigate to a specific folder by writing its full name path and clicking Go from the folder tree search feature.

Insert the folder path in the search bar

There are several navigation functions available:

  • Home — when you click it, it will show you the Home folder and its content
  • Up One Level — goes up one level from your current place. For example, when you’re on cgi-bin folder and click this, it’ll bring you back to the public_html folder, which is a higher level than the cgi-bin folder
  • Back/Forward — works pretty much the same as back/forward navigation in your web browser
  • Reload — refresh the page to show changes made
  • Select/Unselect All — to select or unselect files or folders
  • View Trash — shows the Trash folder where all deleted files reside
  • Empty Trash — to clear the Trash folder. You can only use this feature while in the Trash folder

Step 3. Using the File Management Features

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.

File management toolbar
  • File – you can create a new file inside a selected folder by using this feature. Here we’ll create an index.php file in the public_html folder.
  • Folder – this feature lets you create a new folder. Here, we’ll create one named test-folder.
  • Copy– you can copy the selected file to a specific destination. We’re going to copy the index.php that we’ve created to the test-folder.
  • Move – This feature works exactly like Copy. The only difference is that the file will be removed from its original location.
  • Upload – here you can upload a file to your hosting account. However, you can’t upload folders. To upload folder or larger file, you can use an FTP client like FileZilla. You have two options to upload the file, either directly drag and drop it or select the file from your computer manually. Once you finished, click the Go Back to link.
  • Download – this feature will download the selected files to your computer.
  • Delete – this option moves the selected file to the Trash folder. If you want to remove the file permanently, check the Skip the trash and permanently delete the files box.
  • Restore – This feature is only available when you’re in the Trash folder. You can restore a removed file to its folder origin.
  • Rename/Edit/HTML Editor – You’ll need these features to edit your files. They work pretty similarly like any text editor software and can be quite a help for editing on the go. Though it uses a WYSIWYG interface, it’s not quite powerful as other HTML editor software.
  • Permissions – You need this feature to assign permission to a specific file or folder. We recommend you don’t change anything unless you completely understand what you’re doing, as changing the wrong permission can cause your website problems.
  • View – Use this to view a file, for example, to open a picture or view the content of the index.php file.
  • Extract/Compress – With compress, you can archive chosen content to a Zip, Gzip, or Bzip2 format. Extract will do the opposite – extract an archive.
  • Settings – With this feature you can set up your preferences. For example, you can set the default folder to open whenever you use the File Manager. You can also choose to Show Hidden Files (dotfiles). For example, if you want to edit .htaccess to restrict access to certain aspects of your website.

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.

Hostinger web hosting banner

How to Check Bandwidth

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.

Step 1. Access a Short Summary of Bandwidth Usage

When you log in, you can immediately see the bandwidth use summary in the right-hand panel under the statistics section.

Bandwidth summary in cPanel

Step 2. Access the Bandwidth Statistics in cPanel

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.

Bandwidth tool in cPanel

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.

Daily bandwidth usage graph

And as you can see, cPanel currently monitors traffic coming from these sources:

  • HTTP Traffic – represents the data sent and received over the protocol
  • FTP Traffic – tracks the transfer protocol that you use to access and share files between your computer and the web server
  • IMAP/POP3/SMTP Traffic – represent the email communication that happens between your server and a computer/mail client

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.

How to Check Disk Space Usage

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.

Checking the short summary of Disk Space Usage

Login to your cPanel, and on the right-hand side, you will see a short summary of your Disk Space Usage.

Disk Usage Statistics

Step 2 — Checking Disk Space Usage statistics

Full details of your Disk Space Usage can be found by clicking on Disk Usage button under Files section of your cPanel.

Disk Usage Statistics Full

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.

Disk Usage cPanel

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.

How to Set Up 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.

Step 1. Enabling Two-Factor Authentication in cPanel

  1. Once you have logged in to your cPanel account, open the Two-Factor Authentication tool. Then, click the Set Up Two-Factor Authentication button.Two-Factor Authentication tool in cpanel
  2. Now open your Authy app. From there you can either scan the QR code or enter the Key manually.scan the qr code or insert the key manually
  3. Once scanned, you need to enter the six-digit token that appears on your Authy app. Then click Configure Two-Factor Authentication.
Configure two-factor authentication

Step 2. Logging Back to cPanel

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.

Enter the security code from Authy app

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.

How to Create an Add-On Domain

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.

Things needed:

  • Access to your cPanel account

Step 1. Access Addon Domains Tool

From your main dashboard, search and open Addon Domains.

Addon domains tool in cPanel

Step 2. Create an Addon Domain

Once you open the tool, you need to fill out the form. Here’s the explanation for each field:

  • New Domain Name — you simply need to enter the name of the domain you wish to add. In this case, we’re using hostinger-dev-cp-2.tech
  • Subdomain — cPanel will automatically add the subdomain name. If you only plan to add one domain name, leave that be. Otherwise, if you’re planning to add two domains with the same name but different TLDs, e.g., samedomainname.com and samedomainname.net, you need to modify it
  • Document Root — it will also automatically fill itself. This is the path for your addon domain’s content
  • Create an FTP Account (Optional) — this option allows you to create a different FTP account for the new addon domain. If you’re going to manage that domain yourself, you don’t need to create one. However, if you wish to set up the addon domain for someone else, you can check the Create an FTP account associated with this Addon Domain. With a separate account, they will only have access to the files of that particular addon domain

Once you’ve filled that, click the Add Domain button.

Set up the domain name and ftp account for the addon domain

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.

Step 3. Manage the Addon Domains

Once the domain added, you should see it in the Modify Addon Domain list. Here’s the description for that section:

modify addon domain in the list
  • Addon Domains — you can see all the domains you add here
  • Document Root — folder path for that specific domain. When you click the link, it will direct you to the File Manager
  • Subdomain — an automatic name created in the form
  • Redirects to — you can redirect the domain to somewhere else, it shares the same feature as Aliases. Since we’re not doing that, it says not redirected. However, if you want to do that, simply click the Manage Redirection button, and it will open a new window where you can assign the path for redirection
    manage redirection for the addon domain
  • Actions — an option to remove the addon domain from the list

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.

How to Create a Subdomain

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.

Fill in all the fields and press
  1. Subdomain field represents the name of a subdomain. In this section, only the subdomain extension has to be entered.
  2. Domain field lets you choose the domain under which the subdomain will be created.
  3. Document Root is the root directory of a subdomain. This folder is created in public_html by default.
  4. After clicking Create, this message will appears on your screen.
You should see this screen after that.

If any errors or issues are encountered during this step, the hosting provider should be contacted for assistance.

Uploading files to subdomain Document Root

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.

Subdomain directory in File Manager.

Deleting a subdomain

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.

Remove button.

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.

If the goal is to create a subdomain with a different name while displaying the same content, the best way would be to delete the old subdomain and create a new one with the same root directory as the deleted subdomain.

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.

  • Subdomains are separately functioning domain extensions.
  • Subdomain DNS configuration can be changed without affecting the main domain.

How to Park a Domain

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.

Things needed:

  • Access to your cPanel account
  • Multiple domain names

Step 1. Access Aliases

From your cPanel’s main dashboard, open the Aliases tool under the Domains section.

aliases tool in cpanel

Step 2. Create a New Parked Domain

Enter the domain name you want to add under the Create a New Alias section and click Add Domain.

add the parked 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 name search tool.

.

Step 3. Manage Redirection

Once you add the domain, it will appear in the aliases list. Now, click Manage Redirection.

manage redirection for the parked domain

Step 4. Alias Redirection

In the form, enter the primary domain you want the alias to point to and click Save.

alias redirection for the parked domain

When you’ve successfully added the redirection, it takes up to 24 hours for the change to take effect, due to DNS propagation worldwide.

How to Edit DNS Zone Using cPanel’s DNS Zone Editor

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 EditorSimple DNS Zone Editor and Advanced DNS Zone Editor. Let’s talk about the first option.

Option 1. Simple DNS Zone Editor

Once you open the tool, you’ll get the option to perform four different actions using the simple interface.

simple zone editor in cpanel

A Record

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.

add a record window in cpanel

CNAME 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.

add cname record in cpanel

MX Record

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.

add mx record in cpanel

Manage

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.

Option 2. Advanced DNS Zone Editor

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:

  • AAAA Record — maps a domain name to IPv6 Address
  • Certification Authority Authorization (CAA) Record — allows a certain authority to issue certificates for the domain
  • Domain-based Message Authentication, Reporting, and Conformance (DMARC) Record — enhances security against fraudulent attempts or suspicious emails. Google Suite users might find this tutorial helpful
  • SRV Record — maps one domain to another, as we did in the previous tutorial
  • TXT Record — uses to hold any type of text information. For example, it commonly uses to hold DMARC content

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.

How to Add SRV Record

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.

SRV Record Details

There are several details in the SRV record that you need to input according to the service, protocol, and host that you use:

  • Name — the domain name used by the service. It should end with a dot, e.g., _minecraft._tcp.yourdomain.com. (Note: Only use underscores before service and protocol)
  • TTL (Time to Live) — limits the lifetime of a specific record. The default value is 14400
  • Priority — defines which records should be prioritized. Lower value  is better
  • Weight — determines which records have the same preference should be prioritized first. A higher value means preferable
  • Port — the port number used by the service
  • Target — the destination hostname where the SRV record will be pointed to, e.g., minecraft.server.com

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.

Step 1.  Find the DNS Zone Editor

When you log in, find the DNS Zone tool. It is available under the Domains section.

zone editor tool in cpanel

Step 2. Add an SRV Record

  1. Choose the domain you want to add the SRV record to, and click Manage. Right beside the filter search bar, click the dropdown at the Add Record button, and choose Add SRV Record.click add srv record from the option
  2. A new form will appear underneath, fill in all the required details. Once finished, click Add Record.fill the srv record details

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.

How to Create 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.

Step 1. Access the MySQL Databases

Once logged in, navigate to the MySQL Databases tool.

mysql databases tool in cpanel

Step 2. Create a New MySQL Database

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.

create a new database

Step 3. Create and Add New MySQL User

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.

create a new user for the database

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.

adding new user to the database

Once you click Add, you’ll be directed to the Manage User Privileges window.

Step 4. Provide Privileges to the New User

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.

grant privileges to the new user

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.

How to Use Remote MySQL Feature

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.

Things needed:

  • Access to your cPanel account
  • The IP address or domain name you want to grant access to

Step 1. Find and Access the Remote MySQL Feature

Find and open Remote MySQL® tool under the Databases section.

remote mysql tool in cpanel

Step 2. Allow Remote Server Access to Your Databases

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.

add the host to access database

Pro Tip

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.%.

.

Step 3. Delete Remote Server Access to Your Databases

To remove previously granted access, you can do the following:

  1. Find the hostname you wish to remove in the Manage Access Hosts list, and click Delete.remove a hostname from the list
  2. A confirmation window will show up, and simply click Remove Access Host.
a confirmation window to remove the hostname

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.

How to Setup an Email Account

Creating an email account using the cPanel is a pretty straightforward process.

Step 1. Locate and Enter the Email Accounts Section

In your cPanel’s main dashboard, navigate to the Email section, or simply search for the Email Accounts tool.

email accounts tool in cpanel

Step 2. Creating an Email Account Using cPanel

  1. Once it’s opened, click the Create button and a new window will open.click create email button
  2. You need to provide the details for each field:
  • Username  — specifies the username you want to use for the email. For example, if you wish to use info@yourdomain.com, then simply enter info in the field
  • Security — requires you to input a password for the email account. Having a strong password, with a combination of uppercase letters and numbers, is highly recommended. You can use the cPanel password generator to create one
  • (Optional) Provide an alternate email — if you wish to reset the email password with another email account, you can write the alternative email here
  • Storage Space — provides you with two options, limited or unlimited. With limited storage, once the email reaches the set amount, you won’t be able to receive any messages. On the other hand, you shouldn’t be worried if you choose unlimited storage

Once everything is set up, click the Create button.

filling the details in the email creation form

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.

How to Create a Website via cPanel’s Site Publisher

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.

Step 1. Access the Site Publisher

The Site Publisher tool is available under the Domains section.

site publisher tool in cpanel

Step 2. Choosing Website Location and the Template

  1. Once you click the tool, you have to choose which domain or subdomain the publisher should use.
  2. Once selected, it will show you several templates that you can choose. Here, we’ll use Under Construction.choose the template to use
  3. All that’s left is filling out some details. When finished, hit the Publish button.filling out site's details

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.

Now, you’ve successfully created a new temporary website to inform your visitors about what you wish. Here’s how ours look.

the end result of our development site

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 back up your website.

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.

Understanding Type of Backup in cPanel

  • Full Account Backup — here you can download a backup of your cPanel account’s details, including Files, DNS Zones, Databases, etc
  • Full Website Backup — this will help download a backup of your website’s data only, including the home directory, MySQL databases, email forwarders, and filter configurations. You need this when you wish to transfer your cPanel account to another hosting provider
  • Partial Website Backup — here, you can manually select the data you want to backup. For example, if you only need to back up MySQL databases

Full Account Backup Using cPanel

  1. From your cPanel main dashboard, search and open the Full Account Backups tool.full account backup in cpanel
  2. A JetBackup window will pop up, and here you’ll see a list of your account’s backups.jetbackup window in cpanel
  3. Click the Generate Download button by the file you wish to download, and you’ll get a download confirmation. Then, simply hit the Add to Download Queue button and click Go Back.jetbackup confirmation
  4. Once it’s done, there will be a Download button next to the file you wish to download.download button to get the backup file

Full Website Backup Using cPanel

  1. Search for and open the Backup Wizard tool from your dashboard.backup wizard tool in cpanel
  2. On the new window, click Backup.backup wizard window
  3. Now you have the option to do a full or partial backup. Choose Full Backup.conducting full backup
  4. You can generate the backup, and choose how to save the archive file. You’ll have four options here:
  • Home Directory — saving the file on your current server
  • Remote FTP Server — using FTP to save the backup file on a remote server
  • Remote FTP Server (Passive Mode Transfer) — using passive FTP mode to save the backup file
  • SCP (Secure Copy Protocol) — using SCP to transfer the file to another server

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.

generate full account backup
  1. Once it’s generated, there will be a link under the Backups Available for Download section. You can then download and keep the file somewhere safe.
backup download link generated

Partial Website Backup Using cPanel

  1. From the Backup Wizard window, select partial backup. In this tutorial, we’re going to download MySQL Databases.partial backup in cpanel
  2. Once clicked, you’ll get directed to final step window and easily locate the database file there. Click the link to save it.final step to download the partial backup

There you have it, all you need to know about backups with cPanel. There are three options available, tailored to your needs.

How to Use cPanel’s Optimize Website Tool

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.

Step 1 — Accessing the Optimize Website tool

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:

Find the

After entering the tool’s page, you should see this window:

Manage the

Step 2 — Working with the Optimize Website tool

Refer to the previous image and follow the instructions below:

  1. Here you can choose the compression option:
    • Disabled will simply disable this feature and will not perform any compression action.
    • Compress All Content will compress all the content of your website.
    • Compress the specified MIME types will let you choose what kind of content will be compressed.
  2. The MIME types field allows you to specify what kind of files/content will be compressed. Enter the space separated list of the content that you wish to compress.
  3. After making your choice, click on Update Settings to apply the settings you have made. You should see this confirmation message after doing that:
    Confirmation message

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.

How to Create Custom Error Pages

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.

Step 1. Locate and Enter the Error Pages

The Error Pages tool is located under the Advanced section. Find and open it.

error pages tool in cpanelStep 2. Select an Error Page for Editing

Once it is opened, you can do the following:

  • Managing — here you can select the domain that will use the error page
  • Error Code List — you need to select the proper error page to make. By default, cPanel only shows the five most common error pages. If you want to see the remaining list, click the Show All HTTP Error Status Codes tab
the most common error code list

Step 3. Edit the Error Page

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.

  • Referring URL — shows the URL that visitors come from
  • Visitor’s IP Address — shows the visitors’ IP
  • Requested URL — shows the URL that visitors are trying to access
  • Server Name — shows the server name
  • Visitor’s Browser — shows the browser type the visitor uses
  • Redirect Status Code — shows the error code
editing the page for the chosen status code

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.

How to Use cPanel Proxy

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:

Step 1. Delete Existing Default cPanel DNS Entries

  1. Login to your cPanel hosting account.
  2. Find the Zone Editor tool and open it.zone editor tool in cpanel
  3. You’ll get a window that has a list of your domains. Click Manage next to the one you want to fix.manage the domain in the tool
  4. It will direct you to a new window that has a collection of DNS records. Because we want to fix the cPanel login issue, the cpanel.yourdomain.com DNS record is the one to look at. Find and delete it.delete the record from the tool

Pro Tip

If you have the same problem when accessing Webmail or WHM, you can also delete the appropriate DNS records here.

.

Step 2. Create a New Subdomain for the cPanel Proxy

  1. Now go back to cPanel’s main dashboard, find the Subdomains tool and open it.subdomains tool in cpanel
  2. The subdomain list should be empty at the moment. Now, in the Create a Subdomain form, write cpanel as the subdomain. The other fields will automatically be filled. Click Create. And when finished, click Go Back.create subdomain in the tool

Pro Tip

If you previously deleted the Webmail and WHM entries, you might also create the subdomains named webmail and whm respectively.

.

  1. You should see the newly created subdomains on the list. Remember your cPanel link name in the Document Root section, as it’s where you’re going to navigate to for the next step.document root section in the subdomains list

Step 3. Download, Upload and Extract the cPanel Proxy

  1. Go to the cPanel proxy homepage and download the tool.download cpanel proxy tool
  2. Go back to the cPanel main dashboard, find the File Manager and open it.file manager tool in cpanel
  3. From the folder tree section, navigate to your cpanel.yourdomain.com. Once you’re inside the directory, click the Upload button from the navigation bar.upload the tool in the document root folder
  4. It will open a new window. You can either drag and drop the cPanelProxy.zip file directly or select the file to upload it. Once the upload is completed, you can click the Go Back to link.upload cpanel proxy tool the the cpanel
  5. Now the cPanel proxy tool should be placed in the directory, and the only thing left is to extract the file. You can either right click the file and choose Extract, or click the Extract button on the toolbar.extract cpanel proxy tool to the directory
  6. A confirmation window will pop up as soon as you click the Extract. Here you can review the execution path. Once confirmed, click the Extract File(s) button.the confirmation for extracting the file

Pro Tip

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.

How to Create a Cron Job

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.

Crons

Step 1. Adding Cron Email

  • Cron Email feature sends an email with the output of your command, if any, every time the Cron job runs.
    You can have Cron send an email every time it runs a command which produces output. If you do not want an email to be sent for an individual cron job you can redirect the command’s output to /dev/null like this: mycommand >/dev/null 2>&1.
  • If You want to use this feature, simply input your email address in the Email field and click Update Email button below.
Cron email

Step 2. Adding a new Cron job

To add a new Cron job, it is required to fill out the following fields:

  • Common Settings. This dropdown menu allows you to select a predefined setting for your command, you can either use this feature to set up the time for you or you can use custom time values in the fields below.
  • Minute. This field is used to specify the minute value when your command will run.
  • Hour. This field is used to specify the hour value when your command will run.
  • Day. This field is used to specify the day value when your command will run.
  • Month. This field is used to specify the month value when your command will run.
  • Weekday. This field is used to specify the weekday value when your command will run.
  • Command. In this field, you must enter the Linux command that will run at the times specified by the fields above.
    For example, you can use this command to run a PHP script located in your public_html directory at the specified times:
    php -f /home/YOUR_CPANEL_USERNAME/public_html/file.php
    IMPORTANT! You must insert your actual cPanel username instead of YOUR_CPANEL_USERNAME.
Cron add

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.

Cron add confirm

Step 3. Removing and editing existing Cron jobs

To remove your current Cron job, perform the following steps:

Cron delete
  • Click the Delete icon next to the Cron job that you want to remove.
Cron delete conf
  • Click Delete button.

To edit your current Cron job, perform the following steps:

Cron edit
  • Click the Edit icon next to the Cron job that you want to edit.
Cron edit conf
  • Update Your settings with new settings and click the Edit Line button.

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).

How to Set Up cPanel/WHM on VPS

If you’re using Hostinger, once you’ve subscribed to cPanel 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.

Pro Tip

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.

Things needed:

  • VPS hosting with pre-installed cPanel/WHM
  • Root login details

Step 1. Access the WHM Setup Wizard

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 31.220.57.32. To reach WHM you can either enter http://31.220.57.32:2086/ or https://31.220.57.32: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).

bad connection alert when login to whm

Once clicked, you’ll be directed to the WHM login window. You need to fill in the root login details here.

Step 2. Confirm cPanel & WHM User Agreement

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.

user agreement for whm/cpanel initial set up

Step 3. Configure Nameservers

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.

configure the nameserver for whm/cpanel

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.

whm dashboard

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.

Things needed:

  • Access to your WHM account

Step 1. Access the Feature Manager

  1. Once logged in to WHM open the Feature Manager tool. You can search it by name, or find it available under the Packages section.feature manager tool in whm
  2. Enter the feature list’s name and click the Add Feature List button

Step 2. Configure the Feature List

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.

list of feature you can enable or disable from whm

You’ll receive a confirmation message when it’s successfully created. The feature list management box will also appear.

feature creation success message

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.

How to Transfer Full cPanel Backup to VPS

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.

Things needed:

  • Access to your shared cPanel account
  • Access to your VPS

Step 1. Obtain VPS Access Details

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.

ssh details on hostinger user dashboard

Step 2. Create and Transfer the Backup

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:

  • Remote Server — enter your VPS IP address
  • Remote User — enter your VPS SSH username
  • Remote Password — enter the password for the SSH username
  • Port — the default port number is 22. Otherwise, use any port number listed on your VPS details
  • Remote Dir — specify the backup directory. You should placed it in /home, /home2, /home3, /root, /usr, /usr/home, or /web directories to ensure a successful backup restoration afterwards

Once you fill all the information, click Generate Backup button.

generate and transfer full backup using SCP in cpanel

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.

How to Restore Backup on VPS running cPanel/WHM

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.

Things needed:

  • Access to the WHM
  • Full cPanel backup. A transferred file uploaded to the VPS or the one that you save locally

Step 1. Restore From the Existing Backup

  1. Once you’re logged into your WHM account, search and open Restore a Full Backup/cpmove File tool that is available under the Backup section.Restore a Full Backup/cpmove File tool in whm
  2. You’ll get directed to a new window, scroll down to the Settings section. Here are explanations for each of the options:
  • Restore with Username — this is the default option, you need to use this to restore the backup you’ve transferred on the server
  • Restore with File — alternative restoration option, you need to locate the backup file and upload it from your computer
  • Username for the account that you wish to restore — list of available backups will be available here. You can choose which account should be restored. In our case, it’s hosti647
  • Update the A records — you have two options here, to update all the DNS records or replace basic A Records provided by cPanel. If you don’t want to use any services from the previous provider, you can choose the first option
  • Overwrite the existing user — you can use this option to update data of an existing user on your VPS
  • Assign a Dedicated IP Address — you can assign a specific IP to a user, so they can access the directory using the IP address
backup restoration settings

When you’re satisfied with the settings, click the Restore button. You’ll see a progress window while the process takes place.

backup restoration progress

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.

local summary for the backup restoration

Step 2. Restore From a Local Backup File

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.

restore using the file that has been downloaded previously

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.

Conclusion

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!

Author
The author

Luqmanul M.

Luqman is a self-proclaimed social scientist. He is passionate about education, technology, and everything in between. He wants to help create a high-quality education system. Having spent the past four years as a social researcher and blog guru, he lends his skills to Hostinger's digital content team. As for free time, he enjoys reading scientific (and not-so-scientific) literature with a cup of black arabica coffee as a companion.