How to Install WordPress on a Virtualmin Server (Step-by-Step Guide)

0 6 years ago

Looking to set up a WordPress site on your Virtualmin-managed VPS or dedicated server? This guide walks you through the complete process of installing WordPress on a Virtualmin server running Apache, PHP, and MySQL/MariaDB.

Whether you’re hosting multiple domains or running a single site, Virtualmin makes server management easier — and installing WordPress is straightforward once you know the steps.


✅ Requirements Before You Start

Make sure you have the following ready:

  • A Virtualmin server (VPS or dedicated)
  • Apache, PHP, and MySQL/MariaDB installed
  • A registered domain pointed to the server
  • Root or sudo SSH access

Need a reliable VPS or dedicated server?
👉 Check out high-performance hosting from Servers9


🔧 Step 1: Create a New Virtual Server

  1. Log in to Virtualmin at https://your-server-ip:10000
  2. Go to Create Virtual Server
  3. Fill out:
    • Domain Name
    • Admin Password
  4. Under Enabled features, make sure:
    • Apache webserver
    • MySQL database
    • PHP (FPM preferred) are checked
  5. Click Create Server

🔧 Step 2: Download WordPress

SSH into your server and run:

cd /home/yourdomain/public_html
wget https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
mv wordpress/* .
rm -rf wordpress latest.tar.gz

This puts WordPress in the correct web root directory.


🔧 Step 3: Set File Permissions

chown -R yourdomain:yourdomain /home/yourdomain/public_html
chmod -R 755 /home/yourdomain/public_html

Replace yourdomain with your actual system username from Virtualmin.


🔧 Step 4: Create the WordPress Database

  1. In Virtualmin, go to your virtual server
  2. Click Edit Databases
  3. Click Create a new database
  4. Give it a name like wordpress
  5. Note the database name, username, and password

🔧 Step 5: Configure wp-config.php

cd /home/yourdomain/public_html
cp wp-config-sample.php wp-config.php
nano wp-config.php

Update the DB details:

phpCopyEditdefine( 'DB_NAME', 'your_db_name' );
define( 'DB_USER', 'your_db_user' );
define( 'DB_PASSWORD', 'your_db_password' );
define( 'DB_HOST', 'localhost' );

Save and exit.


🔧 Step 6: Run the WordPress Installer

Visit your domain in a browser:

arduinoCopyEdithttp://yourdomain.com

You’ll be guided through:

  • Site title
  • Admin username/password
  • Language selection

After submitting the form, WordPress will be installed!


⚙️ Optional: Enable HTTPS (SSL)

  1. In Virtualmin, go to Server Configuration > SSL Certificate
  2. Click Let’s Encrypt
  3. Request a certificate for your domain
  4. Once done, redirect HTTP to HTTPS by editing .htaccess or enabling it via Virtualmin.

🛡️ Security Tip

  • Always keep WordPress, plugins, and themes updated
  • Use a plugin like Wordfence or iThemes Security
  • Disable XML-RPC if not used

🚀 Need High Performance Servers?

Want faster load times, better uptime, and WordPress-specific optimizations?

👉 Explore our VPS and Dedicated Servers at Servers9