759 B


Create a new site

  1. Prepare a DB, see db/
  2. Copy a new site from the template
  3. Update .env
    • Update the vhost-name
    • Update the letsencrypt address
    • Remove example DB config
    • Copy the DB settings
  4. Start the container cd sites/<new site> and docker-compose up -d


cd /opt/docker/db/utils/ wwwexamplecom
cd /opt/docker/wordpress
mkdir -p sites
cp -R TEMPLATES/ sites/
cd sites/
sed -e 's/<fqdn>/' \
    -e 's/<site\.tld>/example\.com/' \
    -e '/^DB.*/d' \
echo "" >> .env #newline
cat /opt/docker/db/utils/wwwexamplecom__db.conf >> sites/<new site>/.env

Files to backup

  • /opt/docker/wordpress
  • /opt/db_sqldump