FB pixel

Installing a Website on a VPS

7 06.07.2025

In today’s digital landscape, setting up a website on a VPS has become an essential task for web developers and site owners. VPS servers offer greater flexibility and capabilities than standard hosting solutions. This guide explores installing a website on a VPS using different approaches, including manual setups and control panels like DirectAdmin, cPanel, Webuzo, and ISPmanager.

Uploading a Website to a VPS Without a Control Panel

To upload a website to a VPS manually without using a control panel, follow these steps:

1. Connect to the Server via SSH

  • Windows: Use a tool like PuTTY to establish the connection;
  • macOS/Linux: Open the terminal and execute the following command: ssh user@server_IP_address

2. Transfer Files to the Server

  • Windows: Use WinSCP for file transfers;
  • macOS/Linux: Execute the following command to copy files: scp -r /path/to/your/files user@server_IP_address:/path/on/server

3. Install Required Software

  • Update server packages: sudo apt-get update
  • Install a web server (e.g., Apache or Nginx): sudo apt-get install apache2 or sudo apt-get install nginx
  • Optionally, install PHP and a database server: sudo apt-get install php mysql-server

4. Configure the Web Server

Apache

  • Create a virtual host file: sudo nano /etc/apache2/sites-available/your_site.conf
  • Add the following configuration:
    		ServerName your_domain.com
    DocumentRoot /path/to/your/site
    
  • Activate the site and restart Apache:
    sudo a2ensite your_site.conf
    sudo systemctl restart apache2

Nginx

  • Create a configuration file: sudo nano /etc/nginx/sites-available/your_site
  • Add the following configuration:
    server {
    		listen 80;
    server_name your_domain.com;
    root /path/to/your/site;
    index index.html index.htm index.php;
    
    }
  • Enable the site and restart Nginx:
    sudo ln -s /etc/nginx/sites-available/your_site /etc/nginx/sites-enabled/
    sudo systemctl restart nginx

5. Configure DNS

Ensure your domain points to the VPS IP address by updating DNS settings through your domain registrar.

6. Test the Website

Open a browser and navigate to your domain to confirm the site is working correctly.

Uploading a Website to a VPS Using DirectAdmin

1. Access the Control Panel

Open your browser and go to your server’s address, adding port 2222. For example: http://your_domain:2222 or http://server_IP_address:2222

Log in using the credentials provided by your hosting provider.

2. Create a User Account (If Necessary)

If logged in as an administrator, you may need to create a user account for your domain:

  1. Navigate to Reseller Level.
  2. Select Add New User.
  3. Fill in the required fields, including domain, username, password, and service package.

3. Add the Domain

  1. Under the user level, go to Domain Setup
  2. Click Add Another Domain.
  3. Enter your domain and click Create.

4. Upload Website Files

Using the File Manager:

  1. Go to File Manager.
  2. Navigate to the domain directory: /domains/your_domain/public_html/.
  3. Click Upload files to current directory and upload your site files.

Using an FTP Client:

  1. In DirectAdmin, go to FTP Management and create a new FTP account if needed.
  2. Install an FTP client like FileZilla and configure a new connection with the following parameters:
    1. Host: Your domain or server IP.
    2. Port: 21.
    3. Protocol: FTP (or SFTP if supported).
    4. Username and Password: FTP account credentials.
  3. Connect and upload files to the /public_html/ directory.

5. Create a Database (If Required)

  1. Go to "MySQL Management".
  2. Click "Create new Database".
  3. Enter the database name, username and password.
  4. Save this data to customize your site.

6. Edit Configuration Files

If your site uses a database, update the configuration file (e.g., config.php) with the following details:

  1. Host: Typically localhost.
  2. Database Name, Username, and Password: From the previous step.

7. Configure DNS Records

Ensure your DNS records point to the VPS IP address. Update settings through your domain registrar or the DNS management panel.

8. Install an SSL Certificate (Recommended)

  1. Go to "SSL Certificates".
  2. Select "Free & automatic certificate from Let's Encrypt" to install a free SSL certificate.
  3. Follow the on-screen instructions.

9. Test the Website

Open your browser and navigate to your domain. Verify that the site displays correctly and all functions work as expected.

Uploading a Website to a VPS Using cPanel

Setting up a website on a VPS using cPanel is a straightforward process that provides powerful tools for managing your server. Here’s a step-by-step guide:

1. Accessing cPanel

Open a web browser and navigate to your cPanel login page, typically found at: http://your_domain/cpanel or http://server_IP_address/cpanel. Enter your username and password provided by your hosting provider to access cPanel.

2. Uploading Website Files

Using the File Manager:

  1. In the Files section, click File Manager.
  2. Open the public_html directory, which serves as the root folder for your website.
  3. Click Upload in the top toolbar.
  4. In the upload window, click Select File to choose files from your computer.
  5. If you’re uploading a compressed file (e.g., .zip), upload it, then right-click the file and select Extract to unpack the contents.

