Google Cloud Storage plugin

説明

Google Cloud Storage plugin allows you to upload media files to a
Google Cloud Storage bucket.

インストール

  1. Download the plugin and place it in your /wp-content/plugins/ directory.

  2. Enable this plugin in the WordPress admin UI,

  3. Configure your Google Cloud Storage bucket in the plugin setting
    UI.

  4. In Google Cloud Console, set the default acl of the bucket so that
    allUsers can read.

Depending on your environment, you may need to configure a Google
Service Account to call the APIs.

To run this plugin on Google App Engine for PHP 7.2, it will work
without additional configuration.

To run this plugin on Google Compute Engine or App Engine Flexible,
you will need to do the following:

  • Visit Cloud Console, go to Compute -> instances and select
    the instance where WordPress is running.

  • Stop the instance.

  • Once the instance has stopped, click Edit and you can now
    modify the scopes under Cloud API access scopes. Change
    the Storage scope from Read Only to Full.

If you want to run this plugin outside of Google Cloud Platform, you
need to configure your service account as follows:

  • Visit Cloud Console, go to IAM & Admin -> Service accounts
    and create a service account with Storage Object Admin
    permission and download the json key file.

  • Upload the json key file to the hosting server. Don’t put it
    in a public serving area.

  • Add the following line to wp-config.php (replace the file path
    with the real one).

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

FAQ

Q. The plugin crashes with No project ID was provided, and we
were unable to detect a default project ID
, what’s wrong?

A. See the section about configuring the service account in the
Installation section.

Q. How to configure the default ACL on my Google Cloud Storage bucket?

A. See: https://wordpress.org/support/topic/google-storage-not-work/page/2/#post-8897852

Installation Instructions
  1. Download the plugin and place it in your /wp-content/plugins/ directory.

  2. Enable this plugin in the WordPress admin UI,

  3. Configure your Google Cloud Storage bucket in the plugin setting
    UI.

  4. In Google Cloud Console, set the default acl of the bucket so that
    allUsers can read.

Depending on your environment, you may need to configure a Google
Service Account to call the APIs.

To run this plugin on Google App Engine for PHP 7.2, it will work
without additional configuration.

To run this plugin on Google Compute Engine or App Engine Flexible,
you will need to do the following:

  • Visit Cloud Console, go to Compute -> instances and select
    the instance where WordPress is running.

  • Stop the instance.

  • Once the instance has stopped, click Edit and you can now
    modify the scopes under Cloud API access scopes. Change
    the Storage scope from Read Only to Full.

If you want to run this plugin outside of Google Cloud Platform, you
need to configure your service account as follows:

  • Visit Cloud Console, go to IAM & Admin -> Service accounts
    and create a service account with Storage Object Admin
    permission and download the json key file.

  • Upload the json key file to the hosting server. Don’t put it
    in a public serving area.

  • Add the following line to wp-config.php (replace the file path
    with the real one).

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

評価

Works great

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

3件のレビューをすべて表示

貢献者と開発者

Google Cloud Storage plugin はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“Google Cloud Storage plugin” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログRSS で購読してみてください。

変更履歴

0.1.4

  • Uses the most recent release of the Google Cloud Storage client library
  • Updates all dependencies

0.1.3

  • Added a section for configuring service account to the readme
  • Added Frequently Asked Questions section to the readme
  • Updated dependencies

0.1.2

  • Added “Tested up to” field to the readme

0.1.1

  • Bundle vendor dir in the zip file

0.1

  • Initial release