Cloudbooklet
  • News
  • Artificial Intelligence
  • Applications
  • Linux
No Result
View All Result
Cloudbooklet
  • News
  • Artificial Intelligence
  • Applications
  • Linux
No Result
View All Result
Cloudbooklet
No Result
View All Result
Home Google Cloud

WordPress Media from Google Cloud Storage – CDN

by Cloudbooklet
5 years ago
in Google Cloud
Wordpress Media From Google Cloud Storage - Cdn
ShareTweetSendShare
Readers like you help support Cloudbooklet. When you make a purchase using links on our site, we may earn an affiliate commission.

How to set up your WordPress to use Google Cloud Storage for your Media files Today we are going to walk you through how to set up Google Cloud Storage for your WordPress uploads. The main reason to use this is to save disk space and use Cloud Storage as a CDN. WordPress Google Cloud […]

ADVERTISEMENT

How to set up your WordPress to use Google Cloud Storage for your Media files

Today we are going to walk you through how to set up Google Cloud Storage for your WordPress uploads. The main reason to use this is to save disk space and use Cloud Storage as a CDN.

WordPress Google Cloud Storage Setup

For setting up WordPress to use Google Cloud storage for media library, we can use a free WP-Stateless plugin. This plugin has three modes

  1. Backup – Upload media files to Cloud Storage and serve local media files.
  2. CDN – Copy media files to Cloud Storage and serve from there.
  3. Stateless – Media files are not stored locally. Upload and serve media directly from Cloud Storage.

Install WP-Stateless Plugin

Login to your WordPress Dashboard and navigate to Plugins >> Add new and search for wp-stateless. You will find a plugin developed by Usability Dynamics, Inc. Click on “Install now” and activate the plugin.

ADVERTISEMENT

Setup the Plugin with GCS

You can either click on “Begin Setup Assistant” or you can follow manual setup.

You might also like

How To Setup Ssh Keys On Ubuntu

How to Setup SSH Keys on Ubuntu 20.04

4 months ago
Draggan Ai Editing Tool Install And Use Draggan Photo Editor

DragGAN AI Editing Tool Install and Use DragGAN Photo Editor

4 months ago

Now we will do a manual setup. Manual setup includes 3 Steps

  • Create Google Cloud Storage Bucket
  • Create a Service Account and download JSON files
  • Complete the Wp-Stateless setup

Create Google Cloud Storage Bucket

Go to your Google Cloud console and navigate to Storage >> Browser

ADVERTISEMENT

Click Create Bucket

Enter Bucket Name

ADVERTISEMENT

Choose Default storage class as Multi-Regional

Select Location which is nearest to you

ADVERTISEMENT

Click Create

Create Google Cloud Storage Bucket

Once your bucket is created click on the bucket and click the Permissions tab

ADVERTISEMENT

Click Add members button

In the Popup add allUsers in Members and in Roles select Storage Object Viewer

Click Add

Add Members

Now your bucket is publically accessible to all users

Create a Service Account and download JSON file

To connect WordPress with Cloud Storage a service account is needed with sufficient permissions. Let’s create a service account

Go to IAM & Admin >> Service accounts

Click Create service account

In step 1

Enter Service account Name

Click Create

Create A Service Account

In step 2

Select Role Storage >> Storage Admin

Click Continue

Select Role

In step 3

Click Create Key

Choose Key type as JSON

Click Create

Download Json File

Now a JSON key file will be downloaded. Open the file in a text editor.

Complete the WP-Stateless setup

Go to your WordPress Dashboard and navigate to Media >> Stateless settings

In General choose Stateless, File URL replacement to Enable, Enter supported file types or leave default

In Bucket enter your Bucket Name

In Bucket folder leave empty

In Service account JSON paste the contents of the you downloaded while creating the Service Account in Google Cloud Platform

In Cache-Control enter public, max-age=86400

In Delete GCS File select Enable

Check out the Preview field, this is the sample of your media URLs

Click Save Changes.

Let’s test the setup quickly

Upload a file through your Media Library and check the URL of your image. It will be in the format provided by the plugin in the Preview

Additionally, if you like to upload existing images to Google Cloud Storage(GCS). Go to Tools and sync your images with GCS. This will take some time according to your image count. Once the sync is completed you can see all images served from Google Storage.

Tags: Cloud CDNGoogle Cloud PlatformWordPress
ShareTweetSendShare
Cloudbooklet

Cloudbooklet

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Related Posts

Set Up Deep Learning With Nvidia, Cuda, Cudnn On Ubuntu

How to Set Up Deep Learning with Nvidia, CUDA, cuDNN on Ubuntu 22.04

7 months ago
How To Install Or Upgrade Php 8.2 On Ubuntu 22.04

How to Install or Upgrade PHP 8.2 on Ubuntu 22.04

9 months ago
How To Change Timezone On Ubuntu 22.04

How to Change Timezone on Ubuntu 22.04

1 year ago
How To Install Ansible On Ubuntu 22.04

How to Install Ansible on Ubuntu 22.04

1 year ago

Follow Us

Trending Articles

Chatgpt For Marketing

Top 10 Ways to Use ChatGPT for Marketing in 2023

September 22, 2023

Wondershare Virbo AI Video Creation with New Features

Create a Professional Website with Wix AI Website Builder

How to Delete Netflix Account Permanently

7 Best AI Girl Generators for Creating Realistic and Beautiful AI Girls

Why Did Meta Shut Down 3 VR Games?

Popular Articles

Undressai_1

7 Free Undress AI Tools to Remove Clothes from Images

September 19, 2023

10 Best Gay Dating Apps to Use in 2023

Google Safe Search Settings: Blurred Explicit Images in Search Results

10 Best AI Mockup Generators to Create Stunning Mockups

How to Easily Remove Background in Microsoft Paint and Paint 3D

10 Apps to See Who Viewed Your Instagram Profile

Subscribe Now

loader

Subscribe to our mailing list to receives daily updates!

Email Address*

Name

Cloudbooklet Logo

Welcome to our technology blog, where we explore the latest advancements in the field of artificial intelligence (AI) and how they are revolutionizing cloud computing. In this blog, we dive into the powerful capabilities of cloud platforms like Google Cloud Platform (GCP), Amazon Web Services (AWS), and Microsoft Azure, and how they are accelerating the adoption and deployment of AI solutions across various industries. Join us on this exciting journey as we explore the endless possibilities of AI and cloud computing.

  • About
  • Contact
  • Disclaimer
  • Privacy Policy

Cloudbooklet © 2023 All rights reserved.

No Result
View All Result
  • News
  • Artificial Intelligence
  • Applications
  • Linux

Cloudbooklet © 2023 All rights reserved.