From 86aac7c0eebecc42aea5241561c3bd2d133a9f19 Mon Sep 17 00:00:00 2001 From: EarthlingDavey <15802017+EarthlingDavey@users.noreply.github.com> Date: Tue, 1 Oct 2024 15:15:23 +0100 Subject: [PATCH] Update fpm-start.sh (#720) --- deploy/config/init/fpm-start.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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