Era Host hosting
EraHost – Free Domain, Cheap Hosting!
Client Area
Support 24/7
Menu

Deploy a Website from a ZIP Archive on a Hosting Server

9 min read
27.02.2026

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.

Deploy Website from ZIP Archive on Hosting Server
Deploying a site from a .zip archive — every panel's native path.

For the cPanel side of website setup that runs alongside this, see cPanel Hosting Login: How to Access and Add a Website; for the FTP-only side, phpMyAdmin guide covers the database half of a typical CMS restore.

Before You Begin: Ensure your ZIP archive contains the complete website structure. For CMS sites (WordPress, Joomla), the archive should include all files and folders, but may exclude the database which needs separate setup.

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

  1. Log in to cPanel: Access your cPanel at https://yourdomain.com/cpanel or the URL provided by your host
  2. Navigate to File Manager: Find "File Manager" under the "Files" section
  3. Open the correct directory:
    • For main domain: public_html/
    • For subdomain: public_html/subdomain/
    • For addon domain: public_html/addondomain/
  4. Upload ZIP file:
    • Click "Upload" button in the toolbar
    • Select your .zip file from your computer
    • Wait for upload to complete (progress bar shows status)

Step 2: Extract the ZIP Archive

  1. Locate the uploaded ZIP file: It should appear in your File Manager
  2. Right-click the ZIP file or select it and click "Extract" from the toolbar
  3. Choose extraction location:
    • Extract to current directory (public_html/)
    • Or extract to a subfolder if you prefer
  4. 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/):

  1. Open the subfolder in File Manager
  2. Select all files and folders (Ctrl+A or Cmd+A)
  3. Click "Move" from toolbar
  4. Enter destination: public_html/
  5. Click "Move File(s)"
  6. Delete the now-empty subfolder

Step 4: Test the Website

  1. Open your browser
  2. Visit your domain: https://yourdomain.com/
  3. If the website doesn't load, check:
    • Correct files are in public_html/
    • Main file is named index.php, index.html, or index.htm
    • No .htaccess conflicts
cPanel Alternative: Some hosts have "Backup" or "Site Software" sections that can also handle ZIP deployment. Check if your host offers "Softaculous" or similar one-click installers that can import from ZIP.

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

  1. Download and install FileZilla: https://filezilla-project.org/
  2. 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

  1. Open FileZilla and enter your FTP credentials in the top bar
  2. Click "Quickconnect" or press Enter
  3. Navigate to website root:
    # For main domain
    
              /public_html/
    
    
              # For VPS/dedicated servers
    
              /var/www/html/
    
              or
    
              /home/username/public_html/
  4. 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)

  1. Log in to cPanel
  2. Go to File Manager
  3. Find and extract the ZIP file as described in previous section

Method B: Extract via SSH (If you have SSH access)

# Connect via SSH first

      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

  1. Extract ZIP file on your computer
  2. Upload entire extracted folder via FTP
  3. This avoids extraction on server but takes longer
FTP Security: Always use SFTP (SSH File Transfer Protocol) or FTPS (FTP over SSL) instead of regular FTP for better security. These use port 22 or 990 respectively.

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:

# Basic SCP command

      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

# Connect via SSH

      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

# Navigate to web directory

      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)

# If files extract to subdirectory, move them up

      mv website/* .

      mv website/.* . 2>/dev/null || true


      
      # Remove empty directory

      rmdir website


      
      # Or if subdirectory not empty

      rm -rf website
Warning: The rm -rf command permanently deletes files. Double-check you're removing the correct directory.
Alternative Upload Methods: You can also use rsync for more efficient transfers, or wget to download ZIP directly from a URL to your server.

Deploy ZIP Archive Using DirectAdmin

For DirectAdmin control panel users, here's the deployment process:

Step 1: Upload via File Manager

  1. Log in to DirectAdmin at https://yourdomain.com:2222
  2. Go to "File Manager" under "Your Account"
  3. Navigate to /domains/yourdomain.com/public_html/
  4. Click "Upload" and select your ZIP file
  5. Wait for upload to complete

Step 2: Extract ZIP File

  1. In File Manager, find your uploaded ZIP file
  2. Select the ZIP file by checking the box next to it
  3. Click "Extract" from the toolbar
  4. Choose extraction path (usually current directory)
  5. Click "Extract"

Deploy ZIP Archive Using Plesk

For Plesk control panel users, follow these steps:

Step 1: Upload via File Manager

  1. Log in to Plesk at https://yourdomain.com:8443
  2. Select your domain from the list
  3. Go to "Files" in the left menu
  4. Navigate to httpdocs/ (or httpsdocs/ for SSL)
  5. Click "Upload" and select your ZIP file

Step 2: Extract ZIP File

  1. After upload, find the ZIP file in the file list
  2. Check the box next to the ZIP file
  3. Click "More" > "Extract"
  4. Choose extraction directory (usually current folder)
  5. Click "OK"
cPanel Hosting
Full control over your website
  • Convenient
  • Simple
  • Fast
  • Free 7-day trial
cPanel Hosting

Final Steps: Configure the Website

Set Correct File Permissions

If the website doesn't load or has permission errors:

# Set directory permissions (755)

    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:

  1. Go to "MySQL Databases"
  2. Create new database (e.g., username_dbname)
  3. Create database user with strong password
  4. Add user to database with "All Privileges"

For SSH/VPS:

# Log in to MySQL/MariaDB

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

// ** MySQL settings ** //

      define( 'DB_NAME', 'yourdatabase' );

      define( 'DB_USER', 'youruser' );

      define( 'DB_PASSWORD', 'strongpassword' );

      define( 'DB_HOST', 'localhost' );

      define( 'DB_CHARSET', 'utf8mb4' );

Joomla (configuration.php):

public $db = 'yourdatabase';

      public $user = 'youruser';

      public $password = 'strongpassword';

      public $host = 'localhost';

      public $dbprefix = 'jos_';

Restart Web Server (For VPS)

# For Apache

    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

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

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
Best Practices: Always backup existing files before deployment. Test the website thoroughly after deployment. Keep your ZIP archive safely stored for future redeployment needs.

Now your website is fully deployed from a ZIP archive and ready for visitors!

Frequently asked questions
ZIP + extract wins almost always. Uploading 5000 small files over FTP is slow because each file is a round-trip. Uploading one ZIP and extracting server-side is a single transfer plus a server-local unzip. For a typical WordPress install, that's seconds vs tens of minutes.
Directories 755, files 644, sensitive config files like wp-config.php 600. Most extractors preserve the permissions stored in the zip — verify with ls -la /public_html/ after extraction. Common WordPress recommendation: find /public_html -type d -exec chmod 755 {} \; and find /public_html -type f -exec chmod 644 {} \;.
Always extract to the document root (e.g. /public_html/), then check whether the zip contains a wrapper directory. Many zips of WordPress sites have everything inside wordpress-site/ — if your URL routes to /public_html/, you need to move the contents up or set the document root to the subdirectory.
Three usual reasons: (1) wp-config.php has the old server's database credentials; update DB_NAME/DB_USER/DB_PASSWORD to the new server's values; (2) you haven't imported the SQL dump yet; phpMyAdmin → import the .sql file; (3) database user lacks privileges; GRANT ALL ON db.* TO user@localhost. Check the error log to disambiguate.
Related articles
Understanding the .cagefs Folder in CloudLinux (cPanel Hosting)
Revisium Antivirus Overview: Complete Website Security Solution
Understanding cpanel_form_file.upload