Download the PHP package moderntribe/tribe-storage without Composer
On this page you can find all versions of the php package moderntribe/tribe-storage. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download moderntribe/tribe-storage
More information about moderntribe/tribe-storage
Files in moderntribe/tribe-storage
Package tribe-storage
Short Description A WordPress plugin to upload files to many different storage types like Azure, s3, DO Spaces
License
Informations about the package tribe-storage
Tribe Storage
This WordPress plugin works as a bridge to use Flysystem adapters (v1) within WordPress. This plugin is meant to be installed and configured by developers, as it has no GUI.
Currently Supported Adapters
Recommendations
It is highly recommended to set your WP_CONTENT_URL
to the base site on a multisite installation.
In wp-config.php
:
Installation
Requirements
- PHP7.4+
- WordPress 5.6+
- Composer
- Composer Installers
- The server should have PHP compiled with ImageMagick or GD.
Install with Composer v1
Add the following to the composer.json repositories object:
Then run:
Adapters
Adapters allow different interfaces to different storage providers. In order to tell the system which adapter to use,
add a TRIBE_STORAGE_ADAPTER
define() to wp-config.php
with the namespaced path to the adapter
(same output as Class_Name::class)
, e.g to use the Azure Storage Adapter:
define( 'TRIBE_STORAGE_ADAPTER', 'Tribe\Storage\Adapters\Azure_Adapter' );
Local Adapter
This is the default adapter and is pointed to WP_CONTENT_DIR . /uploads
. If you have not configured any custom
adapters, this will automatically be used and should function exactly as WordPress does out of the box.
NOTE: A misconfigured adapter will always use the Local Adapter and show a notice in the WordPress Dashboard.
Azure Storage Adapter
To configure this Adapter, add and customize the following defines to your wp-config.php
:
Image Editor Customization
Force a custom Image Editor Strategy if Imagick or GD are experiencing issues like 500 errors with no logs.
Caching
Transient Database Caching (default)
Caching is saved via WordPress transients, automatically forced to use the database even if external object caching is available. The Flysystem cache adapters unfortunately save the entire output into a single key.
If you're using Redis or Memcached (with a much greater than a 1mb limit), you can disable this with:
Disable Caching
If you have any issues with the cache, you can disable it by adding the following to wp-config.php
:
define( 'TRIBE_STORAGE_NO_CACHE', true );
Automated Testing
Testing provided via PHPUnit and the Brain Monkey testing suite.
Run Unit Tests
Adding Flysystem Adapters
Create a Flysystem bridge. See /src/Adapters/Adapter.php.
Adapter::get(): AdapterInterface;
The get()
method should return a configured Flysystem adapter.
More Resources:
All versions of tribe-storage with dependencies
php-di/php-di Version ^6.0
league/flysystem-azure-blob-storage Version ^1.0
league/flysystem-cached-adapter Version ^1.1
intervention/image Version ^2.5
symfony/lock Version ^5.2
jhofm/flysystem-iterator Version ^2.2
moderntribe/flysystem-stream-wrapper Version ^2.0