BE Media from Production
When spinning up a staging or local development environment, you might not need the full uploads directory, but you also don’t want to see broken images throughout the site.
This plugin lets you use the production server for missing media. Define the production URL using a wp-config.php constant
BE_MEDIA_FROM_PRODUCTION_URL or filter
In all cases, if a local file exists, it will be used in preference to the remote file.
Installation with wp cli
Installation with Code Snippet
BigScoots, our preferred WordPress managed host, has built our plugin directly into their staging environment creation process.
The default selection is “Create Staging and exclude uploads”, which will automatically exclude the uploads directory, install BE Media from Production, and add the constant to wp-config.php defining the production URL.
It’s a seamless process that saves you time in creating staging as well as conserving disk space.
When you click “Push to Live”, the default option will sync any uploads you’ve made to staging into your live site’s uploads directory, before pushing the database, theme, and plugins.