Home Knowledge base Skyline Cloud How to Host a Website on cPanel (Step by Step) KNOWLEDGE BASE

How to Host a Website on cPanel (Step by Step)

A practical, step-by-step guide to publishing a live website on cPanel: pointing your domain, uploading files, creating a database, and securing it with free SSL — on in-Kingdom Saudi hosting.

cPanel is the most widely used web hosting control panel in the world, and for good reason: it turns server administration into a point-and-click task. This guide walks you through hosting a website on cPanel from start to finish — pointing your domain, uploading files, creating a database, and locking everything down with free SSL.

We'll use Skyline Cloud web hosting as the reference, where your data stays in-Kingdom for PDPL, NCA, and SDAIA alignment, with local Arabic support — but every step applies to any standard cPanel host.

Before you start

You'll need three things:

  • An active cPanel hosting account (you can sign up here).
  • A registered domain name — a .sa domain or any other TLD.
  • Your website files: either a static site (HTML/CSS/JS) or a CMS like WordPress.

When your account is provisioned, you'll receive a welcome email with your cPanel login URL (typically https://yourserver:2083 or https://yourdomain.com/cpanel), a username, and a password.

Step 1: Point your domain to the server

Before uploading anything, your domain must resolve to your hosting server. There are two common approaches.

Option A — Use the host's nameservers (recommended). Log in to your domain registrar and replace the nameservers with the ones in your welcome email, for example:

ns1.alskyline.com
ns2.alskyline.com

This delegates all DNS to your host, so cPanel manages your records automatically.

Option B — Keep your current DNS and point an A record. If you manage DNS elsewhere, create A records pointing to your server's IP:

Type Name Value TTL
A @ 203.0.113.10 3600
A www 203.0.113.10 3600

DNS changes can take anywhere from a few minutes to 48 hours to propagate globally. Verify with:

dig +short yourdomain.com

Step 2: Add your domain in cPanel

If the domain isn't already your primary domain, add it under Domains:

  1. Open cPanel and go to Domains (or Addon Domains on older themes).
  2. Click Create a New Domain.
  3. Enter your domain. cPanel auto-fills the document root, usually /home/username/public_html for the primary domain, or /home/username/yourdomain.com for an addon domain.
  4. Click Submit.

Note the document root — it's the folder where your website files must live.

Step 3: Upload your website files

You have two reliable methods.

Using File Manager (no extra software)

  1. Open File Manager in cPanel.
  2. Navigate to your document root (public_html).
  3. Click Upload and select your files. If you have a .zip archive, upload it, then right-click and choose Extract — this is far faster than uploading hundreds of individual files.
  4. Make sure your homepage is named index.html or index.php. cPanel serves these automatically.

Using FTP/SFTP (best for large sites)

Create an FTP account under FTP Accounts, then connect with a client like FileZilla:

Host:     yourdomain.com  (or sftp://yourdomain.com)
Username: ftpuser@yourdomain.com
Password: your-ftp-password
Port:     21 (FTP) or 22 (SFTP)

Drag your files into public_html. SFTP on port 22 is encrypted and preferred when your plan supports SSH.

Step 4: Create a database (for dynamic sites)

Static HTML sites skip this step. WordPress, Laravel, and similar apps need a MySQL/MariaDB database.

  1. Open MySQL Databases in cPanel.
  2. Under Create New Database, enter a name (cPanel prefixes it, e.g. user_wpdb) and click Create Database.
  3. Under Add New User, create a user and a strong password.
  4. Under Add User to Database, select the user and database, then grant ALL PRIVILEGES.

Record the four values — database name, username, password, and host (localhost) — you'll need them in your app's config (for WordPress, wp-config.php):

define( 'DB_NAME', 'user_wpdb' );
define( 'DB_USER', 'user_wpuser' );
define( 'DB_PASSWORD', 'your-strong-password' );
define( 'DB_HOST', 'localhost' );

Tip: For a one-click WordPress install, many cPanel plans include WP Toolkit or Softaculous under the Software section, which provisions the database and config for you.

Step 5: Enable free SSL (HTTPS)

Never serve a site over plain HTTP. cPanel includes AutoSSL, which issues and auto-renews free Let's Encrypt-style certificates.

  1. Go to SSL/TLS Status under Security.
  2. Confirm your domain and www show a green padlock. If not, select them and click Run AutoSSL.
  3. AutoSSL validates ownership and installs the certificate within a few minutes — provided your domain already points to the server (Step 1).

Then force HTTPS by adding this to the top of the .htaccess file in public_html:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Step 6: Test and go live

Open https://yourdomain.com in a browser. You should see your site with a valid padlock. Quick checks:

  • No padlock? Re-run AutoSSL and confirm DNS has propagated.
  • Directory listing instead of your site? Your index file is misnamed or in the wrong folder.
  • "Database connection error"? Recheck the four database values in your config.

Finally, set up regular backups. Use cPanel's Backup tool or, better, a host-level cloud backup so you can restore quickly. If you also run business email on the same domain, see our business email hosting for keeping mail and web cleanly separated.

Why in-Kingdom hosting matters

For Saudi and GCC businesses, where your data physically lives is increasingly a compliance question, not just a performance one. Hosting your site and database in-Kingdom keeps you aligned with PDPL and NCA expectations, reduces latency for local visitors, and gives you Arabic-speaking support in your timezone. You can explore the full range of options on the web hosting in Saudi Arabia hub.

Get started

Ready to launch? Create your Skyline Cloud account, pick a cPanel hosting plan, and have your website live — securely and in-Kingdom — in minutes.

SKYLINE Engineering

@skyline

The engineering team at SKYLINE Industrial Solutions. We publish field-tested guides drawn from real KSA and GCC deployments.

See author profile
SKYLINE engineering services

Need this implemented for you?

Reading is free — building it right takes a team. SKYLINE engineers ship Skyline Cloud for Aramco vendors, banks, hospitals and government agencies across Saudi Arabia. Talk to us before you start.

Aramco Approved Contractor ISO 9001 · ISO 27001 SAMA CSF aligned NCA ECC ready 247+ KSA clients

Comments

0 total · 0 threads
Be the first to leave a comment.