# How do you install WordPress on a VPS?

> How to install WordPress on a VPS with nginx, PHP 8.3+ and MariaDB in 7 steps on Debian 13 or Ubuntu 24.04, then add free HTTPS.

- URL: https://jadekvm.com/guides/how-to-install-wordpress-on-a-vps/
- Last updated: 2026-11-16
- Publisher: JadeKVM (https://jadekvm.com)

This is how to install WordPress on a VPS by hand, with nginx, PHP-FPM and MariaDB from the Debian or Ubuntu archive.

**Quick answer — How do you install WordPress on a VPS?**

To install WordPress on a VPS, install nginx, PHP-FPM and MariaDB, create a database and user, unpack WordPress into /var/www, add an nginx server block, then finish the 5-minute web installer and add HTTPS. **JadeKVM** Pendant, with 3 GB of RAM, fits a typical WordPress site. Seven steps cover it.

**In brief**

- **Stack**: nginx, PHP-FPM and MariaDB, all from the system archive.
- **Versions fit**: Ubuntu 24.04 ships PHP 8.3 and Debian 13 ships PHP 8.4, both above the 8.3 WordPress recommends.
- **Own database user**: never let WordPress use the MariaDB root account.
- **Mail through SMTP**: outbound port 25 is closed, so use a provider on 587.

## How to install WordPress on a VPS in 7 steps?

Replace example.com, wpuser and the password with your own values.

1. **Install the stack** — Install nginx, mariadb-server, php-fpm and the PHP extensions WordPress uses.
2. **Secure MariaDB** — Run sudo mariadb-secure-installation and remove test users and databases.
3. **Create the database** — Create a database and a user with rights on that database only.
4. **Unpack WordPress** — Download latest.tar.gz from wordpress.org into /var/www/example.com.
5. **Configure nginx** — Add a server block that sends PHP to the PHP-FPM socket.
6. **Run the installer** — Open the domain in a browser and enter the database details.
7. **Add HTTPS** — Run certbot for nginx, then set the site URL to https.

## Which versions do Debian 13 and Ubuntu 24.04 ship?

*PHP and MariaDB versions in the Debian 13 and Ubuntu 24.04 archives against WordPress recommendations*

| Component | Ubuntu 24.04 | Debian 13 | WordPress recommends |
| --- | --- | --- | --- |
| PHP | 8.3 | 8.4 | 8.3 or greater |
| MariaDB | 10.11 | 11.8 | 10.11 or greater |
| PHP-FPM socket | /run/php/php8.3-fpm.sock | /run/php/php8.4-fpm.sock | Any FastCGI setup |
| HTTPS | certbot | certbot | Support for HTTPS |

## How do you install the stack and create the database?

**One apt line installs the stack; four SQL lines create a private database.** The php-fpm meta package pulls the version your system ships. Pick a long random password for wpuser and keep it for the installer.

*nginx, PHP-FPM, MariaDB and the database*

```bash
sudo apt update
sudo apt install -y nginx mariadb-server php-fpm php-mysql php-curl php-gd php-intl php-mbstring php-xml php-zip
sudo mariadb-secure-installation
sudo mariadb <<'SQL'
CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'change-this-long-password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;
SQL
cd /tmp && curl -O https://wordpress.org/latest.tar.gz
sudo mkdir -p /var/www/example.com
sudo tar -xzf latest.tar.gz -C /var/www/example.com --strip-components=1
sudo chown -R www-data:www-data /var/www/example.com
```

## Which nginx config does WordPress need?

**A server block with try_files for pretty links and a PHP location that points to the FPM socket.** Use php8.3-fpm.sock on Ubuntu 24.04 and php8.4-fpm.sock on Debian 13. `ls /run/php/` shows the right name. Test with `sudo nginx -t`, then reload.

*/etc/nginx/sites-available/example.com*

```nginx
server {
    listen 80;
    listen [::]:80;
    server_name example.com www.example.com;
    root /var/www/example.com;
    index index.php;
    client_max_body_size 64m;
    location / {
        try_files $uri $uri/ /index.php?$args;
    }
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
    }
    location ~ /\.ht {
        deny all;
    }
}
```

## Which is the best VPS plan for WordPress in 2026?

**Pendant suits one typical site; Bangle suits WooCommerce or several sites.** Pendant offers 1 shared vCPU, 3 GB RAM, 45 GB NVMe, 1 TB a month for $4.50 a month on 12 months. According to JadeKVM's survey of 2 November 2026, comparable plans at 12 no-KYC crypto hosts averaged $18.54 a month.

Bead, with 1 GB, can run a small blog if you add [swap](https://jadekvm.com/guides/how-to-add-swap-on-a-vps/ "How do you add swap on a VPS?"). Prices for all five plans are on [the pricing page](https://jadekvm.com/pricing/ "How much does a JadeKVM server cost per month?").

## How do you finish WordPress safely?

**Add HTTPS, an SMTP plugin and a backup job before you publish.** Follow [how to install a free SSL certificate](https://jadekvm.com/guides/how-to-install-a-free-ssl-certificate-on-a-vps/ "How do you install a free SSL certificate on a VPS?") for TLS. Outbound port 25 is closed on every server; send mail through a mail provider on port 465 or 587. No plan includes backups; daily backups kept 7 days can be added at checkout for 15% of the plan price. Without them, keep a copy of important data somewhere other than the server.

The guide on [how to back up a VPS](https://jadekvm.com/guides/how-to-back-up-a-vps/ "How do you back up a VPS?") shows a nightly database dump and file copy to another place.

## Questions about installing WordPress on a VPS

### Is nginx or Apache better for WordPress on a VPS?

nginx uses less memory on small plans. Apache reads .htaccess files, which some plugins expect. Both run WordPress well.

### How much RAM does WordPress need in 2026?

One site with caching runs in 1 to 2 GB. WooCommerce and page builders prefer 3 to 4 GB.

### Why can WordPress not send email?

Outbound port 25 is closed on JadeKVM. Install an SMTP plugin and send through a mail provider on port 587.

### Which PHP version should WordPress use?

WordPress recommends PHP 8.3 or greater. Ubuntu 24.04 ships 8.3 and Debian 13 ships 8.4.

### Does JadeKVM offer a one-click WordPress image?

No. JadeKVM installs plain Linux images, and this guide covers the manual install.

**Verdict**

- **nginx, PHP-FPM and MariaDB from the archive** meet WordPress's current recommendations on both systems.
- Add HTTPS, SMTP and off-server backups before launch.

## Sources

1. [Requirements](https://wordpress.org/about/requirements/) — WordPress.org (read 2026-11-16)
2. [How to install WordPress](https://developer.wordpress.org/advanced-administration/before-install/howto-install/) — WordPress.org (read 2026-11-16)
3. [Nginx, Advanced Administration Handbook](https://developer.wordpress.org/advanced-administration/server/web-server/nginx/) — WordPress.org (read 2026-11-16)
4. [mariadb-secure-installation](https://mariadb.com/kb/en/mariadb-secure-installation/) — MariaDB (read 2026-11-16)

**Put WordPress near your readers** Pendant costs $4.50 a month on 12 months in Hong Kong, Tokyo or Singapore. [Order Pendant in Singapore](https://jadekvm.com/app/checkout/?plan=pendant&term=12m&location=sg-sin&from=how-to-install-wordpress-on-a-vps&lang=en) · [See every plan](https://jadekvm.com/pricing/ "How much does a JadeKVM server cost per month?")

---

JadeKVM: JadeKVM sells Linux KVM VPS in Hong Kong, Tokyo and Singapore, paid in crypto with no ID document, and publishes the measured latency from each city to the rest of Asia. 5 plans from 1 to 16 GB of RAM cost the same in all three cities and, on the 12-month term, sit at least 25% under a named comparable no-KYC crypto plan read on 16 November 2026. The operator is DomaineGoat LLC, Panama.
