Cách Cài WordPress Trên VPS TrumVPS - Hướng Dẫn Từng Bước

📅 05/2026 · ⏱ 11 phút đọc · 🏷 Hướng Dẫn

Bạn muốn tự host WordPress trên VPS thay vì dùng shared hosting? Với VPS TrumVPS chỉ 40K/tháng, bạn hoàn toàn có thể. Hướng dẫn này sẽ cài đặt WordPress với LEMP stack (Linux, Nginx, MySQL, PHP) — tối ưu cho hiệu năng.

Yêu Cầu

Bước 1: Update Hệ Thống

Sau khi SSH vào VPS:

apt update && apt upgrade -y

Bước 2: Cài Nginx

apt install nginx -y

Kiểm tra: truy cập http://your-server-ip sẽ thấy trang welcome Nginx.

Bước 3: Cài MySQL (MariaDB)

apt install mariadb-server -y

Bảo mật MySQL: mysql_secure_installation

Tạo database cho WordPress:

mysql -u root -p

CREATE DATABASE wordpress;

CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'strong_password';

GRANT ALL ON wordpress.* TO 'wpuser'@'localhost';

Bước 4: Cài PHP 8.2

apt install php8.2-fpm php8.2-mysql php8.2-curl php8.2-gd php8.2-mbstring php8.2-xml php8.2-zip -y

Bước 5: Cấu Hình Nginx Cho WordPress

Tạo file cấu hình: nano /etc/nginx/sites-available/wordpress

Dán cấu hình server block với fastcgi_pass trỏ đến PHP-FPM. Sau đó:

ln -s /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/

nginx -t && systemctl reload nginx

Bước 6: Cài WordPress

cd /var/www

wget https://wordpress.org/latest.tar.gz

tar -xzf latest.tar.gz

chown -R www-data:www-data wordpress/

Truy cập domain của bạn và hoàn tất cài đặt WordPress qua giao diện web!

Tối Ưu Thêm

Cần VPS để cài WordPress?

VPS TrumVPS chỉ 40K/tháng - NVMe SSD - Hoàn hảo cho WordPress!

Mã giảm giá: 42089QPI03TI (-9%)

THUÊ VPS NGAY