PHPackages                             moderntribe/tribe-storage - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. moderntribe/tribe-storage

ActiveWordpress-plugin[File &amp; Storage](/categories/file-storage)

moderntribe/tribe-storage
=========================

A WordPress plugin to upload files to many different storage types like Azure, s3, DO Spaces

v3.0.1(2y ago)51.1k2PHPPHP &gt;=7.4

Since Jun 11Pushed 2y ago12 watchersCompare

[ Source](https://github.com/moderntribe/tribe-storage)[ Packagist](https://packagist.org/packages/moderntribe/tribe-storage)[ RSS](/packages/moderntribe-tribe-storage/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (13)Versions (30)Used By (2)

Tribe Storage
=============

[](#tribe-storage)

[![PHPCS + Unit Tests](https://github.com/moderntribe/tribe-storage/actions/workflows/pull-request.yml/badge.svg)](https://github.com/moderntribe/tribe-storage/actions/workflows/pull-request.yml)[![php 7.4+](https://camo.githubusercontent.com/4f8f3f80b4c10380f096b00c69d182c0e108c8eab9760035fe60b4b92d7a6314/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d6d696e253230372e342d7265642e737667)](https://camo.githubusercontent.com/4f8f3f80b4c10380f096b00c69d182c0e108c8eab9760035fe60b4b92d7a6314/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d6d696e253230372e342d7265642e737667)

This WordPress plugin works as a bridge to use [Flysystem](https://flysystem.thephpleague.com/v1/docs/) adapters (v1) within WordPress. This plugin is meant to be installed and configured by **developers**, as it has no GUI.

Currently Supported Adapters
----------------------------

[](#currently-supported-adapters)

- [Local](https://flysystem.thephpleague.com/v1/docs/adapter/local/)
- [Azure Storage](https://flysystem.thephpleague.com/v1/docs/adapter/azure/)

Recommendations
---------------

[](#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
------------

[](#installation)

**Requirements**

- PHP7.4+
- WordPress 5.6+
- [Composer](https://getcomposer.org/)
- [Composer Installers](https://composer.rarst.net/recipe/paths-control/)
- The server should have PHP compiled with [ImageMagick](https://www.php.net/manual/en/book.imagick.php) or [GD](https://www.php.net/manual/en/book.image.php).

### Install with Composer v1

[](#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)

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

[](#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

[](#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

[](#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

[](#caching)

#### Transient Database Caching (default)

[](#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

[](#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

[](#automated-testing)

Testing provided via [PHPUnit](https://phpunit.de/) and the [Brain Monkey](https://brain-wp.github.io/BrainMonkey/)testing suite.

#### Run Unit Tests

[](#run-unit-tests)

```
$ composer install
$ ./vendor/bin/phpunit
```

### Adding Flysystem Adapters

[](#adding-flysystem-adapters)

Create a Flysystem bridge. See [/src/Adapters/Adapter.php](./src/Adapters/Adapter.php).

`Adapter::get(): AdapterInterface;`

The `get()` method should return a configured Flysystem adapter.

More Resources:
---------------

[](#more-resources)

- [Tribe Storage Statically.io CDN](https://github.com/moderntribe/tribe-storage-statically-cdn)
- [Modern Tribe](https://tri.be/)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Recently: every ~174 days

Total

28

Last Release

800d ago

Major Versions

v1.1.2 → v2.0.02021-06-20

v2.5.5 → v3.0.02024-03-01

PHP version history (2 changes)v1.0.0PHP ^7.3

v3.0.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a11f5bee6606989680c8f81b921f8a8e2e75bfd5190cb001812ed615d032a5e?d=identicon)[tribejustin](/maintainers/tribejustin)

![](https://www.gravatar.com/avatar/7f24821ddc28f26fff6b85940d5c65cf179e7487695383944b80f2e5257db6a0?d=identicon)[nickpelton](/maintainers/nickpelton)

---

Top Contributors

[![defunctl](https://avatars.githubusercontent.com/u/1066195?v=4)](https://github.com/defunctl "defunctl (52 commits)")

---

Tags

flysystemwordpressFlysystemwordpresss3awsazuregoogle cloud storagemediawasabirackspacecloud-storagemoderntribeoffloaddigital-oceans-spaces

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/moderntribe-tribe-storage/health.svg)

```
[![Health](https://phpackages.com/badges/moderntribe-tribe-storage/health.svg)](https://phpackages.com/packages/moderntribe-tribe-storage)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M788](/packages/league-flysystem-aws-s3-v3)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[league/flysystem-async-aws-s3

AsyncAws S3 filesystem adapter for Flysystem.

2610.5M31](/packages/league-flysystem-async-aws-s3)[craftcms/aws-s3

Amazon S3 integration for Craft CMS

631.5M26](/packages/craftcms-aws-s3)[sistemi-etime/flysystem-plugin-aws-s3-v3

AWS S3 plugin for Flysystem.

11154.2k1](/packages/sistemi-etime-flysystem-plugin-aws-s3-v3)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
