Background image
01.07.2015, Kai Gertz

Easily synchronize files from the live side

Stage File Proxy

It's a very common problem for developers: you have developed a page and it has been online for some time. The site's code is managed with GIT anyway, so you are automatically always up to date here. The database is synchronized (in the best case quite simply with Drush) - so here too it is very easy to get the current status of the live site. With simple files (images, PDFs etc.) this unfortunately doesn't work so easily...

"

Proxies files from production server so you don't have to transfer them manually

"

Stage File Proxy - Brief description

In many cases, you can safely disregard the files on the live site. For design questions and theme revisions, however, you may be very dependent on having the images available that have been incorporated by users on the live site. Unfortunately, there is not much choice but to synchronize the files via (e.g.) FTP. This is cumbersome, time-consuming for larger quantities and takes up - actually unnecessary - local storage space. In one of our projects, for example, the file volume reached over 20 GB (!). You don't necessarily want to download a file system of this size, let alone synchronize it regularly.

The solution with a Drupal module:

The Stage File Proxy module solves this problem very elegantly. It retrieves from the live site only those files that are required for the page views in the local development environment. By default, these files are then stored in the local file system. However, you can also configure the module so that the files are obtained solely from the live site via the browser using a 301 redirect. In many cases, this makes things so much easier and improves the development environment that you have to ask yourself: ″Why didn't I know about this module before?″