Deploy to cPanel / Plesk
What Are cPanel and Plesk?
Section titled “What Are cPanel and Plesk?”cPanel and Plesk are web hosting control panels — graphical interfaces that let you manage your website files, domains, email accounts, and databases without touching the command line.
They are the two most widely used control panels in the hosting industry . Most shared hosting providers bundle one of them with every hosting plan.
| Feature | cPanel | Plesk |
|---|---|---|
| Operating System | Linux only | Linux and Windows |
| Interface Style | Classic, feature-rich | Modern, streamlined |
| Best For | Beginners, ease of use | Developers, cross-platform needs |
| Login Port | :2083 | :8443 |
For Astro Docus — a static site — both panels work identically. You build locally, upload the dist/ folder, and the panel serves your files. No Node.js runtime is needed on the server.
Prerequisites
Section titled “Prerequisites”Before starting, you need:
- A shared hosting plan with cPanel or Plesk
- Your domain pointed to the hosting provider’s nameservers
- Your Astro Docus project built locally (
npm run buildworks) - Access to your control panel login credentials
Step 1 — Log In to Your Control Panel
Section titled “Step 1 — Log In to Your Control Panel”cPanel Login
Section titled “cPanel Login”- Open your browser
- Navigate to:
https://yourdomain.com:2083orhttps://yourdomain.com/cpanel - Enter your username and password
- If two-factor authentication is enabled, enter the six-digit code
Your hosting provider may also provide a single-sign-on link from their client area .
Plesk Login
Section titled “Plesk Login”- Open your browser
- Navigate to:
https://yourdomain.com:8443 - Enter your username and password
- Click Log In
SSL Warning: If you see a security warning, it means no SSL certificate is installed yet. You can safely skip it for now .
Step 2 — Build Your Site Locally
Section titled “Step 2 — Build Your Site Locally”On your local machine (not the server), run:
npm run buildThis generates the dist/ folder containing all your static files — index.html, _astro/, assets, and more.
Compress the dist folder into a ZIP file for easier upload:
- Windows: Right-click
dist→ Send to → Compressed (zipped) folder - macOS: Right-click
dist→ Compress “dist” - Linux:
zip -r dist.zip dist/
Step 3 — Upload Files via File Manager
Section titled “Step 3 — Upload Files via File Manager”Both cPanel and Plesk include a built-in File Manager for uploading files through the browser.
cPanel — Upload and Extract
Section titled “cPanel — Upload and Extract”- In cPanel, navigate to the Files section → click File Manager
- Double-click the
public_htmlfolder — this is the root directory for your main domain - Click the Upload button
- Drag your
dist.zipfile into the upload area, or click Select File - Wait for the green progress bar to complete
- Click Go Back to return to File Manager
- Right-click the uploaded
dist.zipfile → click Extract - Confirm the extraction path — it should extract into
public_html/ - After extraction, delete the
dist.zipfile to save space
Important: If your
distfolder contains a nesteddist/directory after extraction, move the contents up one level soindex.htmlsits directly insidepublic_html/.
Plesk — Upload and Extract
Section titled “Plesk — Upload and Extract”- In Plesk, go to Websites & Domains → click your domain name → File Manager
- Navigate to the
httpdocsfolder (Plesk’s equivalent ofpublic_html) - Click the Upload button
- Select Upload File and choose your
dist.zip - Once uploaded, click the Extract Files button
- Confirm the extraction — check “Replace existing files” if prompted
- Delete the ZIP file after extraction
Plesk’s File Manager supports extracting ZIP, RAR, TAR, TGZ, and TAR.GZ archives .
Step 4 — Verify Your Site
Section titled “Step 4 — Verify Your Site”After extraction, open your browser and visit:
https://yourdomain.comYour Astro Docus site should be live.
If you see a default hosting page instead of your site, check:
- Files are in the correct directory (
public_htmlfor cPanel,httpdocsfor Plesk) index.htmlexists at the root of that directory- The domain’s DNS is pointing to this hosting account
Step 5 — Enable SSL (HTTPS)
Section titled “Step 5 — Enable SSL (HTTPS)”Most shared hosts include free SSL via Let’s Encrypt through AutoSSL.
cPanel — AutoSSL
Section titled “cPanel — AutoSSL”- In cPanel, search for SSL/TLS Status or AutoSSL
- Click Run AutoSSL for your domain
- Wait a few minutes for the certificate to be issued
- The hosting provider handles automatic renewal
Plesk — Let’s Encrypt
Section titled “Plesk — Let’s Encrypt”- In Plesk, go to Websites & Domains → your domain
- Click SSL/TLS Certificates
- Click Install next to Let’s Encrypt
- Enter your email address
- Plesk installs and renews the certificate automatically
Once SSL is active, your site should redirect from http:// to https:// automatically.
Optional — Create a Subdomain for Docs
Section titled “Optional — Create a Subdomain for Docs”If your main domain hosts something else (like a WordPress site) and you want Astro Docus at docs.yourdomain.com:
cPanel — Create Subdomain
Section titled “cPanel — Create Subdomain”- Go to Domains → Create a New Domain
- Enter the full subdomain:
docs.yourdomain.com - Deselect “Share document root” — this gives the subdomain its own folder
- Set the Document Root to something like
/home/username/docs - Click Submit
- Upload your
distcontents into that new folder
Plesk — Create Subdomain
Section titled “Plesk — Create Subdomain”- Go to Websites & Domains → click Add Subdomain
- Enter the subdomain name:
docs - Select the parent domain
- Set the document root
- Click OK
- Upload your files into the subdomain’s folder
Troubleshooting
Section titled “Troubleshooting”| Problem | Likely Cause | Fix |
|---|---|---|
| Default page still showing | Wrong upload directory | Ensure files are in public_html / httpdocs |
| 403 Forbidden | File permissions | Set folders to 755, files to 644 |
| 404 on subpages | Missing index.html | Check that index.html exists at root |
| CSS/JS not loading | Wrong base path | Check astro.config.mjs site URL |
| Changes not showing | Browser cache | Hard refresh (Ctrl+Shift+R) |
| SSL not working | Certificate not issued | Run AutoSSL or install Let’s Encrypt |
Quick Recap
Section titled “Quick Recap”1. Log in to cPanel (:2083) or Plesk (:8443)2. Build locally: npm run build3. Compress dist/ into dist.zip4. Upload via File Manager: - cPanel: public_html/ - Plesk: httpdocs/5. Extract the ZIP6. Delete the ZIP file7. Visit https://yourdomain.com8. Enable SSL (AutoSSL or Let's Encrypt)cPanel and Plesk are the easiest hosting options for beginners. No terminal, no server configuration — just upload and extract. The File Manager handles everything through a web interface .
👉 Next: Explore other deployment options in the docs/deploy-hosting/ section.