WordPress AliCloud OSS Object Cloud Storage Configuration Tutorial

4 minutes
three hundred and twelve
zero

At present, more and more users prefer to store images and other attachments separately in third-party object cloud storage. This process can save a lot of disk space for the server, reduce the workload of file migration when the website moves, and independent cloud storage also avoids server bandwidth restrictions when accessing files, Therefore, it can reduce the cost of site construction/operation and maintenance and improve the access experience For object cloud storage, we should be most familiar with AliCloud OSS. Here is a brief introduction to its configuration and usage on WordPress.

Create Bucket

Access the AliCloud console through the Products and Services>Storage and CDN>Object Storage OSS Enter the OSS console and click Create Bucket Click to create a storage space, as shown:

 Create Bucket

There are two main points to be noted:

1、 region It is recommended to consider the nearby location of your server. If you use an AliCloud server, it is recommended to choose the same region as the server. This can save the cost of upload traffic through intranet interworking. At the same time, the upload speed is much faster.

2、 read-write permission choice Public reading In this way, the image can be accessed normally.

WordPress background OSS configuration

plug-in unit

OSS does not support WordPress by default, so it needs to be implemented through plug-ins. If we use the theme developed by WPCOM, we strongly recommend using OSS Upload Plug ins. We have done compatibility testing and code analysis on several OSS plug-ins, OSS Upload It is the only one with perfect functions Hook mount is reasonable WordPress OSS plug-in. Plug in download can go to the author page: //www.xiaomac.net/oss-upload.html Github project address: //github.com/xiaomac/oss-upload

to configure

Install Enable OSS Upload After plug-in, enter Settings>OSS Upload , follow the prompts to set plug-in options.

The following options need attention:

Access Key and Secret Key

Access Key and Secret Key You can log in to the Alibaba Cloud background to get it: click the avatar in the upper right corner of the Alibaba Cloud interface, and select accesskeys , and then create the AccessKey, as shown in the figure:

 Access Key and Secret Key

Access link

Visit the link and fill in the Internet Bucket domain name Address (need to add // perhaps // ), if you bind your own domain name, you can fill in your own domain name address. If Upload Path If the saved directory is set, the access link should also be followed by the same directory.

 Access link

Upload endpoint

To upload an endpoint, it was mentioned above when creating a bucket. If it is an AliCloud server and you select the same region, you can fill in Intranet node If not, fill in the Internet access address.

 Upload endpoint

If you fill in here, you can click the Test it Button. If the prompt is normal, it indicates that the docking is successful.

thumbnail

Suggested choice Use parameter image service, default and simple perhaps Use physical thumbnails, check if there is a thumbnail error in the theme Option.

Remote Pictures

Themes also have similar functions (theme settings>optimization and acceleration>saving remote pictures). If the theme is enabled, it does not need to be enabled repeatedly.

Local Backup

It is recommended to check, especially in the process of early configuration and file synchronization, to avoid the problem of irrecoverable picture loss.

other Featured pictures Style Separator Full picture style Automatic compression Lazy loading Delayed link And other options can be ignored.

Click after setting Save Changes Button, and then click Upload the entire local storage directory To synchronize files to OSS, this process may take some time. After synchronization, you can visit the website's foreground page to test whether the images can be accessed normally. If so, it means that the configuration is successful.

 Upload the entire local storage directory
This article is written by: Chief Editor Published on Software Development of Little Turkey , please indicate the source for reprinting: //hongchengtech.cn/blog/190.html
Kuke_WP editor
author

Related recommendations

One year ago (2023-11-28)

Count excellent domestic WordPress topics and rank Wordpress charging topics

Original title: A detailed list of excellent domestic WordPress themes WordPress originated from abroad, is easy to use, and is very popular, making more and more domestic sites start to use WordPress website building programs. There are also many powerful experts or teams in our country who have developed WordPress themes. This article details the outstanding domestic Wor
five hundred and twenty-seven
zero
1 year ago (2023-11-16)

Six Best Free Lightweight WordPress Themes in 2022

Your WordPress theme is the foundation of your website, which means it plays an important role in the loading speed of your website. Of course, you can use a lot of strategies to speed up your WordPress website afterwards. But your theme will always become a bottleneck. In fact, I once did some tests on my collection website, only
1,278
zero
One year ago (2023-11-13)

Share a wordpress image theme: home-made original WMPIC theme

A very excellent wordpress image theme in China, there are many image themes and corporate themes in foreign countries, but in China, there are fewer corporate themes and fewer image themes. The aesthetic image theme we released today has been recognized by many netizens since the author's release. Here we express our gratitude and support for the author's sharing spirit. I also hope you can make
four hundred and seventy-nine
zero
One year ago (2023-11-13)

Wordpress theme: recommend a slow market theme, a small and fresh wordpress Taobaoke theme

Theme introduction The theme is suitable for Taobao customers, women's information, pictures, etc. The small and fresh wordpress theme has a very simple interface and a very good display effect. At the same time, the built-in article title is rewritten, and the article jumps to the outer chain, which is conducive to SEO. This theme has been copied for a long time, but it was stopped for a long time due to some reasons. Near
four hundred and eleven
zero
One year ago (2023-11-13)

Wordpress theme recommendation: share a wordpress Chinese theme Download: IPC theme

A Chinese wordpress theme originally created by Chinese people, which is a bit like a heterogeneous theme intuitively. However, this theme is made with reference to robin and other themes, which is absolutely original. This is also the author's first WP theme, so please keep the copyright information of the original author when using this theme. Let's introduce the use method and features of this theme
seven hundred and thirty-nine
zero

comment

0 people have participated in the review

Scan code to add WeChat

contact us

WeChat: Kuzhuti
Online consultation: