bitpoke / stack-mu-plugin
WordPress must-use plugin for Stack
Installs: 19 200
Dependents: 0
Suggesters: 0
Security: 0
Stars: 12
Watchers: 5
Forks: 4
Open Issues: 4
Type:wordpress-muplugin
Requires
- php: >=7.4
- automattic/jetpack-autoloader: ^3
- composer/installers: ^1.9 || ^2.0
- google/auth: ^1.21.0
- google/cloud-storage: ^1.28
- oscarotero/env: ^2.1
- promphp/prometheus_client_php: ^2.1
- vlucas/phpdotenv: >=4.1.8 <6
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ~0.7.1
- johnkary/phpunit-speedtrap: ^4.0
- phpunit/phpunit: ^5.7 || ^6.5 || ^7.5
- roave/security-advisories: dev-latest
- roots/wordpress: ^6.3
- roots/wp-config: 1.0.0
- squizlabs/php_codesniffer: ^3.6.2
- wp-coding-standards/wpcs: ~2.3.0
- wpackagist-plugin/debug-bar: ^1.0
- wpackagist-plugin/debug-bar-console: ^0.3.0
- wpackagist-plugin/debug-bar-constants: ^2.0
- wpackagist-plugin/woocommerce: ^8.0
- yoast/phpunit-polyfills: ^1.0
- dev-master
- v0.9.1
- v0.9.0
- v0.8.0
- v0.7.3
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.0
- v0.5.5
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.0
- v0.3.1
- v0.3.0
- v0.2.0
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- v0.0.6
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
- dev-wip-media-stat-caching
- dev-dependabot/composer/guzzlehttp/psr7-2.4.5
- dev-feature/cdn-offload
- dev-fix-wp-56
- dev-wp-5.6
- dev-fix-+20
- dev-wordpress-coding-standards
- dev-media-streams
This package is auto-updated.
Last update: 2024-12-24 15:07:47 UTC
README
Bitpoke Stack must use plugin for WordPress.
It provides integration for the Bitpoke Stack functionalities with WordPress and WooCommerce, such as:
- uploading and serving media files from object storage systems, currently with Google Cloud Storage
- object-cache implementation on top of memcached
- offloading assets to a CDN
- unified handling of logs to stderr, by default
- handling of duplicate, incompatible dependencies through Jetpack Autoloader
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-wp
Running integration tests:
$ make test-runtime