Jumpstarter WordPress integration plugin that simplifies running WordPress in a container environment.
| Author: | Jumpstarter (profile at wordpress.org) |
| WordPress version required: | 4.2 |
| WordPress version tested: | 4.3.1 |
| Plugin version: | 19.2 |
| Added to WordPress repository: | 13-08-2015 |
| Last updated: | 21-10-2015
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
| Rating, %: | 0 |
| Rated by: | 0 |
| Plugin URI: | https://github.com/jumpstarter-io/wp-jumpstar... |
| Total downloads: | 1 063 |
![]() Click to start download |
|
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.
- The installer/environment synchronizer (
js-init.php). - The actual plugin (
jumpstarter.php).
The installer
The installer takes care of the following:
- Install WordPress if
/app/code/wp-dbdoes not exist. - Sync the
/app/env.jsonand/app/code/wp-env.jsonenvironments with WordPress.
Install is done the following way:
- Configure security salts in
wp-config.phpif not done already. - Clean up previous failed or aborted installations.
- Install WordPress to RAM (in
/tmp) to get rid of waiting for disk sync. - Activating core plugins (
jumpstarterandsqlite-integration). - Setting the theme specified in
wp-env.json. - Run WordPress install hooks registered with
add_action("jumpstarter_install",...). - Atomically move the database in place. This allows the install to be idempotent.
- Restart by execve'ing itself so environment sync can run.
Environment sync is done the following way:
- Setting nginx
fastcgi_param HTTPSto "on"/"off" depending on configured domains for the container. - Opening and parsing
/app/code/wp-env.json. - If the
siteurlhas changed it performs a safe search/replace ofsiteurlinwp_posts,wp_postmetaandwp_options. - Set theme specified in
themeif not changed by the user. - Update options specified in
options. - Opening and parsing
/app/env.json. - Update user details if they are admin default.
- Call the hook
jumpstarter_sync_envto let themes/plugins modify database state depending on the env.
It also prints logging and error information to stderr.
The plugin
The plugin takes care of the following:
- Sandboxes all users and overrides any user capabilities defined in
/app/code/wp-env.json. - Injects a login link to support Jumpstarter reflected login on
/wp-login.php. - Handles login requests from Jumpstarter by authenticating posts of
jumpstarter-auth-token. On successful authentication the user is logged in as the admin user. - Hooks in on
set_url_schemeand uses the env to determine if the url should use http or https. - Disables the possibility to delete the theme that's specified in the wp env.
- Rewrites urls passed to
wp_enqueue_scriptandwp_enqueue_styledepending on if SSL is on or not.
FAQ
ChangeLog
