Skip to content
  • About
  • Contact
  • Docs
  • Features
  • Home

Configurations

5
  • Setup RAID Level 6
  • Setup RAID Level 5
  • How To Add Swap on RHEL or Centos based system
  • Website Migration to Non-Panel OpenLiteSpeed Server
  • Linux Server Performance Tuning

CyberPanel

9
  • Mounting /tmp on a Separate File
  • Updating CyberPanel Main VirtualHost Configuration
  • Updating CyberPanel vHosts Configuration
  • How to Change CLI PHP on CyberPanel
  • How to Update PHP Version to 8.1 in CyberPanel (From 7.3, 7.4, or 8.0)
  • CyberPanel Server Cleanup: Logs, Dumps, Backups
  • CyberPanel Full LSPHP Installation PHP 7.4 – 8.3
  • CyberPanel / OpenLiteSpeed: Clean LSPHP Session Files
  • SSL Certificate Management in CyberPanel via SSH

Hestia Control Panel

6
  • Fixing Email Bounce Back Issue in Hestia (Exim4 Blacklist Rejection)
  • Managing Fail2Ban in HestiaCP Server
  • Installing and Configuring PHP Versions in HestiaCP
  • phpMyAdmin Not Found in HestiaCP
  • Setting Up a Reverse Proxy for any Port in HestiaCP
  • How to Install Let’s Encrypt SSL in Hestia CP (Hostname, Admin Panel, and Email Server)

WHM/cPanel

6
  • Setting Up a Reverse Proxy on cPanel/WHM for Port 8081
  • How to increase the size of the cPanel-generated /tmp filesystem
  • Installing Old PHP Versions on a cPanel/WHM Server
  • Fixing “550: Your Country is Not Allowed to Connect to This Server” Error in Exim (cPanel)
  • Enable WP-CLI in CageFS on CloudLinux Servers (WHM/cPanel)
  • Securing /tmp and /var/tmp with a Dedicated Loopback Filesystem

Nagios

5
  • Service Checks
  • Uptime Checks
  • Disk Space Checks
  • Load Checks
  • Email Related Checks

WordPress

3
  • WordPress Core Reinstallation Guide
  • Managing WordPress Users via WP-CLI
  • Website Duplication, Migration, or Domain Change

Operating System

1
  • Server Reboot (RHEL or Centos based system)

AWS

1
  • How to Resize EBS Volumes on AWS

Databases

2
  • MySQL
    • Optimizing MySQL Performance
    • Recovering MySQL in Plesk When InnoDB Crashes

CloudLinux

4
  • Moving cagefs-skeleton directory
  • Enable WP-CLI in CageFS on CloudLinux Servers (WHM/cPanel)
  • Enable bc in CageFS on CloudLinux Servers(WHM/cPanel)
  • How to Upgrade MySQL 5.x to MySQL 8.0 on CloudLinux (WHM server) with MySQL Governor

Cloudflare

1
  • Configuring Security Headers in Cloudflare

ISPmanager

1
  • Install Free SSL (Let’s Encrypt) for domain.tld on ISPmanager with NGINX

Plesk

1
  • Plesk Admin Login Blocked – IP Restriction Recovery Guide

VPN

4
  • Install OpenVPN Open Source in Linux CentOS Ubuntu Debian Servers
  • Protected: OpenVPN Installation & Fix Wiki (CloudLinux / CentOS 7 & 8)
  • Outline VPN Installation & Management Guide
  • Installing AdGuard Home on Debian/Ubuntu (Docker)
View Categories
  • Home
  • Docs
  • Configurations
  • Website Migration to Non-Panel OpenLiteSpeed Server

Website Migration to Non-Panel OpenLiteSpeed Server

🖥️ Step-by-Step Migration to OpenLiteSpeed (No Control Panel)

 Add a New User
useradd -m username -s /bin/bash

 useradd: Adds a new user to the system.
-m: Creates a home directory for the user (e.g., /home/username)
-s /bin/bash : Sets the default shell for the user to /bin/bash.

Sets directory permissions:

chmod 751 /home/username

 Owner has full access (7),
