Upgrade Your Drupal Skills
We trained 1,000+ Drupal Developers over the last decade.
See Advanced Courses NAH, I know EnoughUsing Remote Files when Developing Locally with Stage File Proxy Module
20th November 2014
Download the Stage File Proxy module from Drupal.org and enable it on your site.
As this module is only going to be needed on pre-production sites, it would be better to configure this within your settings.php or settings.local.php file. We do this using the $conf
array which removes the need to configure the module through the UI and store the values in the database.
// File proxy to the live site.
$conf['stage_file_proxy_origin'] = 'http://www.example.com';
// Don't copy the files, just link to them.
$conf['stage_file_proxy_hotlink'] = TRUE;
// Image style images are the wrong size otherwise.
$conf['stage_file_proxy_use_imagecache_root'] = FALSE;
If the origin site is not publicly accessible yet, maybe it's a pre-live or staging site, and protected with a basic access authentication, you can include the username and password within the origin URL.
$conf['stage_file_proxy_origin'] = 'http://user:[email protected]';
Availability
Currently have limited part-time capacity
Currently no spare full-time capacity.
About Drupal Sun
Drupal Sun is an Evolving Web project. It allows you to:
- Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
- Facet based on tags, author, or feed
- Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
- View the entire article text inline, or in the context of the site where it was created
See the blog post at Evolving Web