templates/wordpress/README.md
2026-11-28 15:28:05 +02:00

1.4 KiB

WordPress

Português

WordPress with MariaDB 11.4, behind Caddy with HTTPS. The site files and the database live in Docker volumes, so they survive updates.

Files

  • docker-compose.yml: MariaDB, WordPress (PHP 8.3) and Caddy.
  • Caddyfile: HTTPS for DOMAIN, uploads up to 64 MB.
  • uploads.ini: PHP limits for uploads and memory.
  • backup.sh: saves the database and wp-content into backups/.
  • .env.example: copy it to .env and set DOMAIN and both database passwords.

Publish on your VPS

  1. From the templates folder: sh deploy.sh wordpress root@<server ip>. The first run creates .env on the server and stops.
  2. Edit /srv/wordpress/.env on the server: set DOMAIN and put long random passwords in DB_PASSWORD and DB_ROOT_PASSWORD (openssl rand -base64 24).
  3. Run the same command again, open https://mybusiness.co.mz and finish the WordPress setup. Choose a strong admin password.

See the main README for the IP and the DNS records.

Backups and updates

  • On the server: cd /srv/wordpress && sh backup.sh. Copy the files in backups/ to another place, too.
  • Update WordPress, themes and plugins from the WordPress dashboard. To update PHP or MariaDB images: docker compose pull && docker compose up -d, after a backup.
  • Do not change the database passwords in .env after the first start: MariaDB keeps the ones it was created with.