Self-host WordPress
updated Sep 2026deployed by usprices 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
CategoryCMS & blogging
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 + USKamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + AsiaDigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + AsiaPaid 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
CMS & blogging
Drupal
PHPSymfony
easyRead guide →
CMS & blogging
Ghost
Node.jsMySQL
easyRead guide →
CMS & blogging
Halo
JavaSpring BootVue
easyRead guide →
CMS & blogging
Joomla
PHPMySQL
easyRead guide →