Using an FTP Client:

  1. In the Files section of cPanel, navigate to FTP Accounts.
  2. Create a new FTP account by specifying a username, password, and directory (default is usually public_html).
  3. Download and install an FTP client like FileZilla.
  4. Configure a new connection in FileZilla with the following settings:
    • Host: Your domain or server IP address.
    • Port: 21.
    • Protocol: FTP (or SFTP, if supported).
    • Username and Password: Use your FTP account credentials.
  5. Connect to the server and upload your website files to the /public_html/ directory.

3. Creating a Database (If Required)

  1. In the Databases section, open MySQL® Databases.
  2. Under Create New Database, enter the database name and click Create Database.
  3. In the MySQL Users section, create a new user by entering a username and password, then click Create User.
  4. Under Add User to Database, link the created user to the database and click Add.
  5. Grant all privileges to the user and confirm.

4. Configuring Your Website Files

If your website requires a database, edit its configuration file (e.g., config.php or .env) to include the following parameters:

  1. DB_HOST: localhost
  2. DB_NAME: The name of your database.
  3. DB_USER: The database username.
  4. DB_PASSWORD: The user password.

5. Setting Up DNS Records

Updating DNS Records at Your Registrar:

  1. Log in to your domain registrar account.
  2. Update the A Record to point to your VPS’s IP address.

Using Your VPS Name Servers:

  1. Obtain the name server addresses from your hosting provider.
  2. Set these name servers for your domain in your registrar’s settings.

6. Installing an SSL Certificate (Recommended)

  1. In the Security section, open SSL/TLS.
  2. Select Install and Manage SSL for your site (HTTPS).
  3. Scroll down to Install an SSL Website.
  4. Use AutoSSL or install a certificate from Let’s Encrypt if supported by your hosting.

7. Testing Your Website

Open a web browser and navigate to your domain. Verify that the website loads correctly and all its features function as intended.

Uploading a Website to a VPS with Webuzo

If Webuzo is not yet installed on your server, follow the initial installation steps outlined below.

  1. Connect to your server via SSH: ssh root@your_server_IP
  2. Update your system:
    1. For CentOS/RHEL: yum update -y
    2. For Debian/Ubuntu: apt-get update && apt-get upgrade -y
  3. Download the Webuzo installer: wget -N http://files.webuzo.com/install.sh
  4. Make the file executable: chmod 0755 install.sh
  5. Run the installation: ./install.sh

Follow the on-screen instructions. Installation may take some time to complete.

1. Accessing the Webuzo Panel

After installation, open your browser and go to http://your_server_IP:2004. Log in using the admin email and password you specified during installation.

2. Initial Webuzo Setup

Setting the Hostname and Name Servers:

  1. Go to Settings > Server Settings.
  2. Set your hostname (e.g., server.yourdomain.com) and name servers (e.g., ns1.yourdomain.com, ns2.yourdomain.com).

Activating the Webuzo License:

  1. Ensure your Webuzo license (free or paid) is active.
  2. Navigate to License and enter your license key.

3. Adding a Domain

Go to Domains > Add Domain in the Webuzo panel. Enter your domain (e.g., yourdomain.com) and click Add Domain.

4. Creating a Database (If Required)

  1. Navigate to Database > MySQL Management.
  2. Click Create Database.
  3. Provide a database name, username, and password.
  4. Save these details for your website configuration.

5. Uploading Website Files

Using the Webuzo File Manager:

  1. Go to Files > File Manager.
  2. Navigate to your domain’s directory: /home/USERNAME/public_html/yourdomain.com/
  3. Click Upload to upload files from your local machine.
  4. If you’re uploading a compressed file (e.g., .zip), right-click the file after upload and select Extract.

Using FTP:

  1. Go to "FTP" > "FTP Accounts."
  2. Click "Add FTP Account."
  3. Specify a username, password, and directory (for example, /home/USERNAME/public_html/yourdomain.com/).

Connecting via an FTP client:

  1. Install the FTP client FileZilla.
  2. Create a new connection with the parameters:
    1. Host: Your domain or server IP address.
    2. Port: 21.
    3. Protocol: FTP.
    4. Username and password: FTP account data.
  3. Upload your site files to the correct directory.

6. Configuring Website Files

If your website uses a database, edit its configuration file (e.g., config.php) with the following details:

  1. DB_HOST: localhost
  2. DB_NAME: Your database name
  3. DB_USER: Your database username
  4. DB_PASSWORD: Your database password

7. Configuring DNS Records

Updating DNS Records at Your Registrar:

  1. Log in to your domain registrar account (e.g., GoDaddy, Namecheap).
  2. Update the A Record for your domain and subdomains (e.g., www) to point to your VPS IP address.

Using Custom Name Servers:

  1. Create NS Records (e.g., ns1.yourdomain.com and ns2.yourdomain.com) pointing to your server IP address.
  2. Set these name servers in your domain registrar’s DNS settings.

8. Installing an SSL Certificate (Recommended)

  1. Navigate to Security > SSL Certificates in Webuzo.
  2. Click Let’s Encrypt for a free SSL certificate.
  3. Select your domain from the list and click Install.
  4. Wait for the installation process to complete.

