PHPackages                             lesaff/processwire-s3cloudfront - 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. lesaff/processwire-s3cloudfront

ActiveProcesswire-module[File &amp; Storage](/categories/file-storage)

lesaff/processwire-s3cloudfront
===============================

AWS S3 and Cloudfront sync for use with ProcesWire CMS/CMF.

17

Since Jul 29Pushed 4y ago1 watchersCompare

[ Source](https://github.com/lesaff/processwire-s3-cloudfront)[ Packagist](https://packagist.org/packages/lesaff/processwire-s3cloudfront)[ RSS](/packages/lesaff-processwire-s3cloudfront/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Amazon S3 CloudFront Module for ProcessWire 3.x
===============================================

[](#amazon-s3-cloudfront-module-for-processwire-3x)

Version: 1.0.0

This module/plugin provides a way to synchronize, serve and backup to Amazon S3/ CloudFront all the page files uploaded through the Admin of ProcessWire. This is a fork of the original module made by Nmendes.

Requirements
------------

[](#requirements)

- ProcessWire 3.x;
- Amazon AWS PHP SDK (included);
- AWS account with S3 and CloudFront services enabled;
- A S3 Bucket and a user with the proper privileges over it: "s3:PutObject", "s3:GetObject", "s3:DeleteObject" and "s3:PutObjectAcl";
- A CloudFront distribution pointing to the S3 Bucket.

Installation
------------

[](#installation)

Put all the files inside /site/modules/S3Cloudfront/ and go to Admin&gt;Modules&gt;Check for New Modules and install.

You'll need to configure the module by entering your AWS Access and Secret keys and the name of the S3 Bucket you'll use to store the files. I've set up a [video](http://youtu.be/Hpj7AA0Rz14) and a [user policy document](https://gist.github.com/nmendes/9053e1c3347dec7741d8) to help you out if you don't know how to do this.

How does it work
----------------

[](#how-does-it-work)

The module/plugin uploads the files to S3 immediately as you add them to the pages in the admin of ProcessWire. It mimics the PW asset structure inside the S3 Bucket you defined. (/S3BUCKET/PAGE\_ID/files).

The deleted files on PW pages are also deleted immediately from S3 but you have the option to create a backup to another folder on S3 for backup purposes.

The Module supports the use of image thumbnails created by the [Thumbnails module (FieldtypeCropImage)](http://modules.processwire.com/modules/fieldtype-crop-image/) 1.0.3 by Antti Peisa ([@apeisa](https://github.com/apeisa)) and uploads and modifies the thumbnails accordingly if this module is installed.

Note: The thumbnails natively created by the PW Admin (ex: filename\_0x100.jpg) are served from the local assets folder and not uploaded to S3.

The module can automatically serve the content from Amazon CloudFront if a distribution is created for the S3 bucket used with this module. The files URL's are automatically replaced.

You can set a number of seconds to set the Cache-Control Directive and handle the cache time for both the browser and CloudFront. See more information [here](http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html).

There's an option for file versioning to use with CloudFront that automatically renames all the files uploaded by adding a timestamp like: yourfilename-v1403782033.jpg. This will make every filename unique so it's easier to manage the caching of files. I recommend that you use this option or it can become very hard to replace files already cached by Amazon.

Issues
------

[](#issues)

This version of the module will only handle new files uploaded after the installation. If you already have files on your pages they will not be uploaded to S3 and you can get errors because the files inside PW will not match the files on S3.

If you use the native size() method of ProcessWire (ex: $image-&gt;size(232, 176))to create image thumbnails, they will not be uploaded to S3 automatically. This issue should be solved soon as the dev branch of PW already has this method hookable.

Notes
-----

[](#notes)

THIS PROCESSWIRE MODULE/ PLUGIN IS PROVIDED AS IS AND IT SHOULD ONLY BE USED FOR TEST PURPOSES. USE AT YOUR OWN RISK. THE AUTHOR IS NOT RESPONSIBLE FOR ANY DATA LOSSES OR COSTS ASSOCIATED WITH THE USE OF AMAZON AWS.

Copyright 2014 by Nelson Mendes [E-mail](mailto:nelsonmendes@gmail.com)Forked and revised by Rudy Affandi (2021) [E-mail](mailto:rudy@adnetinc.com)

Built for [ProcessWire](http://processwire.com/)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad5792e2f4a4365060cb97a941ac712f8ef02a128aa132597d8cb755e9a3165e?d=identicon)[lesaff](/maintainers/lesaff)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/lesaff-processwire-s3cloudfront/health.svg)

```
[![Health](https://phpackages.com/badges/lesaff-processwire-s3cloudfront/health.svg)](https://phpackages.com/packages/lesaff-processwire-s3cloudfront)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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