Arama Yap Mesaj Submit
Request a Callback
+90
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro

Contact Us

Location Halkali merkez neighborhood fatih st ozgur apt no 46 , Kucukcekmece , Istanbul , 34303 , TR
Production Ready • v2026.1

WordPress + MySQL VPS Setup with Docker

Isolated with Docker technology, which is the basis of modern web architecture, Build portable and high-performance WordPress sites. From traditional hosting structure Get rid of it, use your resources with full efficiency.

In this guide; VPS setup from scratch, Docker Compose configuration, Nginx Reverse Proxy settings and SSL certificate installation step by step We will process.

docker-compose.yml
services: wordpress: image: wordpress:latest ports: - "8080:80" environment: WORDPRESS_DB_HOST: db db: image: mysql:8.0 volumes: - db_data:/var/lib/mysql

Why Should You Use Docker?

Compared to traditional panel hosting structures, Docker provides up to 40% Provides increased performance and full isolation.

Recommended Server Features

While the Docker container architecture is lightweight, it requires minimal support for MySQL 8.0 and modern WordPress. resources are important. Our recommendation for the production environment:

  • CPU: 2 Core (Ryzen/Xeon)
  • RAM: 2 GB (4 GB recommended)
  • Disc: 40 GB NVMe SSD
  • OS: Ubuntu 22.04 LTS or 24.04 LTS

1. VPS Connection and User Settings

After connecting to your server as root, you must create a new user for security and We must empower.

BASH
# via SSH to the server connect ssh root@YOUR SERVER_IP_ADDRESS # Update the system apt update && apt upgrade -y # Create new user (deploy named) adduser deploy usermod -aG sudo deploy # Switch to new user do it su - deploy

2. Docker Engine Installation

The Docker version in Ubuntu repos may be outdated. Therefore by adding the official Docker repo We will install the latest version.

BASH
# Required packages install sudo apt install -y ca-certificates curl gnupg # GPG key add sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg sudo chmod a+r /etc/apt/keyrings/docker.gpg # Docker repo add echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo \"$VERSION_CODENAME\") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null # Install Docker sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin # Add your user to the docker group add (for docker command without using sudo) sudo usermod -aG docker $USER newgrp docker

3. WordPress Projectctct Structure and Docker Compose

We will create a directory for our project and prepare the configuration files. This method It ensures that the data is permanent and the system can be easily moved.

BASH
sudo mkdir -p /opt/wordpress sudo chown -R $USER:$USER /opt/wordpress cd /opt/wordpress

now docker-compose.yml Let's create the file. These file services defines.

YAML
services: db: image: mysql:8.0 restart: always environment: MYSQL_DATABASE: wordpress MYSQL_USER: wp_user MYSQL_PASSWORD: StrongOnePassword123! MYSQL_ROOT_PASSWORD: CokGucluRootSifresi123! volumes: - db_data:/var/lib/mysql wordpress: image: wordpress:php8.2-apache restart: always depends_on: - db ports: - "127.0.0.1:8080:80" # out We do not open it directly, we will use Nginx environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: wp_user WORDPRESS_DB_PASSWORD: StrongOnePassword123! WORDPRESS_DB_NAME: wordpress volumes: - wp_data:/var/www/html volumes: db_data: wp_data:
Security Warning: database Never leave passwords default. In production environment .env file It is safer to use.

Let's initialize the containers:

BASH
docker compose up -d docker compose ps

4. Nginx Reverse Proxy and SSL Setup

WordPress is currently running on 8080 port. this to your domain to bind and secure We will install Nginx.

BASH
# Nginx installation sudo apt install -y nginx # Configuration file create sudo nano /etc/nginx/sites-available/wordpress

The file content should be as follows:

NGINX
server { listen 80; server_name siteadresiz.com www.siteadresiniz.com; location / { proxy_pass http://127.0.0.1:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }

Let's activate the site and install the SSL certificate:

BASH
# Symbolic link create sudo ln -s /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx # Certbot and SSL installation sudo apt install -y certbot python3-certbot-nginx sudo certbot --nginx -d siteadresiz.com -d www.siteadresiniz.com
Hint: Detailed information about SSL certificate for information let's Our Encrypt Guide you can review.

Docker Compatible VPS Packages

Let your containers fly with high-performance NVMe SSD disks.

Docker Starter

150 ₺/month
  • 2 vCPU
  • 2 GB RAM
  • 40 GB NVMe SSD
  • 1 Gbps Port
  • Ubuntu 24.04 Ready
Buy
RECOMMENDED

Docker Pro

250 ₺/month
  • 4 vCPU
  • 4 GB RAM
  • 80 GB NVMe SSD
  • 1 Gbps Port
  • Docker Stock Image

DockerEnterprise

450 ₺/month
  • 6 vCPU
  • 8 GB RAM
  • 160 GB NVMe SSD
  • 1 Gbps Port
  • Priority Support
Buy

Frequently Asked Questions

Docker runs your application in an isolated environment (container). This is shared "neighbor noise" experienced in hosting (other sites consuming your resources) eliminates the problem. Also check PHP version, plugins and database settings You can manage it freely without being subject to the restrictions of the hosting company.
It is very easy to backup a MySQL database running Docker. From the command line docker exec db_container_id mysqldump -u user -p database > yedek.sql You can take an instant backup with the command. Also cron job for automatic backup you can define.
Absolutely! You can define as many WordPress services as you want with Docker Compose. All you need to do is use a different port for each site or a different Nginx configuration. one server_name to create the block. As long as your resources (RAM/CPU) are sufficient There is no limit.
Top