Navigate Open Esc Close

Type at least 2 characters to start searching

Home About Services Portfolio Products Blog Contact Support Get Started
Home  ›  Blog  ›  Complete Guide: VPS Server Configuration with Ubuntu 24.04 LTS (A to Z Setup)
Hosting

Complete Guide: VPS Server Configuration with Ubuntu 24.04 LTS (A to Z Setup)

Didar Apr 25, 2026 21 views 2 min read

Complete Guide: VPS Server Configuration with Ubuntu 24.04 LTS (A to Z Setup)

Setting up a VPS server with Ubuntu 24.04 LTS is one of the most powerful ways to host websites, especially for businesses that need speed, security, and full control. In this guide by DTech Creative, we will walk you through the complete process — from server setup to WordPress deployment and security hardening.

VPS Server Setup Ubuntu 24.04 LTS

Step 1: Connect to Your VPS Server

After purchasing your VPS, connect via SSH:

ssh root@your_server_ip

Replace your_server_ip with your actual IP address.

Step 2: Update and Upgrade Server

Always start by updating your server packages:

apt update && apt upgrade -y

Step 3: Create a New User (Recommended)

adduser dtechuser
usermod -aG sudo dtechuser

This improves security by avoiding root login.

Step 4: Install Essential Packages

apt install nginx mysql-server php php-fpm php-mysql unzip curl git -y

Step 5: Configure Firewall (UFW)

ufw allow OpenSSH
ufw allow 'Nginx Full'
ufw enable

This protects your server from unauthorized access.

Step 6: Secure MySQL

mysql_secure_installation

Follow the prompts to set root password and secure database.

Step 7: Create Database for Website

mysql -u root -p

CREATE DATABASE dtech_db;
CREATE USER 'dtech_user'@'localhost' IDENTIFIED BY 'strongpassword';
GRANT ALL PRIVILEGES ON dtech_db.* TO 'dtech_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 8: Add Domain & Configure Nginx

Create a server block:

nano /etc/nginx/sites-available/yourdomain.com

Example config:

server {
  listen 80;
  server_name yourdomain.com www.yourdomain.com;
  root /var/www/yourdomain;
  index index.php index.html;

  location / {
    try_files $uri $uri/ /index.php?$args;
  }

  location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/run/php/php8.3-fpm.sock;
  }
}

Enable site:

ln -s /etc/nginx/sites-available/yourdomain.com /etc/nginx/sites-enabled/
nginx -t
systemctl reload nginx

Step 9: Install SSL (HTTPS)

apt install certbot python3-certbot-nginx -y
certbot --nginx -d yourdomain.com -d www.yourdomain.com

This will enable HTTPS with auto-renewal.

Install Wordpress

Step 10: Install WordPress

cd /var/www/
wget https://wordpress.org/latest.zip
unzip latest.zip
mv wordpress yourdomain
chown -R www-data:www-data yourdomain
chmod -R 755 yourdomain

Step 11: Configure WordPress

cp wp-config-sample.php wp-config.php
nano wp-config.php

Add database details:

Step 12: Install phpMyAdmin

apt install phpmyadmin -y

Then configure:

ln -s /usr/share/phpmyadmin /var/www/yourdomain/phpmyadmin

Access via:

http://yourdomain.com/phpmyadmin

Step 13: Security Hardening

apt install fail2ban -y

Step 14: Performance Optimization

Step 15: Backup Setup

crontab -e

Example backup script:

0 2 * * * tar -czf /backup/site.tar.gz /var/www/yourdomain

Final Thoughts

Setting up a VPS with Ubuntu 24.04 LTS gives you complete control over your hosting environment. With proper configuration, you can achieve high performance, strong security, and scalability for your business website.

Need professional VPS setup, WordPress hosting, or server management? Contact DTech Creative today!
Visit DTech Creative
Tags: #VPS Setup #Ubuntu 24.04 #WordPress Hosting #Server Configuration #Nginx #MySQL #phpMyAdmin #Linux Server #Web Hosting #DTech Creative
Share this article
D
Didar
Published on April 25, 2026
DTech Creative
🟢 Online — replies in minutes