Tutorial on Using Upyun CDN Cloud Storage to Accelerate WordPress Websites
The tutorial in this article usesUpyuncloud storage's built-inCDNfunction to host image files on Upyun, achievingdynamic and static separation acceleration. You can also put the entire website on Upyun's CDN service, but novice users are advised to start with this tutorial and then apply CDN to the whole site after becoming familiar.Register an Upyun Account
First, we need to register an Upyun account. After registration and real-name verification, you will receive a 61 yuan voucher.Registration Link What can you buy with the 61 yuan newcomer voucher from Upyun?? The 61 yuan one-month voucher from Upyun's real-name authentication is used to offset your fees for using Upyun services that month. This means you can use this 61 yuan voucher to pay for any service provided by Upyun.Obtaining Upyun Free Traffic
Does Upyun still offer free traffic? The answer is yes.By default, Upyun only provides the 61 yuan voucher for real-name authentication and no longer offers fixed monthly free traffic. To get fixed monthly free traffic, you need to apply for the Upyun Alliance (Link Address), which grants 10GB of free cloud storage space and 15GB of CDN acceleration traffic per month.
Upyun Cloud Storage Setup Tutorial
Although we intend to use Upyun's CDN acceleration, Upyun provides cloud storage space by default, and cloud storage automatically includes CDN acceleration. Therefore, it is recommended to directly useUpyun Cloud Storage to accelerate your WordPress website。 ①、Create Cloud Storage ServiceEnter the Upyun console, find Cloud Storage, and then create a service.
Choose a name for yourself, for acceleration traffic, Naiba only accelerates within China. Generally, there are no visitors from abroad, and international acceleration costs are higher.Create a new operator, grant read, write, and delete permissionsAll permissions。 ②、Bind DomainAfter creating the service, return to the service management interface. In the domain management section, click the domain binding button, then enter your desired CDN domain, for example, Naiba's is img.wordpressjc.com. Then go to the website where you purchased your domain, find the domain resolution panel, and add aCNAME的records, the record value can be seen in the location indicated by the arrow in the image below
Don't know how to resolve? Read this article:#WebsiteBuilding# Tutorial on Adding Domain Name Resolution ③、API Key and HTTPS ConfigurationSwitch to 【Content Management】, select ON to enable the API key. Switch to the 【HTTPS】 interface (skip this step if HTTPS is not needed). In the HTTPS configuration, select Manage. If you don't have an SSL certificate, click the button to apply for one; both TrustAsia and Let's Encrypt offer free options. Hotlink protection can be left off initially and enabled later when traffic increases (at that time, hotlink-protected images can serve as promotion).WordPress Upyun Plugin Setup Tutorial
Previous online tutorials for Upyun used the pluginHacklog Remote Attachment Upyuncreated by Wilderness Without Lights. However, this plugin has not been updated for a long time, and after upgrading to WordPress 5.3, image uploads often fail or result in empty files. Fortunately, another blogger has created a new Upyun plugin,WPUPYUN, so the following tutorial is divided into two parts: the old version and the new version.Old Version Plugin Tutorial
After completing the settings on the Upyun website, now return to WordPress. First, install the Upyun WordPress plugin, the pluginDownload here. Plugin won't install? After installation, find the Hacklog Upyun Remote Attachment option in the settings menu. The main thing to note is the filling in below.
Naiba uploaded the attachments from the uploads folder on the website to Upyun cloud storage himself. The directory structure on both sides is kept consistent for easy domain change in the future. You can use FTP to upload your files yourself.For Upyun FTP usage tutorial, refer to the official website's. After setting, save, the plugin top will have a test prompt, and success will be notified. If you have uploaded all images to Upyun cloud storage, you can click the button below to replace the database URLs.
After setup, posting articles will default to uploading images to Upyun, and Upyun will automatically enable CDN acceleration.New version Upyun plugin tutorial
First, click the button below to download (or search WPUPYUN in the backend to install) the new versionUpyun WordPress plugin。 New version pluginAfter downloading, install and activate the plugin. (WordPress Plugin Installation Tutorial_Complete Guide to Popular Essential Plugins) Enter the setup interface as shown in the image below.
- Service name: fill in the service name created earlier for cloud storage service.
- Acceleration domain: fill in your bound acceleration domain.
- Operator username and password: fill in the account information created in Upyun backend.
- Do not save locally: choose based on your actual situation, it is recommended to keep a local copy.
Common Issues After Accelerating WordPress with Upyun
Below are common issues collected from netizens after using Upyun to accelerate WordPress. If your question is not resolved, you can join group 774633089 for discussion.Images Not Displaying After Publishing Articles When Switched to Upyun
In some cases, you may find that after images are transferred to Upyun, they do not display on the website frontend but show in the backend. This issue is caused by WordPress responsive image code and can be resolved by disabling it. Method as follows:Disable WordPress's Default Feature of Generating Responsive ImagesPrevious Images Not Displaying After Installing the Upyun Plugin
After installing the Upyun plugin, you may find that all previously uploaded images on your website show 404 errors and do not display. This is because the plugin defaults to replacing your website's image links with Upyun accelerated domain URLs. You need to upload all your website's previous images to Upyun cloud storage.How to Switch from the Old Version Plugin to the New Version Plugin
If you previously used Hacklog Remote Attachment Upyun and added the /wp-content/uploads path in the settings interface as in this tutorial, then you need to perform the following operations.- Use FTP to move all files under the /wp-content/uploads folder in Upyun cloud storage space to the root directory of cloud storage.
- UseWordPress Batch Find and Replace Plugin and Code for Modifying Article Contentmethod inside, modify the image links in articles to the new ones.
Naiba Tip:① You can first contact customer service to see if they can directly move the directory in the backend for you, as FTP operation yourself is quite troublesome. ② If you do not delete (and move) the files under /wp-content/uploads, you also do not need to modify the image links in articles. Newly published articles will use the new path URLs, while old articles will still use the old path URLs, just occupying some extra cloud storage space. ③ If you want to replace, for the plugin, simply replacehttps://original-website/wp-content/uploads/withhttps://upyun-storage-custom-url/For database replacement, the command is as follows:
UPDATE wp_posts SET post_content = REPLACE( post_content, 'https://原来网址/wp-content/uploads/', 'https://又拍云存储自定义网址/' ) ;

Comments are closed
The comment function for this article is closed. If you have any questions, please feel free to contact us through other channels.