Back to blog
January 13, 2026Guides

How to Install WordPress on VPS Server

Complete guide on installing WordPress CMS on Linux server with Nginx, MySQL, and PHP.

How to Install WordPress on VPS Server

WordPress is the world's most popular content management system, powering millions of websites. This guide will help you install WordPress on your Hiddence VPS server with Nginx, MySQL, and PHP (LEMP stack).

Prerequisites

  • Ubuntu/Debian or CentOS server
  • Domain name pointing to server IP
  • SSH access to server
  • Nginx, MySQL, and PHP installed

Create MySQL Database

First, create a database and user for WordPress:

bash
sudo mysql -u root -p
CREATE DATABASE wordpress_db;
CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'strong_password';
GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wp_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Download WordPress

Download and extract WordPress:

bash
cd /var/www
sudo wget https://wordpress.org/latest.tar.gz
sudo tar -xzf latest.tar.gz
sudo chown -R www-data:www-data /var/www/wordpress

Configure WordPress

Create wp-config.php file:

bash
cd /var/www/wordpress
sudo cp wp-config-sample.php wp-config.php
sudo nano wp-config.php
# Update database name, username, and password

Configure Nginx Server Block

Create Nginx configuration:

bash
sudo nano /etc/nginx/sites-available/yourdomain.com
# Add server block with root /var/www/wordpress
sudo ln -s /etc/nginx/sites-available/yourdomain.com /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

Set Correct Permissions

bash
sudo chown -R www-data:www-data /var/www/wordpress
sudo find /var/www/wordpress -type d -exec chmod 755 {} \;
sudo find /var/www/wordpress -type f -exec chmod 644 {} \;

Complete WordPress Installation

Open your domain in browser and follow WordPress installation wizard. Enter database details, site title, admin username, and password.

Useful Tips

  • Keep WordPress and plugins updated for security
  • Use strong passwords for admin account
  • Install security plugins like Wordfence
  • Set up regular backups (see our backup guide)
  • Enable SSL certificate for HTTPS