Plugin / Jumpstarter

Jumpstarter

Description

Description

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.

  1. The installer/environment synchronizer (js-init.php).
  2. The actual plugin (jumpstarter.php).

The installer

The installer takes care of the following:

  1. Install WordPress if /app/code/wp-db does not exist.
  2. Sync the /app/env.json and /app/code/wp-env.json environments with WordPress.

Install is done the following way:

  1. Configure security salts in wp-config.php if not done already.
  2. Clean up previous failed or aborted installations.
  3. Install WordPress to RAM (in /tmp) to get rid of waiting for disk sync.
  4. Activating core plugins (jumpstarter and sqlite-integration).
  5. Setting the theme specified in wp-env.json.
  6. Run WordPress install hooks registered with add_action("jumpstarter_install",...).
  7. Atomically move the database in place. This allows the install to be idempotent.
  8. Restart by execve’ing itself so environment sync can run.

Environment sync is done the following way:

  1. Setting nginx fastcgi_param HTTPS to “on”/”off” depending on configured domains for the container.
  2. Opening and parsing /app/code/wp-env.json.
  3. If the siteurl has changed it performs a safe search/replace of siteurl in wp_posts, wp_postmeta and wp_options.
  4. Set theme specified in theme if not changed by the user.
  5. Update options specified in options.
  6. Opening and parsing /app/env.json.
  7. Update user details if they are admin default.
  8. Call the hook 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

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_scheme and 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_script and wp_enqueue_style depending on if SSL is on or not.

Ratings

0
0 reviews

Rating breakdown

Details Information

Version

19.2

First Released

13 Aug, 2015

Total Downloads

427

Wordpress Version

4.2 or higher

Tested up to:

4.3.21

Require PHP Version:

-

Tags

There is no tag found

Contributors

This plugin has been closed.

Languages

The plugin hasn't been transalated in any language other than English.

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.