This is a plugin for WordPress installations in a Jumpstarter container environment. The main purpose is to combat the problems one encounters when running WordPress in a container environment under nginx behind multiple http proxy layers.
The plugin is divided into two distinct parts.
js-init.php
).jumpstarter.php
).The installer takes care of the following:
/app/code/wp-db
does not exist./app/env.json
and /app/code/wp-env.json
environments with WordPress.Install is done the following way:
wp-config.php
if not done already./tmp
) to get rid of waiting for disk sync.jumpstarter
and sqlite-integration
).wp-env.json
.add_action("jumpstarter_install",...)
.Environment sync is done the following way:
fastcgi_param HTTPS
to “on”/”off” depending on configured domains for the container./app/code/wp-env.json
.siteurl
has changed it performs a safe search/replace of siteurl
in wp_posts
, wp_postmeta
and wp_options
.theme
if not changed by the user.options
./app/env.json
.jumpstarter_sync_env
to let themes/plugins modify database state depending on the env.It also prints logging and error information to stderr
.
The plugin takes care of the following:
/app/code/wp-env.json
./wp-login.php
.jumpstarter-auth-token
. On successful authentication the user is logged in as the admin user.set_url_scheme
and uses the env to determine if the url should use http or https.wp_enqueue_script
and wp_enqueue_style
depending on if SSL is on or not.