Configure WP-Stateless Settings
Now we will configure WP-Stateless settings so it can use Google Cloud Storage to store your media files.
Step 1: Update WP-Stateless settings
-
In WordPress Admin, go to Media, Stateless Settings.
-
Fill in the following required fields:
- Mode: Select the mode WP-Stateless should use to handle your media. Each option has a brief description to help you choose the best one for your needs.
- Bucket: Insert the bucket name you created in the Step 3.
- Service Account JSON: You will need to get the contents of the key file you downloaded in Step 4. Open the
.json
file in a text editor (e.g., Notepad or TextEdit), copy its entire content, and paste it into this field.
- Click Save Changes at the bottom of the page.
Step 2: (Optional) Upload something via the Media Library
This quick test ensures WP-Stateless is handling your media correctly.
-
In WordPress Admin, go to Media, Library.
-
Upload something, like an image.
-
If you set the WP-Stateless mode to
CDN
,Ephemeral
orStateless
, you should see the media file’s URL referencing Google Cloud Storage (storage.googleapis.com
).
Step 3: (Optional) Check the Google Cloud Storage Bucket
This is another quick test to ensure everything is working correctly before you start using WP-Stateless fully.
-
Go to the Google Cloud Storage Browser .
-
Open the bucket you created in Step 3.
-
You’ll see the media files you uploaded in the Media Library, including the original file and other image sizes.
Congratulations!
You’ve successfully completed the WP-Stateless setup. Your WordPress site is now connected to Google Cloud Storage, and your media is ready to be served efficiently and reliably. Happy blogging!