Store WordPress multimedia content to COS
Last updated: 2020-02-16 17:42:27PDF
WordPress can save multimedia content on Tencent Cloud COS through third-party plug-ins. Saving multimedia content on COS has the following benefits:
- Multimedia content will have higher reliability.
- Your server does not need to prepare additional storage space for multimedia content.
- Visitors will be directly connected to the COS server when viewing and downloading multimedia content, which does not occupy your server's downstream bandwidth / Traffic, Access is faster.
- It can cooperate with Tencent Cloud CDN to further improve the speed of viewing and downloading multimedia content.
- Build WordPress.
- Create one Public read and private write The region recommendations of Bucket and Bucket are the same as those of CVM running WordPress. For more information on how to create them, please see Create Bucket Document.
- Find the newly created Bucket in the list of Bucket, record Bucket name and Region The geographical abbreviation of. For regional abbreviations, see Regions and Access Domain Names Document.
- Enter Access Management console To record the SecretID and SecretKey .
Install and configure the WordPress plug-in
- Log in and enter WordPress Instrument panel .
- In the left menu bar, select "plug-ins"-> "install plug-ins" to go to the install plug-ins page. Search and install here Media Cloud Plugin.
- Enable Media Cloud Plug-in, which automatically opens the configuration wizard, and then click [NEXT].
If the configuration wizard cannot be opened automatically, select [Media Cloud] from the left menu of WordPress, and click [Setup Wizard] under [Cloud Storage].
- Select [S3 Compatible] in the storage provider interface, and click [NEXT].
- Configure the following content in the subsequent form, and click "NEXT" when the configuration is complete:
|Configuration Item||Configuration value|
|ACCESS KEY||Access's keySecretID|
|CUSTOM ENDPOINT||The format is|
Test multimedia content
- Write articles, add multimedia content and publish.
- Copy the picture address in the article, or check the picture path through the browser debugging tool, you can see that the picture address is the address on Tencent Cloud COS Cloud Object Storage.
- Looking at the download address of the attachment to the article, you can see that the download address also points to the address on Tencent Cloud COS Cloud Object Storage.
Use Tencent Cloud CDN
- To configure CDN acceleration for Bucket saved in the WordPress attachment, see Setting CDN Acceleration Document.
- Go to the management interface of Media Cloud and click Cloud Storage [Settings] below.
- will CDN SETTINGS In CDN Base URL Set to your CDN domain name, such as the default accelerated domain name for COS
https://wordpress-1250000000.file.myqcloud.com/Or your custom accelerated domain name
- Check the multimedia content in publish's previous article and you can see that the relevant address already points to the CDN domain name you configured.