Skip to content

Commit

Permalink
don't create the wp-config if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsequence committed Feb 9, 2024
1 parent ed229e0 commit 11cafcb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bin/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,13 @@ setup_wp() {
esac
done

download http://api.wordpress.org/core/version-check/1.7/ "$TMPDIR"/wp-latest.json
echo "Creating wp-config.php"
wp config create --dbname="$DB_NAME" --dbuser="$DB_USER" --dbpass="$DB_PASS" --dbhost="$DB_HOST" --dbprefix="wptests_" --path="${TMPDIR}/wordpress"
download http://api.wordpress.org/core/version-check/1.7/ "$TMPDIR"/wp-latest.json

if [ ! -f "$TMPDIR/wordpress/wp-config.php" ]; then
echo "Creating wp-config.php"
wp config create --dbname="$DB_NAME" --dbuser="$DB_USER" --dbpass="$DB_PASS" --dbhost="$DB_HOST" --dbprefix="wptests_" --path="${TMPDIR}/wordpress"
fi

wp core install --url=localhost --title=Test --admin_user=admin --admin_password=password [email protected] --path="${TMPDIR}/wordpress"
}

Expand Down

0 comments on commit 11cafcb

Please sign in to comment.