Skip to content

Shared media files

Media files uploaded to a WordPress production environment are automatically available to associated non-production environments.

When a data sync from a production environment to a non-production environment is completed, the target environment automatically loads the shared media files uploaded to production. This eliminates the need to copy media between environments as long as the development workflow follows code moving up, and content moving down.

A media file can load at a URL that has either environment’s domain as long as it has the same file path beginning with /wp-content/uploads/.

As an example, if a file is uploaded to an application’s production environment and available at this URL:

The application’s non-production environment will also have access to that image at this URL:

Other default behaviors:

  • Shared media files follow the same caching rules on all application environments.
  • Shared media files are read-only when accessed from non-production environments, protecting them from being altered unintentionally.
  • Suppose a non-production environment uploads a file of the same name and path as a file shared by production. In that case, the site will only override the file on the non-production environment, and the original file uploaded to production remains intact.


  • Files can only be shared from a production environment to its associated non-production environments. Files uploaded to a non-production environment cannot be shared with the production environment.
  • The non-production environment cannot delete a file originally uploaded to the production site. The operation will not error, but the production file will not be affected and will remain available.
  • If a file uploaded to production is deleted, it will no longer be available to non-production environments.

Last updated: May 20, 2023

Relevant to

  • WordPress