9. Testing the Website

Open your browser and navigate to your domain. Ensure the site loads correctly and all features function as intended.

Uploading a Website to a VPS with ISPmanager

ISPmanager is a user-friendly control panel for managing servers, websites, databases, and more.

1. Accessing ISPmanager

Open a web browser and navigate to your server’s ISPmanager address: https://your_server_IP:1500 or https://your_server_domain:1500. Enter the administrator username and password provided by your hosting provider or set during server setup.

2. Creating a User (If Necessary)

  1. In the main menu, select Users.
  2. Click Create or Add User and provide:
    • Login: The username.
    • Password: A secure password.
    • Group: Default or the desired group.
  3. In the Permissions section, grant rights to manage websites and databases.
  4. Click OK or Save to create the user.

3. Adding a Domain

  1. Switch to the newly created user (via the top-right menu or by logging in as the user).
  2. Navigate to WWW Domains.
  3. Click Create and specify:
    • Domain Name: Your domain (e.g., yourdomain.com).
    • Root Directory: Default is auto-generated, but you can change it.
    • PHP Version: Choose the required version for your site.
    • SSL: Enable this option if you plan to use an SSL certificate.
  4. Click OK to save.

4. Uploading Website Files

Using the File Manager:

  1. Navigate to File Manager.
  2. Open your site directory, typically: /var/www/username/data/www/yourdomain.com/
  3. Click Upload and select your website files.
  4. If uploading an archive (e.g., .zip), right-click it after upload and select Extract.

Using an FTP Client:

  1. Select "FTP accounts" from the menu.
  2. Click the "Create" button.
  3. Specify:
    1. Login: the name of the FTP user.
    2. Password: a strong password.
    3. Home directory: specify the directory of your site (for example, /var/www/имя_пользователя/data/www/yourdomain.com/).
  4. Click "OK" to create an account.

Connecting via an FTP client:

  1. Install an FTP client, for example, FileZilla.
  2. Create a new connection with the following parameters:
    1. Host: your domain (yourdomain.com) or the IP address of the server.
    2. Port: 21 for FTP or 22 for SFTP.
    3. Protocol: FTP (or SFTP if configured).
    4. Username and password: the data of the created FTP account.
  3. Connect and upload your site files to the specified directory.

5. Creating a database (if required)

  1. In the menu, select "Databases" > "MySQL" or "PostgreSQL" (depending on the DBMS you are using).
  2. Click the "Create Database" button.
  3. Specify:
    1. Database name.
    2. The name of the database user.
    3. Password for the database user.
  4. Click "OK" to create the database and user.
  5. Save this data for further customization of the site.

6. Configuring Website Files

Edit your website configuration file (e.g., config.php) to include database details:

  1. DB_HOST: localhost or 127.0.0.1.
  2. DB_NAME: Your database name.
  3. DB_USER: Your database username.
  4. DB_PASSWORD: Your database password.

7. Setting up DNS records

At the domain registrar:

  1. Log in to your domain control panel at your registrar.
  2. Update the A-record for your domain and subdomain www, specifying the IP address of your VPS.
  3. If you use mail or other services, configure the appropriate records (MX, TXT, etc).

In ISPmanager:

  1. Go to "DNS Zones".
  2. Make sure that the DNS zone for your domain has been created and contains the necessary records.
  3. If you plan to use your VPS as a DNS server, configure the appropriate NS records with your registrar.

8. Installing an SSL certificate (recommended)

  1. Select "WWW Domains" from the menu.
  2. Click on your domain and select "Edit".
  3. In the "SSL" section:
    1. Check the "Enable SSL" checkbox.
    2. Check the "Use Let's Encrypt" checkbox to get a free certificate.
    3. Make sure that the administrator's E-mail address is correct.
  4. Click "OK" to save the settings and retrieve the certificate.

9. Check that the site is working properly

Check that the site is displaying correctly, all links are working, and there are no errors.

Conclusion

Now you know how to set up a website on a VPS using different methods. Regardless of the approach, installing and configuring a VPS server requires attention to detail. By following this guide, you can successfully deploy your site on a VPS and ensure its stable operation.

Learn more about how to purchase a domain, hosting, VPS, or dedicated server.

FAQ

Can a website be hosted on a VPS?

Yes, hosting a website on a VPS is possible and recommended for many projects. A VPS offers greater flexibility and control over the server environment compared to shared hosting, making it ideal for resource-intensive or rapidly growing websites.

What can be hosted on a VPS?

A VPS can host virtually any software compatible with the server's operating system. This includes websites, web applications, databases, game servers, email servers, content management systems (CMS), and much more. The choice of software depends on your specific needs and goals.

What is the difference between VPS and VDS?

VPS (Virtual Private Server) and VDS (Virtual Dedicated Server) are essentially synonyms. Both terms refer to a virtual dedicated server, an isolated portion of a physical server. The main difference lies in the marketing strategies of different providers and minor variations in the services offered.