wpCloud Stateless Media for GCE
![Issues - Active](https://badge.waffle.io/wpCloud/wp-stateless.png?label=in progress&title=Active)
define( 'WP_STATELESS_MEDIA_BUCKET', 'media.application-domain.com' );
define( 'WP_STATELESS_MEDIA_MODE', 'cdn' );
define( 'WP_STATELESS_MEDIA_KEY_FILE_PATH', '/var/www/wp-content/keys/application-name-service-id.p12' );
define( 'WP_STATELESS_MEDIA_SERVICE_ACCOUNT', '[email protected]' );
{
"wp_stateless_media": {
"bucket": "media.application-domain.com",
"mode": "cdn",
"key_file_path": "/var/www/wp-content/keys/application-name-service-id.p12",
"service_account": "[email protected]"
}
}
Set options:
wp option update sm_mode cdn
wp option update sm_service_account_name [email protected]
wp option update sm_key_file_path /var/www/wp-content/keys/some-key.p12
wp option update sm_bucket media.site.com
Setting a setting via constants will prevent ability to make changes in control panel.
- WP_STATELESS_MEDIA_MODE - Set to "disabled", "backup" or "cdn" to configure mode.
- WP_STATELESS_MEDIA_SERVICE_ACCOUNT - Google email address of service account.
- WP_STATELESS_MEDIA_KEY_FILE_PATH - Absolute, or relative to web-root, path to P12 file.
- x-goog-meta-object-id
- x-goog-meta-height
- x-goog-meta-width
- x-goog-meta-source-id
- x-goog-meta-file-hash
- x-goog-meta-child-of