bitpoke / stack-mu-plugin

A Must Use plugin, that integrates all Stack's functionalities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stack-mu-plugin Build Status

Bitpoke Stack must use plugin for WordPress.

It provides integration for Bitpoke Stack functionalities with WordPress, such as:

  • uploading and serving media files from object storage systems such as Google Cloud Storage or AWS S3
  • object-cache implementation on top of memcached
  • offloading assets to a CDN

Install

Bedrock

When using bedrock, just run:

$ composer require bitpoke/stack-mu-plugin

WordPress plugin

To run as WordPress classic mu-plugin, download the plugin archive from https://github.com/bitpoke/stack-mu-plugin/releases and extract it into your wp-content/mu-plugins folder.

Then you need to activate the mu-plugin, by copying stack-mu-plugin.php from wp-content/mu-plugins/stakc-mu-plugin into your wp-content/mu-plugins folder.

$ cp wp-content/mu-plugins/stack-mu-plugin/stack-mu-plugin.php wp-content/mu-plugins/

WordPress Object Cache

In order to use the custom object cache, you'll need to copy it into the root of WP_CONTENT_DIR (usually wp-content).

$ cp wp-content/mu-plugins/stack-mu-plugin/src/object-cache.php wp-content/

Enable and use a CDN for static files

All that is needed is setting the CDN_HOST variable in wp-config.php and of course a CNAME record in your DNS manager pointing to your CDN provider.

For example, we might use in our config file:

define('CDN_HOST', 'cdn.bitpoke.io');

Development

Clone this repository, copy .env.example to .env and edit it accordingly.

To install dependencies just run

$ make dependencies

Development server

To start a local development server you need wp-cli installed. To start the development server, just run

$ wp server

Testing

Running plugin tests:

$ make test-runtime

Running integration tests:

$ make test-runtime

About

A Must Use plugin, that integrates all Stack's functionalities

License:Apache License 2.0


Languages

Language:PHP 98.4%Language:Makefile 0.7%Language:CSS 0.4%Language:JavaScript 0.3%Language:Shell 0.2%