$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>amazon - Use separate S3 buckets for separate sites in a multisite environment|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

amazon - Use separate S3 buckets for separate sites in a multisite environment

matteradmin9PV0评论

We are trying setup 4 different sites using a single WordPress instance. Our challenge is that we would like each to have their own S3 Bucket, however when it comes to users the avatar image of the user will be stored on a network level other than that the media files are separate from one another.

Does anyone know how to achieve this?

We are trying setup 4 different sites using a single WordPress instance. Our challenge is that we would like each to have their own S3 Bucket, however when it comes to users the avatar image of the user will be stored on a network level other than that the media files are separate from one another.

Does anyone know how to achieve this?

Share Improve this question asked Jan 1, 2019 at 4:07 HossjHossj 1214 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

welcome :) We really need more information. A list of what you have tried and would like to try would be helpful as well. Additionally, it would be good to know whether you are wanting to use the AWS S3 Bucket to store only media or more.

From a developer standpoint: Multi-site implementations give each site an ID. You can get the site's ID with the function get_current_blog_id() and then use that to tell your plugin which hard-coded AWS S3 Bucket to use. Alternatively, you can make the plugin have an options page where you can add the Bucket credentials and let it handle authentication from there.

Since, normally, plugin settings and media libraries are not shared between network sites you would likely be able to find a plugin that will suit your needs. This one seems popular: https://wordpress/plugins/amazon-s3-and-cloudfront/

Post a comment

comment list (0)

  1. No comments so far