cloud

Wordpress On Vultr: Step-by-step Server Setup Guide

Deploying WordPress on a Vultr cloud instance gives you complete control over your server environment, predictable resource allocation, and much better performance than standard shared hosting. Whethe

Wordpress On Vultr: Step-by-step Server Setup Guide
In this story

Deploying WordPress on a Vultr cloud instance gives you complete control over your server environment, predictable resource allocation, and much better performance than standard shared hosting. Whether you're moving a high-traffic blog or launching a custom client site, setting up a virtual private server requires careful configuration of your operating system, web server, database, and firewall.

This guide walks you through provisioning a cloud server, configuring an optimized LEmp stack (Linux, Nginx, MySQL, PHP), securing your installation, and launching your site without relying on sluggish one-click installers that obscure system settings.

Provisioning Your Vultr Instance

Before setting up WordPress, you need to spin up a compute instance on Vultr. Log into your dashboard and click on the deploy button to select your server type.

Choose Cloud Compute with the Regular Performance or High Frequency CPU options depending on your traffic expectations. For most standard WordPress sites, a plan with 1 vCPU and 2GB of RAM provides a stable foundation.

Next, select your server location. Pick a data center region geographically closest to your primary audience to minimize network latency. For the operating system, choose Ubuntu 24.04 LTS x64. Long-term support releases provide a stable, well-documented base with years of security updates.

Select your server size, add an SSH key for secure authentication, and give your instance a hostname. Click Deploy Now and wait a minute or two for Vultr to provision the server and assign a static IPv4 address.

Connecting via SSH and Updating the System

Once your server status shows as running, copy its IP address and open your terminal. Connect to your instance as the root user using your SSH key or the temporary password provided in the Vultr dashboard:

ssh root@YOUR_SERVER_IP

Never leave a fresh server unpatched. Update the package list and upgrade existing system packages to the latest versions before installing any software:

apt update && apt upgrade -y

Create a dedicated non-root user with administrative privileges to enhance security. Run the following commands, replacing adminuser with your preferred username:

adduser adminuser
usermod -aG sudo adminuser

Switch to your new user and set up a basic firewall using UFW. Allow OpenSSH, HTTP, and HTTPS traffic, then enable the firewall:

ufw allow OpenSSH
ufw allow 'Nginx Full'
ufw enable

Installing the LEmp Stack

WordPress requires a web server, a database management system, and PHP to process dynamic requests. Nginx paired with PHP-FPM and MariaDB offers a fast, resource-efficient stack.

Install Nginx and MariaDB by running:

apt install nginx mariadb-server -y

Next, add the official PHP repository PPA to get a modern PHP version, then install PHP along with the necessary extensions required by WordPress:

apt install software-properties-common -y
add-apt-repository ppa:ondrej/php -y
apt update
apt install php8.3-fpm php8.3-mysql php8.3-common php8.3-gd php8.3-imagick php8.3-cli php8.3-curl php8.3-mbstring php8.3-xml php8.3-zip -y

Verify that both Nginx and MariaDB services are running and enabled to start automatically on system boot:

systemctl enable --now nginx
systemctl enable --now mariadb

Configuring the Database

Secure your MariaDB installation by running the built-in security script. It removes anonymous users, disables remote root login, and removes the test database:

mysql_secure_installation

Log into the MySQL shell as root:

💡 You might also like: this post
sudo mysql

Create a dedicated database and database user for your WordPress site. Replace wordpress_db and wordpress_user with secure names, and use a strong password:

CREATE DATABASE wordpress_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'wordpress_user'@'localhost' IDENTIFIED BY 'your_secure_password';
GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wordpress_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Downloading and Configuring WordPress

Navigate to the default web root directory and download the latest stable release of WordPress from the WordPress.org official site:

cd /var/www
curl -O https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
mv wordpress html
rm latest.tar.gz

Set the correct ownership permissions so Nginx can read and write files properly:

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

Create an Nginx server block for your domain. Open a new configuration file in your sites-available directory:

nano /etc/nginx/sites-available/wordpress

Paste the following configuration block, making sure to replace example.com with your actual domain name:

server {
    listen 80;
    server_name example.com www.example.com;
    root /var/www/html;

    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }
}

Enable the site by creating a symbolic link to sites-enabled, test the Nginx configuration for syntax errors, and reload the service:

ln -s /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/
nginx -t
systemctl reload nginx

Securing with an SSL Certificate

An SSL certificate is mandatory for secure data transmission and search engine optimization. Install Certbot to provision a free Let's Encrypt TLS certificate:

apt install certbot python3-certbot-nginx -y

Run Certbot to automatically configure your Nginx server block for HTTPS:

certbot --nginx -d example.com -d www.example.com

Certbot will modify your Nginx configuration to handle port 443 securely and set up an automatic renewal cron job.

Common Mistakes to Avoid

  1. Skipping Firewall Rules: Leaving unnecessary ports open exposes your database and SSH services to automated brute-force attacks. Always restrict access using UFW.
  2. Incorrect File Permissions: Giving 777 permissions to your web root creates massive security vulnerabilities. Stick to 755 for directories and 644 for files owned by the web user.
  3. Ignoring PHP Memory Limits: Default PHP configurations often limit memory allocation to 128MB. Increase memory_limit to 256MB in your php.ini file if you run heavy e-commerce plugins.

Frequently Asked Questions

Can I migrate an existing WordPress site to Vultr?

Yes. You can use migration plugins like All-in-One WP Migration or manually transfer your site files via SFTP and import your database via phpMyAdmin or the command line.

Should I use a control panel like CyberPanel or cPanel?

If you prefer a graphical interface over the command line, installing a free control panel like CyberPanel or aaPanel on your Vultr instance makes managing domains, databases, and backups much easier.

How do I handle server backups on Vultr?

Vultr offers automated snapshot backups for a small monthly fee directly inside their control panel. You can also configure database dumps via cron jobs and store them offsite.

IC

Written by

Isabella Carter

As a veteran correspondent, Isabella Carter has reported from across the globe, bringing firsthand perspectives to international stories and local issues.

More from cloud