Check that wp-config.php exists in order to determine if WP is installed or not (#88)

* see #83: check that wp-config.php exists in order to determine if WP is installed or not

Signed-off-by: David Riccitelli <david@wordlift.io>

* move the changes from libpersistence.sh to libwordpress.sh

Signed-off-by: David Riccitelli <david@wordlift.io>

* fix condition

Signed-off-by: David Riccitelli <david@wordlift.io>
This commit is contained in:
David Riccitelli 2022-07-06 11:31:46 +02:00 committed by Bitnami Containers
parent 477261213e
commit ef6979128b
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ wordpress_initialize() {
# Check if WordPress has already been initialized and persisted in a previous run
local -r app_name="wordpress"
if ! is_app_initialized "$app_name"; then
if ! is_app_initialized "$app_name" || [[ ! -f "$WORDPRESS_CONF_FILE" ]]; then
# Ensure WordPress persisted directories exist (i.e. when a volume has been mounted to /bitnami)
info "Ensuring WordPress directories exist"
ensure_dir_exists "$WORDPRESS_VOLUME_DIR"