WP Manifestindependent plugin directory
manifest / media / tribe-storage

Tribe Storage WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

A WordPress plugin to store media on Azure Blob Storage, AWS S3 and other cloud storage providers.

★ 5stars
1.1kcomposer installs
v3.0.1latest · 2 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/moderntribe/tribe-storage/archive/refs/heads/master.zip

On Packagist as moderntribe/tribe-storage:

composer require moderntribe/tribe-storage
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

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:

function tribe_isSSL(): bool {
    return ( ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] !== 'off' );
}

$host = $_SERVER['HTTP_HOST'] ?? 'localhost';

define( 'WP_CONTENT_URL', ( tribe_isSSL() ? 'https' : 'http' ) . '://' . $host . '/wp-content' );

Installation

Requirements

Install with Composer v1

Add the following to the composer.json repositories object:

  "repositories": [
      {
        "type": "vcs",
        "url": "git@github.com:moderntribe/flysystem-stream-wrapper.git"
      },        
      {
        "type": "vcs",
        "url": "git@github.com:moderntribe/tribe-storage.git"
      },
  ]

Then run:

composer require moderntribe/tribe-storage

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:

// Account name as you created it in the Azure dashboard.
define( 'MICROSOFT_AZURE_ACCOUNT_NAME', 'account' );

// Account secret key to authenticate.
define( 'MICROSOFT_AZURE_ACCOUNT_KEY', 'key' );

// The container name.
define( 'MICROSOFT_AZURE_CONTAINER', 'my_container' );

// The custom adapter namespaced path to the adapter.
define( 'TRIBE_STORAGE_ADAPTER', 'Tribe\Storage\Adapters\Azure_Adapter' );

// The URL/CNAME to use for the adapter.
define( 'TRIBE_STORAGE_URL', 'https://example.com/wp-content/uploads/' . MICROSOFT_AZURE_CONTAINER );

Image Editor Customization

Force a custom Image Editor Strategy if Imagick or GD are experiencing issues like 500 errors with no logs.

// For GD
define( 'TRIBE_STORAGE_IMAGE_EDITOR', 'gd' );

// For Imagick
define( 'TRIBE_STORAGE_IMAGE_EDITOR', 'imagick' );

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:

// Store transients in the object cache instead of the database.
add_filter( 'tribe/storage/config/cache/force_db', '__return_false' );
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

$ composer install
$ ./vendor/bin/phpunit

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:

Releases

Newest 25 of 28 recorded releases.

Tag
Published
v3.0.1 latest
Mar 1, 2024 2 years ago
Mar 1, 2024 2 years ago
Jun 20, 2022 4 years ago
Apr 19, 2022 4 years ago
Apr 6, 2022 4 years ago
Jan 13, 2022 4 years ago
Jan 13, 2022 4 years ago
Jan 12, 2022 4 years ago
Nov 5, 2021 4 years ago
Nov 5, 2021 4 years ago
Oct 28, 2021 4 years ago
Oct 28, 2021 4 years ago
Sep 14, 2021 5 years ago
Jul 19, 2021 5 years ago
Jul 1, 2021 5 years ago
Jun 26, 2021 5 years ago
Jun 24, 2021 5 years ago
Jun 24, 2021 5 years ago
Jun 21, 2021 5 years ago
Jun 20, 2021 5 years ago
Jun 20, 2021 5 years ago
Jun 16, 2021 5 years ago
Jun 16, 2021 5 years ago
Jun 15, 2021 5 years ago
Jun 15, 2021 5 years ago
All releases on GitHub →

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

Tribe Storage 2.5.5 · audited by WP Registry

No security issues found.

Audited release
2.5.5
Findings
none
Worst severity
—
Content hash
bcb3ff3063c0811a7c971220…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.