WordPress knowledge sharing

AliCloud OSS purchase and simple use

AliCloud Object Cloud Storage OSS It is a secure, low-cost, highly reliable and massive cloud storage service provided by Alibaba Cloud. The official propaganda is to provide 99.9999999999% data reliability. Many webmasters' websites and projects contain a large number of pictures, documents, videos and programs that need to be called at any time. If they are placed on the same cloud server as the website program, it will seriously affect the performance and execution efficiency of the website server. The most intuitive result is that the website opens slowly. So when the website and project develop to a certain scale, it is necessary to consider the separation of website and data, Different ECS servers are used for processing, so as to improve the opening speed, and the user experience will naturally increase. Let's talk about the purchase and simple use of AliCloud OSS.

Popularize the basic knowledge. What is Object Cloud Storage OSS? It is a cloud storage service. To put it bluntly, it is a cloud storage space that has been targeted and optimized to provide secure, low-cost, high reliability, and massive cloud storage services for a large number of mobile applications, pictures, documents, videos, programs, and backup data.

If you buy an AliCloud server, you can achieve maximum efficiency with AliCloud OSS. Get exclusive to this blog AliCloud thousand yuan voucher A hundred products worth 50 yuan.

1、 AliCloud OSS purchase
Alibaba Cloud OSS official website: Click me to open

Go to the AliCloud product page>>Cloud Computing Foundation>>Storage Services>>Object Storage OSS, click "Discount Package", and you will see the following purchase page. The region selection is the same as the region of your ECS server (generally the default is national). The larger the size of the storage package, the cheaper the price, and the longer the purchase time, the lower the price. Finally, click Buy Now, Remember to use the voucher received above when making payment to save money.

Note: Alibaba Cloud's page layout will be revised regularly. When you see this article, it may not be the same path as above. It is generally the same.

2、 Simple use of cloud storage OSS

Alibaba Cloud OSS provides url parameters to obtain the image processing service (IMG) of the cloud OSS in various sizes. Compared with the image generated in WordPress when uploading, this is a more convenient and fast solution, which takes up less storage space and changes the size flexibly.

That is to say, AliCloud OSS provides image storage space and external interfaces. Then we use the wordpress plug-in developed by a third party (used to interface with OSS) to call OSS storage functions. This is the general principle. Let's briefly understand some terms and meanings of AliCloud OSS.

First is the concept of a bucket, which is equivalent to a disk. The disk on the ECS is used to store your project data. Go to your AliCloud>>management console to find the cloud storage OSS, create a bucket, and add "disk" information in the pop-up window.

The Buck Name is the name of the disk. It is usually filled in by the domain name. If there are multiple buckets, it is easier to distinguish them, because they cannot be changed after confirmation.

Region: consistent with the storage package region.

The standard storage is selected as the storage type, and the other two types will be charged extra during use.

The read/write permission is generally public read, that is, it allows others to access the object content, that is, it needs to release the link for everyone to download. You can understand that if the bucket is a disk, then the object is the partition, and the uploaded files are placed in this partition.

After submission, a new bucket is created.

3、 Wordpress installs the AliCloud cloud storage OSS plug-in
Plug in name: AliCloud OSS Support Plug in (Aliyun OSS For WordPress). Plug ins of the same kind can also be tried by themselves.

Download address: https://github.com/IvanChou/aliyun-oss-support

This is developed and maintained by Chinese people. It can be uploaded to the WordPress plug-in. If the upload fails, it doesn't matter. It can be enabled and set normally.

1. The settings in the following figure can be found on the AliCloud Object Storage OSS console, and the Access Key ID and Access Key Secret can be found in the upper right corner. The bucket name and domain name can be found in the bucket overview.

2. The data node selection is consistent with the storage package.

3. Enable the picture service. The most powerful part of the plug-in is to enable the image service here. You only need to upload an original image in the wordpress media library to meet any size requirements. The efficient service of IMG and the cooperation of CDN make the response speed no different from accessing static resources, so it is highly recommended to enable it.

4. When you enable the image preset style, the link "Click to download the image style configuration file" will appear, and the configuration file can be downloaded and imported to Alibaba Cloud.

5. Original drawing protection. AliCloud OSS provides the original image protection function, which needs to be enabled on the AliCloud console first.

6. Custom separator. Appears in the picture Url? X-oss-process=This is the default rule of Alibaba Cloud's image service. Alibaba Cloud also provides several other optional separators. This function can take effect only after the corresponding configurations are made on both sides of the Alibaba Cloud console and plug-in. After enabling, the image Url is as follows: https://yourhost/2016/12/001.jpg @! medium

7. There are several other points to understand:

When the image service is enabled, only the original image will be uploaded to OSS. Thumbnails will still be generated locally but will not be uploaded. It is recommended not to turn off the image service after it is turned on. Turning off the image service will result in the loss of previously uploaded image thumbnails. If you must turn off or stop using this plug-in, you can use locally reserved thumbnails for data recovery.

8. About not keeping files on the local server. It is strongly recommended not to open it without special requirements. Reason: When deleting images or attachments from the WordPress background due to the deletion of local files, the resources in OSS cannot be deleted. If you also enable the image service, you will encounter the problem of thumbnail loss when you want to disable the plug-in.

4、 Bind your own domain name and add an anti-theft chain

Only the registered domain names can be bound, and the anti-theft chain can prevent the pictures from being abused by others.

5、 Add domain name resolution

You also need to go to your domain name resolution panel to add resolution records, which are specifically set for AliCloud storage OSS.

To test, upload several pictures through the WordPress background media library, and then go to the object folder of the OSS console of cloud storage to see if they can be found. If it can be found, the media library can also display thumbnail images, then it is successful; If you can't find it, you need to check whether the information you just filled in is correct; If the object has uploaded pictures, but the wordpress media library does not display thumbnails, you need to check whether the bucket has "public read" permission, or if the OSS console has enabled "original image protection", this result will also be caused.

In general, AliCloud OSS for object storage is not very complicated to use. Most of them are simple operations AliCloud thousand yuan voucher With the help of a hundred products, you can quickly set up the cloud storage function, which can divert and speed up your website.

Like( eleven )
Article name: Alibaba Cloud Object Storage OSS Purchase and Simple Use
Article link: https://www.vpsss.net/7108.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.