Group has read and execute (5),
Others can only execute (1) — needed for the web server to traverse the directory.

Set Up Web Root Directory
mkdir -p /home/username/domain.tld/{public_html,logs}

-p: Creates the whole directory path if it doesn’t exist.
domain.tld/public_html : Where your website files go.
domain.tld/logs: For storing access/error logs.

Correct the ownership Web Root Directory

cd /home/username/
chown username. * -R

Changes ownership of all files in  /home/username to the user username.
* -R : Recursively applies to all files and folders.

Restore Website Files from cPanel Backup

Navigates into the public web directory where files will be restored.

cd /home/username/domain.tld/public_html/

Downloads the cPanel backup file from your server

wget http://<your-server-ip>/cpmove-username.tar.gz

Replace <your-server-ip> with your actual server’s IP.

Extracts the `.tar.gz` archive and shows a list of files being extracted.

tar -xvf cpmove-username.tar.gz

Deletes the empty public_html directory and moves the extracted website files into place

rm -rf public_html
mv cpmove-username/homedir/public_html .

Deletes the empty `public_html` directory created earlier.
Moves the extracted real website files into place.

Correct the ownership and group for Web Root Directory

chown username. * -R

Ensures the extracted files belong to the correct system user.

Configure OpenLiteSpeed Virtual Host

File to edit:  /usr/local/lsws/conf/httpd_config.conf

Add a new virtualhost and listener mapping for ports 80 and 443, just like other domains already configured.

Create vhost config:

mkdir -p /usr/local/lsws/conf/vhosts/domain.tld/
vim /usr/local/lsws/conf/vhosts/domain.tld/vhost.conf

 Use existing vhost.conf files in /usr/local/lsws/conf/vhosts/ as a template.
make sure set correct permissions and ownership for the OpenLiteSpeed vhost.conf file

Setup MySQL Database and User

Creates a new MySQL database.

CREATE DATABASE DATABASENAME;

Creates a MySQL user who can only connect from the local machine.

CREATE USER 'DATABASEUSERNAME'@'localhost' IDENTIFIED BY 'PASSWORD';

Grants full permissions on the database to that user.

GRANT ALL PRIVILEGES ON DATABASENAME.* TO 'DATABASEUSERNAME'@'localhost';

Reloads the privilege tables so that changes take effect.

FLUSH PRIVILEGES;

Imports your SQL file into the new database.

mysql DATABASENAME < /path/to/database.sql
Generate SSL with acme.sh (Cloudflare DNS)

Navigate to the directory where acme.sh is installed.

cd ~/.acme.sh/

Issue SSL for the domain

./acme.sh --issue -d dommin.tld -d *.dommin.tld --dns dns_cf --reloadcmd "systemctl restart lsws;"

–issue: Starts the certificate issuance process.
-d domain.tld -d *.domain.tld`: For both root and wildcard subdomains.
–dns dns_cf: Uses Cloudflare’s DNS API for validation.
–reloadcmd: Reloads OpenLiteSpeed after issuing the certificate.

Summary / Conclusion

This guide walks you through migrating a website to a non-panel server running OpenLiteSpeed, covering every major aspect from system user creation to SSL setup.

What we Accomplished:

  • Created a dedicated system user with secure permissions.
  • Set up the directory structure (public_html, logs) for hosting the website.
  • Restored a cPanel backup manually using shell commands.
  • Configured OpenLiteSpeed by adding new virtual host entries and mapping ports 80/443.
  • Imported the MySQL database and set up user privileges securely.
  • Enabled SSL encryption with a free Let’s Encrypt certificate using acme.sh
Table of Contents
  •  Add a New User
  • Set Up Web Root Directory
  • Restore Website Files from cPanel Backup
  • Configure OpenLiteSpeed Virtual Host
  • Setup MySQL Database and User
  • Generate SSL with acme.sh (Cloudflare DNS)
  • Summary / Conclusion

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest

Was it helpful ?

  • Happy
  • Normal
  • Sad
  • About
  • Contact
  • Docs
  • Features
  • Home

© 2026 Panel Web Hosting

  • About
  • Contact
  • Docs
  • Features
  • Home