WordPress knowledge sharing

Tencent Cloud Object Storage (COS) Plug in Installation and Setting Tutorial

Tencent Cloud Object Storage (COS) plug-in It is officially developed by Tencent Cloud for use in Wordpress Tencent cloud object storage cos A user - developed auxiliary plug-in. By installing plug-ins in the wordpress program, it is very convenient to seamlessly synchronize WordPress static files with Tencent Cloud Object Storage COS, improve the speed of website content access, and reduce local storage overhead.

Selected explosives area
618 Zhongshenghui Click to view the purchase
Selected preferential activities Click to view the purchase
Tencent Cloud Preferential Products Zone Click to view the purchase
Cross border e-commerce store server Lightweight application server
Tencent Cloud Animal Palu Game Server Click to view the purchase
For more Tencent Cloud content, please see Tencent Cloud

Why use object storage

Users who use the wordpress program have published articles over the years and uploaded many static files such as pictures, videos, and documents. These files are placed on the same server as the website and database. When the number of website visits increases, it will put a lot of pressure on the server. Object storage is designed to solve this problem. Throw static files such as pictures, videos, and documents into the object storage cos. The object storage cos provides services for visitors to access these static files, reducing server pressure, and the website can accommodate more access traffic.

COS fee of Tencent cloud object storage

The cost of Tencent cloud object storage COS is very low. If Lao Wei uses 50G object storage space himself, a few cents a month will be enough. It should be reminded that COS users who use object storage can deposit a small amount of fees in their accounts. More than ten yuan is enough, but not without a penny. Lao Wei once had an embarrassing case of ECS being shut down because of cos arrears. Please see COS object storage is also stopped after Tencent ECS arrears. Please avoid this pit Old Wei stepped into the hole, so everyone must leave some money in the account.

Tencent Cloud Object Storage (COS) plug-in installation

In Wordpress background>Plug ins>Install Plug ins, search for tencentcloud cos, install and enable Tencent Cloud Object Storage (COS). If your server cannot be installed normally in China, there are two ways:

1. Visit cn.wordpress.org/plugins/tencentcloud-cos/to download and upload it to the server plug-in directory, and then go to wordpress background to enable it;

2. If you want to install online, you can quickly solve the problem through the WP China Yes plug-in. For a tutorial, see WP China Yes plug-in can't update WordPress program/theme/plug-in in China

 Tencent Cloud Object Storage (COS) plug-in installation
Tencent Cloud Object Storage (COS) plug-in installation

Tencent Cloud Object Storage (COS) plug-in settings

1. Global Key

Click Plug in>Settings in Installed Plug ins to enter Tencent Cloud Object Storage (COS) Plug in and see the column of Custom Key. Access key management acquisition as shown in the figure below.

If you use multiple Tencent cloud plug-ins at the same time, such as cdn plug-ins and cos plug-ins, you can share the same key. In the background of Wordpress, Tencent Cloud Settings>Tencent Cloud Key, open the global key, and enter the SecretId and SecretKey (tutorial How to obtain Tencent Cloud API key APPID/SecretId/SecretKey? ), save the configuration.
At this time, when you go to the object store, you will see that the global key set above has been used. Do not enable the custom key, nor will the cdn plug-in enable the custom key.

 Tencent cloud plug-in configuration global key
Tencent cloud plug-in configuration global key

2. Detailed settings

  • Region: where the object storage cos is purchased (recommended to be in the same region as the ECS), select it;
  • Space name: obtained from the object storage on Tencent Cloud official website, that is, [bucket name], and copied;
  • Access domain name: there are two styles: one is the cname domain name provided by Tencent Cloud, and the other is the customized domain name you set yourself;
  • If it is the object storage cos domain name provided by Tencent Cloud, the access location is in the object storage on Tencent Cloud's official website. Click the bucket name to enter and open [Domain Name and Transmission Management] [Default CDN Acceleration Domain Name]. The [Origin Site Domain Name] on the right is the one with cos in the url. Copy the domain name+directory to the plug-in. There is a demonstration on the plug-in. Follow it to find it;
  • If you set your own custom domain name, that is, "custom domain name+directory", the directory is generally/wp content/uploads. For example, Weiss notes should be filled in https://img.vpsss.net/wp-content/uploads You can change to your own domain name.
  • Automatic renaming: choose your own;
  • Do not save locally: it is not recommended to open it. If enabled, all static files will be synchronized to COS and the local copy will be deleted;
  • Forbid thumbnails: Wordpress will automatically generate several thumbnails of different sizes for uploaded pictures by default. Here, different themes have different requirements for thumbnails, which cannot meet the unified requirements. Therefore, it should not be turned on for security reasons. If you don't want thumbnails, you can use plug-ins to disable the generation of thumbnails;
  • Data Vientiane: Tencent cloud data Vientiane products, do not open if not purchased;
  • Save the configuration.
  • Attachment synchronization: not recommended. Used to synchronize all files in the media library to Tencent Cloud COS. If it is easy to time out or report errors with so many pictures like Weiss Notes, it is recommended to use the official COSBrowser Synchronization Tool Upload the corresponding directory of the local file to the COS directory.
  • One click replacement: All static file addresses in the one click replacement website content are Tencent Cloud COS file addresses, that is, the address you filled in above. Lao Wei strongly recommends backing up the website and database before operation. You can also use the wordpress plug-in to complete this operation.
 Tencent Cloud Object Storage (COS) plug-in settings
Tencent Cloud Object Storage (COS) plug-in settings

At the end, I want to say that Lao Wei shared the cos plug-in developed by himself before Tencent Cloud COS Object Storage WordPress Plug in Installation Setting Detailed Graphic Tutorial Now you can replace it with the official COS plug-in of Tencent Cloud in this article. Old Wei personally tested that the official COS plug-in performed stably, occupied less system resources, and opened WordPress in the background faster. Compared with the official cos plug-in, the cos plug-in developed by individuals has a slight impact on the background opening speed of WordPress in use.

The development of Tencent Cloud Object Storage (COS) plug-in has been online for a long time, and the official is low-key and there is no publicity. Old Wei also saw it unintentionally. After communicating with the official developer, we know that he has developed several Tencent cloud wordpress plug-ins at the same time, and the Tencent cloud cdn plug-in shared by Lao Wei (tutorial Tencent Cloud Content Distribution Management Plugin-Tencent Cloud CDN Plug in Installation and Use Tutorial )It was also developed by him. In the cdn plug-in, Lao Wei submitted several problems that he found and solved them on the spot. After the update, it was more smooth and easy to use.

In short, as long as you use Tencent Cloud Object Storage, you can try this official Tencent Cloud Object Storage (COS) plug-in The actual experience speed and stability are better than the cos plug-ins of third-party personal developers. In fact, the plug-in of individual developers has not been updated for several years, and free plug-ins also lack the subjective motivation to update frequently.

Like( three )
Article name: Tutorial of Tencent Cloud Object Storage (COS) Plug in Installation and Settings
Article link: https://www.vpsss.net/22295.html
Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself.
The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.