该插件尚未通过WordPress的最新3个主要版本进行测试。 当与较新版本的WordPress一起使用时,可能不再受到维护或支持,并且可能会存在兼容性问题。

Google Cloud Storage 插件

描述

Google Cloud Storage 插件可让您将媒体文件上传到 Google Cloud Storage 存储桶。

安装

  1. 下载插件并将其放在/wp-content/plugins/目录中。

  2. 在 WordPress 管理界面中启用此插件,

  3. 在插件设置界面中配置 Google Cloud Storage 存储桶。

  4. 在 Google Cloud Console 中, 设置存储桶的默认acl, 以便 allUser 可以读取。

根据您的环境, 您可能需要配置一个 Google 服务帐户来调用 API。

要在适用于PHP 7.2 的 Google App Engine上运行此插件,无需额外配置即可运行。

要在Google Compute EngineApp Engine Flexible上运行此插件,您需要执行以下操作:

  • 访问 Cloud Console, 转到计算 > 实例然后选择 WordPress 正在运行的实例。

  • 停止实例。

  • 实例停止后, 点击编辑, 您现在可以在Cloud API 访问范围下修改范围。将存储范围从只读更改为完整

如果您想在 Google Cloud Platform 之外运行此插件, 则需要按照以下步骤配置服务帐户:

  • 访问 Cloud Console, 转到IAM & Admin > Service accounts并创建具有Storage Object Admin权限的服务帐户, 然后下载 json 密钥文件。

  • 将 json 密钥文件上传到托管服务器。不要将其放在公共服务区。

  • 将以下行添加到 wp-config.php (用真正的文件路径替换文件路径)。

    putenv('GOOGLE_APPLICATION_CREDENTIALS=/secure-place/my-service-account.json');

常见问题

问: 插件崩溃, No project ID was provided, and we were unable to detect a default project ID, 出了什么问题?

答: 请参阅“安装”部分中有关配置服务帐户的部分。

问: 如何在我的 Google Cloud Storage 存储桶上配置默认ACL?

答: 请参阅: https://wordpress.org/support/topic/google-storage-not-work/page/2/#post-8897852

评价

2023年4月14日
I came across a major glitch when trying to export products from Woocommerce. The export returns an empty csv file (empty except for the header rows) unless I deactivate this plugin.
2021年6月10日
it works, but with major problems. by default, it changes the media storage of WP to google storage, but after this plugin is installed, user cannot install any other extensions, because it will try to install into gs://xxx
2020年7月1日
Google...you should not do that! poor insturction, not working either way API or Json file, maybe as I am under cloudflare? don't know, what about the compatibility with other cdn plugins?
2018年6月19日
Maybe the instructions should include the updated wording: Visit Cloud Console, go to IAM & Admin -> Service accounts and create a service account with Storage Admin role and download the json key file. And keep in mind to make the bucket publicly available: https://cloud.google.com/storage/docs/access-control/making-data-public#buckets
阅读所有7条评价

贡献者及开发者

“Google Cloud Storage 插件” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

更新日志

0.1.6

  • 更新所有依赖项

0.1.5

  • 更新所有依赖项
  • 添加 HTTP 标头以跟踪 WordPress 和插件版本

0.1.4

  • 使用最新版本的 Google Cloud Storage 客户端库
  • 更新所有依赖项

0.1.3

  • 在自述文件中添加了用于配置服务帐户的部分
  • 在自述文件中添加了“常见问题”部分
  • 更新了依赖性

0.1.2

  • 在自述文件中添加 “Tested up to” 字段

0.1.1

  • 将供应商目录捆绑在zip文件中

0.1

  • 初始发行