Skip to content

Self-host WordPress

updated Sep 2026prices checked · Jul 2026Install verified on Ubuntu 26.04 · Sep 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →

The PHP and MySQL content management system for websites and blogs, extended with themes and plugins.

Key facts

LicenseGPL-2.0-or-later
StackPHP, MySQL
Min RAM1024 MB
Official imageyes
Measured idle RAM394 MB
Difficulty

What you need

  • Any VPS with at least 1024 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • Under an hour if you've used Docker before
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + US
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + Asia
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + Asia
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install

Run these commands on your server:

# WordPress — the Docker Official Image with MySQL 8, per its Docker Hub compose example
mkdir -p wordpress && cd wordpress
echo "DB_PASS=$(openssl rand -hex 16)" > .env
cat > docker-compose.yml <<'EOF'
services:
  wordpress:
    image: wordpress:latest
    restart: always
    ports: ["8080:80"]
    depends_on: [db]
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: ${DB_PASS}
      WORDPRESS_DB_NAME: wordpress
    volumes: ["wordpress:/var/www/html"]
  db:
    image: mysql:8.0
    restart: always
    environment:
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: ${DB_PASS}
      MYSQL_RANDOM_ROOT_PASSWORD: '1'
    volumes: ["db:/var/lib/mysql"]
volumes:
  wordpress:
  db:
EOF
docker compose up -d   #  →  http://SERVER_IP:8080  (the install screen asks for a site title and admin account)

Head-to-head

More in CMS & blogging

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.