{"id":13810353,"url":"https://github.com/codelight-eu/wp-media-from-production","last_synced_at":"2026-01-11T08:01:26.531Z","repository":{"id":56955281,"uuid":"139247859","full_name":"codelight-eu/wp-media-from-production","owner":"codelight-eu","description":"WordPress plugin that allows loading media from production server","archived":false,"fork":false,"pushed_at":"2020-03-14T19:18:46.000Z","size":37,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-14T10:32:53.422Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codelight-eu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-30T12:31:17.000Z","updated_at":"2024-07-05T16:17:51.000Z","dependencies_parsed_at":"2022-08-21T08:50:28.120Z","dependency_job_id":null,"html_url":"https://github.com/codelight-eu/wp-media-from-production","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/codelight-eu/wp-media-from-production","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelight-eu%2Fwp-media-from-production","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelight-eu%2Fwp-media-from-production/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelight-eu%2Fwp-media-from-production/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelight-eu%2Fwp-media-from-production/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codelight-eu","download_url":"https://codeload.github.com/codelight-eu/wp-media-from-production/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelight-eu%2Fwp-media-from-production/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28297973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T04:44:51.577Z","status":"ssl_error","status_checked_at":"2026-01-11T04:44:44.232Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T02:00:50.951Z","updated_at":"2026-01-11T08:01:26.468Z","avatar_url":"https://github.com/codelight-eu.png","language":"PHP","funding_links":[],"categories":["WordPress Plugins"],"sub_categories":[],"readme":"# WordPress Media from Production\nThis is a WordPress plugin that allows loading the site's uploaded media files from a different environment. \nYou'll want to use this in your local or development environment to save disk space and time by not constantly having to sync the ridiculously high number of different image sizes.  \n\nThis plugin is a fork of Bill Erickson's [BE Media from Production](https://github.com/billerickson/BE-Media-from-Production), updated to support different remote folders, svg files, constants instead of filters for configuration and a couple of other details.\n\n## Version support\nTested \u0026 works on WP 5.3 and earlier.\n\nThe plugin is actively used by [Codelight](https://codelight.eu/) in our day-to-day operations, so we expect to maintain it for a while.\n\n## How it works\nFor every media file that's displayed on the site, the plugin checks if there is an existing local file with the same name in wherever your uploads are located.\nIf there is, it displays the local file. If there is not, then it rewrites the image URL to point at your remote environment.\n\n## Configuration\nFirst, ensure your `WP_ENV` constant is set to `development` in wp-config:\n```php\n\u003c?php\ndefine('WP_ENV', 'development');\n```\n\nConfiguring the plugin via wp-config (recommended):\n```php\n\u003c?php\ndefine('MEDIA_PRODUCTION_REMOTE_URL', 'https://production-url.com');\n\n// Optional, in case you're running Trellis or something that rewrites wp-content folder name\ndefine('MEDIA_PRODUCTION_REMOTE_FOLDER', 'app');\n\n// Optional, in case some of your images come from 3rd party domains, such as an image resizer\ndefine('MEDIA_PRODUCTION_IGNORE_DOMAINS', [\n    'resizer.com',\n    'someotherdomain.com',\n]);\n```\n\nVia filters (note that the filter names will change in an upcoming release):\n```php\n\u003c?php\n\nadd_filter('be_media_from_production_url', function() {\n  return 'https://production-url.com';\n});\n\nadd_filter('be_media_from_production_remote_content_dir', function() {\n  return 'app';\n});\n```\n\nAdditional filters are available to include specific folders based on the upload time:\n- be_media_from_production_start_month – Specify the Start Month\n- be_media_from_production_start_year – Specify the Start Year\n\n## Contributing\nAll issues, comments and PRs are most welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelight-eu%2Fwp-media-from-production","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelight-eu%2Fwp-media-from-production","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelight-eu%2Fwp-media-from-production/lists"}