You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#!/bin/bash
set -euo pipefail
################################################################################
# ONE-TIME Duplicator restore
################################################################################
if [ ! -f /var/www/html/wp-content/.duplicator_restored ] ; then
echo "▶ First run – copy Duplicator package"
mkdir -p /var/www/html
cp -r /usr/src/duplicator/* /var/www/html/
chown -R www-data:www-data /var/www/html
touch /var/www/html/wp-content/.duplicator_restored
echo "✓ Package placed – browse /installer.php to finish the restore"
fi
################################################################################
# ALWAYS sync the code we keep under version control
################################################################################
echo "▶ Syncing version-controlled themes"
rsync -a --delete /usr/src/themes/ /var/www/html/wp-content/themes/
################################################################################
# (optional) run safe automatic DB migrations, plugin installs, etc.
# wp core update-db --yes
# wp plugin update --all --quiet
################################################################################
# Hand back to the real WP entrypoint
exec /usr/local/bin/docker-entrypoint-upstream.sh " $@ "