Skip to content
Eric Sopp edited this page Aug 10, 2017 · 26 revisions

Constants are set via the [https://codex.wordpress.org/Editing_wp-config.php](wp-config.php file) and will override any settings configured at the network or site level.

Available Constants

WP_STATELESS_MEDIA_MODE

accepted values: disabled, backup, cdn, stateless
default value: cdn

WP_STATELESS_MEDIA_BODY_REWTITE

Scans post content and meta during presentation and replaces local media file urls with GCS urls. This setting does not modify your database.

accepted values: true, false
default value: true

WP_STATELESS_MEDIA_ON_FLY

Upload image thumbnails generated by your theme and plugins that do not register media objects with the media library.

accepted values: true, false
default value: false

WP_STATELESS_MEDIA_BUCKET

The name of the GCS bucket.

WP_STATELESS_MEDIA_ROOT_DIR

If you would like files to be uploaded into a particular folder within the bucket, define that path here.

WP_STATELESS_MEDIA_JSON_KEY

Private key in JSON text format for the service account WP-Stateless will use to connect to your Google Cloud project and bucket.

WP_STATELESS_MEDIA_KEY_FILE_PATH

File path to private key file in JSON format.

WP_STATELESS_MEDIA_CACHE_CONTROL

Control the default cache control assigned by GCS.

accepted values: reference Google Cloud Documentation.
default value: public, max-age=36000, must-revalidate

WP_STATELESS_MEDIA_DELETE_REMOTE

Delete the GCS file when the file is deleted from WordPress.

accepted values: true, false
default value: true

WP_STATELESS_MEDIA_CUSTOM_DOMAIN

Replace the default GCS domain with your own custom domain. This will require you to configure a CNAME.

default value: storage.googleapis.com

WP_STATELESS_MEDIA_HASH_FILENAME

Prepends a random set of numbers and letters to the filename. This is useful for preventing caching issues when uploading files that have the same filename.

accepted values: true, false
default value: true

WP_STATELESS_MEDIA_HIDE_SETTINGS_PANEL

Hide the WP-Stateless settings panel.

accepted values: true, false
default value: false

WP_STATELESS_MEDIA_HIDE_SETUP_ASSISTANT

Hide the WP-Stateless setup assistant.

accepted values: true, false
default value: false

Clone this wiki locally