← Volver al blog

How to Install WordPress on a VPS

  • Xernode
  • 1 min de lectura
  • 31 de marzo de 2026
VPS Setup wordpress linux vps installation web hosting

Introduction

Installing WordPress on your own VPS gives you full control, better performance, and more flexibility than shared hosting. This guide walks you through the process step by step.

Step-by-step Guide

  1. Update your system and install required packages
  2. Create a MySQL database and user for WordPress
    • sudo mysql -u root -pn
      • Inside the MySQL shell, run:n
        • CREATE DATABASE wordpress;
        • CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'your_password';
        • GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';
        • FLUSH PRIVILEGES;
        • EXIT;
  3. Download and extract WordPress
    • cd /tmp
    • wget https://wordpress.org/latest.zip
    • unzip latest.zip
    • sudo mv wordpress /var/www/html/
    • sudo chown -R www-data:www-data /var/www/html/wordpress
    • sudo chmod -R 755 /var/www/html/wordpress
  4. Configure Apache for WordPress
    • sudo nano /etc/apache2/sites-available/wordpress.confn
      • Add the following configuration: n
        • <VirtualHost *.80>
          • ServerAdmin admin@your_domain.com
          • DocumentRoot /var/www/html/wordpress
          • ServerName your_domain.com
          • <Directory /var/www/html/wordpress>
            • AllowOverride All
          • </Directory>
          • ErrorLog ${APACHE_LOG_DIR}/error.log
          • CustomLog ${APACHE_LOG_DIR}access.log combined
        • </VirtualHost>
      • Enable the site and rewrite module, then reload Apache:n
        • sudo a2ensite wordpress.conf
        • sudo a2enmod rewrite
        • sudo systemctl reload apache2
  5. Complete the WordPress installation via web browser
    • Visit http://your_domain.com or your server’s IP.
    • Follow the on-screen instructions: enter the database name, user, and password you created.
    • Set your site title, admin user, and password.

Recommendations

  • Always use strong passwords for your database and WordPress admin.
  • Keep WordPress and all plugins/themes updated.
  • Consider setting up SSL (Let’s Encrypt) for secure access.

Call To Action

Ready to launch your own WordPress site? Get a high-performance VPS now! https://xernode.com/#pricing

Related Guides