How to install WordPress on a VPS (step by step)

Questions and discussions about VPS plans, Linux setup, WordPress, Nginx, NAT and VPS configuration in Bulgaria.
rychy
Site Admin
Мнения: 132
Регистриран на: Вто Окт 20, 2026 10:45 am

How to install WordPress on a VPS (step by step)

Мнение от rychy »

🇧🇬 Прочети на български

📄 Contents


🚀 Installing WordPress on a VPS (Ubuntu 24.04)

In this guide we install WordPress on a VPS step by step.

📦 1. Install the required packages

Код: Избери целия код

sudo apt update
sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql wget unzip -y

🛢️ 2. Create a database
sudo mysql
CREATE DATABASE wordpress;
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

🌐 3. Download WordPress
cd /tmp
wget https://wordpress.org/latest.zip
unzip latest.zip

📁 4. Move it to the web directory
sudo mv wordpress /var/www/html/
sudo chown -R www-data:www-data /var/www/html/wordpress

⚙️ 5. Configuration
cd /var/www/html/wordpress
cp wp-config-sample.php wp-config.php
nano wp-config.php

👉 Fill in:

DB_NAME
DB_USER
DB_PASSWORD
🔄 6. Restart Apache
sudo systemctl restart apache2
✅ 7. Finish

Open in the browser:

http://YOUR-IP/wordpress

and complete the installation.

🔥 Tip

After the installation, always add SSL (HTTPS) for security.
If you are looking for VPS plans in Bulgaria for a setup like this, see VPS in Bulgaria.