If you have a ZIP archive containing a WordPress, Joomla, static HTML, or PHP website, you can deploy it on your hosting server easily. Below are step-by-step methods for different hosting environments.
1 Deploy ZIP Archive Using cPanel
If your hosting provider offers cPanel, this is the easiest method for deploying your website.
Step 1: Upload the ZIP File
- Log in to cPanel: Access your cPanel at
https://yourdomain.com/cpanelor the URL provided by your host - Navigate to File Manager: Find "File Manager" under the "Files" section
- Open the correct directory:
- For main domain:
public_html/ - For subdomain:
public_html/subdomain/ - For addon domain:
public_html/addondomain/
- For main domain:
- Upload ZIP file:
- Click "Upload" button in the toolbar
- Select your
.zipfile from your computer - Wait for upload to complete (progress bar shows status)
Step 2: Extract the ZIP Archive
- Locate the uploaded ZIP file: It should appear in your File Manager
- Right-click the ZIP file or select it and click "Extract" from the toolbar
- Choose extraction location:
- Extract to current directory (public_html/)
- Or extract to a subfolder if you prefer
- Click "Extract File(s)" and wait for extraction to complete
Step 3: Organize Files (If Needed)
If files extract into a subfolder (e.g., public_html/website/):
- Open the subfolder in File Manager
- Select all files and folders (Ctrl+A or Cmd+A)
- Click "Move" from toolbar
- Enter destination:
public_html/ - Click "Move File(s)"
- Delete the now-empty subfolder
Step 4: Test the Website
- Open your browser
- Visit your domain:
https://yourdomain.com/ - If the website doesn't load, check:
- Correct files are in
public_html/ - Main file is named
index.php,index.html, orindex.htm - No .htaccess conflicts
- Correct files are in
2 Deploy ZIP Archive Using FTP (FileZilla)
If your hosting doesn't have cPanel or you prefer using FTP, this method works with any hosting environment.
Step 1: Prepare Your FTP Client
- Download and install FileZilla: https://filezilla-project.org/
- Gather FTP credentials: From your hosting provider, you'll need:
- Host/Server: ftp.yourdomain.com or server IP
- Username: Your FTP username
- Password: Your FTP password
- Port: Usually 21 (default)
Step 2: Connect and Upload ZIP File
- Open FileZilla and enter your FTP credentials in the top bar
- Click "Quickconnect" or press Enter
- Navigate to website root:
# For main domain
/public_html/
# For VPS/dedicated servers
/var/www/html/
or
/home/username/public_html/ - Upload the ZIP file:
- In the left panel (Local site), navigate to your ZIP file location
- Drag the ZIP file from left panel to right panel (Remote site)
- Monitor transfer queue at the bottom
Step 3: Extract the ZIP File
After uploading, you need to extract the ZIP file. Choose one method:
Method A: Extract via cPanel (If available)
- Log in to cPanel
- Go to File Manager
- Find and extract the ZIP file as described in previous section
Method B: Extract via SSH (If you have SSH access)
ssh username@yourdomain.com
# Navigate to website directory
cd /home/username/public_html/
# Extract ZIP file
unzip website.zip
# If unzip is not installed, install it:
sudo apt install unzip # Ubuntu/Debian
sudo yum install unzip # CentOS/RHEL
Method C: Extract locally and upload files individually
- Extract ZIP file on your computer
- Upload entire extracted folder via FTP
- This avoids extraction on server but takes longer
3 Deploy ZIP Archive Using SSH (For VPS Hosting)
If you have root access to a VPS or dedicated server, SSH provides the most control for deployment.
Step 1: Upload ZIP File via SCP
Secure Copy (SCP) transfers files securely over SSH:
scp website.zip username@yourserver.com:/var/www/html/
# With specific SSH port (if not default 22)
scp -P 2222 website.zip username@yourserver.com:/var/www/html/
# Upload to user's home directory
scp website.zip username@yourserver.com:~/
You'll be prompted for your SSH password or use SSH keys for authentication.
Step 2: SSH into Your Server
ssh username@yourserver.com
# If using custom SSH port
ssh username@yourserver.com -p 2222
# Switch to root if needed (not recommended for regular tasks)
sudo su -
Step 3: Extract the ZIP File
cd /var/www/html/
# List files to verify ZIP uploaded
ls -la
# Extract ZIP file
unzip website.zip
# If ZIP has nested folder structure
unzip website.zip -d .
# Extract with verbose output
unzip -v website.zip
# Extract specific files only
unzip website.zip "*.php" "*.html"
Step 4: Organize Files (If Needed)
mv website/* .
mv website/.* . 2>/dev/null || true
# Remove empty directory
rmdir website
# Or if subdirectory not empty
rm -rf website
rm -rf command permanently deletes files. Double-check you're removing the correct directory.
rsync for more efficient transfers, or wget to download ZIP directly from a URL to your server.
4 Deploy ZIP Archive Using DirectAdmin
For DirectAdmin control panel users, here's the deployment process:
Step 1: Upload via File Manager
- Log in to DirectAdmin at
https://yourdomain.com:2222 - Go to "File Manager" under "Your Account"
- Navigate to
/domains/yourdomain.com/public_html/ - Click "Upload" and select your ZIP file
- Wait for upload to complete
Step 2: Extract ZIP File
- In File Manager, find your uploaded ZIP file
- Select the ZIP file by checking the box next to it
- Click "Extract" from the toolbar
- Choose extraction path (usually current directory)
- Click "Extract"
5 Deploy ZIP Archive Using Plesk
For Plesk control panel users, follow these steps:
Step 1: Upload via File Manager
- Log in to Plesk at
https://yourdomain.com:8443 - Select your domain from the list
- Go to "Files" in the left menu
- Navigate to
httpdocs/(orhttpsdocs/for SSL) - Click "Upload" and select your ZIP file
Step 2: Extract ZIP File
- After upload, find the ZIP file in the file list
- Check the box next to the ZIP file
- Click "More" > "Extract"
- Choose extraction directory (usually current folder)
- Click "OK"
6 Final Steps: Configure the Website
Set Correct File Permissions
If the website doesn't load or has permission errors:
find /var/www/html -type d -exec chmod 755 {} \;
# Set file permissions (644)
find /var/www/html -type f -exec chmod 644 {} \;
# Set executable permissions for specific files
chmod +x /var/www/html/script.sh
# Change ownership to web server user
chown -R www-data:www-data /var/www/html # Ubuntu/Debian
chown -R apache:apache /var/www/html # CentOS/RHEL
chown -R nginx:nginx /var/www/html # Nginx servers
| File/Directory Type | Recommended Permission | Numeric Value |
|---|---|---|
| Directories/Folders | rwxr-xr-x | 755 |
| Regular Files (HTML, CSS, JS, Images) | rw-r--r-- | 644 |
| PHP Files | rw-r--r-- | 644 |
| Configuration Files (.htaccess, wp-config.php) | rw------- | 600 |
| Upload Directories (WordPress wp-content/uploads) | rwxrwxr-x | 775 |
| Executable Files (CGI scripts) | rwxr-xr-x | 755 |
Configure the Database (For WordPress, Joomla, etc.)
Step 1: Create Database
For cPanel:
- Go to "MySQL Databases"
- Create new database (e.g.,
username_dbname) - Create database user with strong password
- Add user to database with "All Privileges"
For SSH/VPS:
mysql -u root -p
# Create database
CREATE DATABASE yourdatabase;
# Create user
CREATE USER 'youruser'@'localhost' IDENTIFIED BY 'strongpassword';
# Grant privileges
GRANT ALL PRIVILEGES ON yourdatabase.* TO 'youruser'@'localhost';
# Apply changes
FLUSH PRIVILEGES;
# Exit
EXIT;
Step 2: Update Configuration Files
WordPress (wp-config.php):
define( 'DB_NAME', 'yourdatabase' );
define( 'DB_USER', 'youruser' );
define( 'DB_PASSWORD', 'strongpassword' );
define( 'DB_HOST', 'localhost' );
define( 'DB_CHARSET', 'utf8mb4' );
Joomla (configuration.php):
public $user = 'youruser';
public $password = 'strongpassword';
public $host = 'localhost';
public $dbprefix = 'jos_';
Restart Web Server (For VPS)
sudo systemctl restart apache2 # Ubuntu/Debian
sudo systemctl restart httpd # CentOS/RHEL
# For Nginx
sudo systemctl restart nginx
# For OpenLiteSpeed
sudo systemctl restart lsws
# Check service status
sudo systemctl status apache2
7 Troubleshooting
| Problem | Possible Cause | Solution |
|---|---|---|
| ZIP file won't upload | File too large, permission denied, disk full | Check file size limits, verify disk space, check write permissions |
| Cannot extract ZIP | Corrupt ZIP file, insufficient permissions, unzip not installed | Re-download ZIP, check file integrity, install unzip utility |
| Website shows 404 error | Wrong directory, missing index file, .htaccess issues | Verify files in correct location, check for index.* files, review .htaccess |
| Permission denied errors | Incorrect file ownership or permissions | Set correct permissions: folders 755, files 644, config files 600 |
| Database connection error | Wrong credentials, database not created, MySQL service down | Verify database credentials, create database if missing, restart MySQL |
| Mixed content warnings (SSL) | HTTP resources loaded on HTTPS site | Update URLs to HTTPS, use relative paths, install SSL certificate |
| White screen/blank page | PHP errors, memory limit, corrupt files | Enable error reporting, increase PHP memory, check PHP version compatibility |
8 Summary
| Method | Best For | Key Steps |
|---|---|---|
| cPanel Deployment | Shared hosting with cPanel | Upload ZIP > File Manager > Extract > Organize files |
| FTP Deployment (FileZilla) | Any hosting with FTP access | Connect via FTP > Upload ZIP > Extract via cPanel or SSH |
| SSH Deployment (VPS) | VPS/dedicated servers with SSH access | SCP upload > SSH extract > Set permissions > Configure |
| DirectAdmin Deployment | DirectAdmin control panel users | File Manager upload > Extract > Configure |
| Plesk Deployment | Plesk control panel users | Files section > Upload > Extract > Configure |
| Post-Deployment | All methods | Set permissions > Configure database > Restart services > Test |
Now your website is fully deployed from a ZIP archive and ready for visitors!


