diff --git a/deploy/config/init/fpm-start.sh b/deploy/config/init/fpm-start.sh index 92c731801..bf7753f16 100644 --- a/deploy/config/init/fpm-start.sh +++ b/deploy/config/init/fpm-start.sh @@ -1,3 +1,10 @@ #!/bin/sh -wp sync-user-roles sync +if wp core is-installed 2>/dev/null; then + # WP is installed. + wp sync-user-roles sync +else + # Fallback if WP is not installed. + # This will happen during a first run on localhost. + echo 'WordPress is not installed yet, so skipping command `wp sync-user-roles sync` in `fpm-start.sh`.' +fi