2017 © Pedro Peláez
 

wordpress-plugin uploads-proxy

Proxy WordPress uploads from the production site.

image

betawax/uploads-proxy

Proxy WordPress uploads from the production site.

  • Wednesday, December 2, 2015
  • by betawax
  • Repository
  • 1 Watchers
  • 2 Stars
  • 108 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 4 Versions
  • 2 % Grown

The README.md

Uploads Proxy

Uploads Proxy is a WordPress plugin that will automatically download any requested file located in the uploads directory of your production site to your development or staging environment., (*1)

Note: this plugin is currently only tested on WordPress sites built on the excellent Bedrock stack., (*2)

How does it work?

The plugin hooks into the WordPress 404 page and listen for requests to upload files that doesn't exist in the local environment. If possible, the plugin will then download the files from your production site and store them locally, so this whole process is only executed once per file., (*3)

Please note that the plugin only executes if your environment (WP_ENV) is set to either development or staging. No harm is done to your production environment., (*4)

You can simply clear your local uploads directory at any time to restart the whole process., (*5)

Requirements

* The plugin may also work with older versions of WordPress, however I haven't tested it., (*6)

Usage

1. Install and activate the plugin, (*7)

composer require betawax/uploads-proxy

2. Add a constant to your environment configuration(s), (*8)

define('UP_SITEURL', getenv('UP_SITEURL'));

You will want to add this to your config/environments/development.php and config/environments/staging.php files., (*9)

3. Define the URL to your production site, (*10)

Add the following line to your local .env file:, (*11)

UP_SITEURL=http://example.com

4. Profit?, (*12)

Open your local environment in your browser and give it some time to download the files on the first request., (*13)

Credits

This plugin is inspired by the Stage File Proxy Drupal module and basically does the same as the Uploads by Proxy WordPress plugin (which doesn't seem to work with Bedrock)., (*14)

License

Licensed under the MIT license., (*15)

The Versions

02/12 2015

dev-master

9999999-dev

Proxy WordPress uploads from the production site.

  Sources   Download

MIT

The Requires

 

by Holger Weis

wordpress proxy uploads

02/12 2015

1.0.2

1.0.2.0

Proxy WordPress uploads from the production site.

  Sources   Download

MIT

The Requires

 

by Holger Weis

wordpress proxy uploads

16/03 2015

1.0.1

1.0.1.0

Proxy WordPress uploads from the production site.

  Sources   Download

MIT

The Requires

 

by Holger Weis

wordpress proxy uploads

12/03 2015

1.0.0

1.0.0.0

Proxy WordPress uploads from the production site.

  Sources   Download

MIT

The Requires

 

by Holger Weis

wordpress proxy uploads