| Server IP : 52.25.153.185 / Your IP : 216.73.217.131 Web Server : Apache System : Linux ip-172-26-6-158 5.10.0-35-cloud-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64 User : daemon ( 1) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /home/bitnami/stack/scripts/wordpress/ |
Upload File : |
#!/bin/bash
# shellcheck disable=SC1090,SC1091
set -o errexit
set -o nounset
set -o pipefail
# set -o xtrace # Uncomment this line for debugging purpose
# Load WordPress environment
. /opt/bitnami/scripts/wordpress-env.sh
# Load WP-CLI environment for 'wp_execute' (after 'wordpress-env.sh' so that MODULE is not set to a wrong value)
. /opt/bitnami/scripts/wp-cli-env.sh
# Load PHP environment for 'wp_execute' (after 'wordpress-env.sh' so that MODULE is not set to a wrong value)
. /opt/bitnami/scripts/php-env.sh
# Load MySQL Client environment for 'mysql_remote_execute' (after 'wordpress-env.sh' so that MODULE is not set to a wrong value)
if [[ -f /opt/bitnami/scripts/mysql-client-env.sh ]]; then
. /opt/bitnami/scripts/mysql-client-env.sh
elif [[ -f /opt/bitnami/scripts/mysql-env.sh ]]; then
. /opt/bitnami/scripts/mysql-env.sh
elif [[ -f /opt/bitnami/scripts/mariadb-env.sh ]]; then
. /opt/bitnami/scripts/mariadb-env.sh
fi
# Load libraries
. /opt/bitnami/scripts/libwordpress.sh
. /opt/bitnami/scripts/libwebserver.sh
# Load web server environment (after WordPress environment file so MODULE is not set to a wrong value)
. "/opt/bitnami/scripts/$(web_server_type)-env.sh"
# Ensure WordPress environment variables are valid
wordpress_validate
# Re-create web server configuration with runtime environment (needs to happen before the initialization)
wordpress_generate_web_server_configuration
# Ensure WordPress is initialized
wordpress_initialize
# Grant ownership to the default "bitnami" SSH user to edit files, and restrict permissions for the web server
info "Granting WordPress files ownership to the 'bitnami' user"
configure_permissions_ownership "$(readlink -f "$WORDPRESS_CONF_FILE")" -f "640" -u "bitnami" -g "$WEB_SERVER_DAEMON_USER"