Hello everyone, I「m Brother Leifeng. Recently, Brother Leifeng」s blog was built on a low-quality host with very high latency. Due to the lack of ICP filing, I couldn「t use domestic CDN services. I tried the free CDN from 」cloudflare「, but the results weren」t very satisfactory either. Later, I discovered that jsDelivr + Github is actually the best free CDN solution.
jsDelivr Introduction
jsDelivr is a free CDN service that provides acceleration for thousands of Javascript, CSS, and over 1650 other libraries. It offers free CDN acceleration for Github, WordPress, and NPM. Moreover, it has CDN nodes within China, making the speed very fast.jsDelivr Official:https://www.jsdelivr.com/
Github Introduction
Github is currently the best free open-source project hosting site, with numerous open-source projects hosted on it. Currently, Github has been acquired by Microsoft.Github Official:https://github.com/
Using jsDelivr + Github to Speed Up WordPress for Free
1. Register a Github account. 2. Create a new Github repository. Repository name: Enter the repository name, then click 「Create repository」 to start the creation.3. Click 「Upload files」 to upload the files you want to serve via CDN, such as CSS, JS, images, etc...4. Release the repository. Click 「release」 to publish, and enter a custom release version number.5. Use jsDelivr to reference resources. https://cdn.jsdelivr.net/gh/your username/your repository name@release version/file pathFor example: https://cdn.jsdelivr.net/gh/woshileifeng1/wordpresscdn@1.0/aplayer.min.js If you don't need versioning, you can also use: https://cdn.jsdelivr.net/gh/woshileifeng1/wordpresscdn/aplayer.min.js 6. Next, replace all the CDN URLs for CSS, JS, and other files within your Theme. 7. You can add to the header file of your Theme to prefetch DNS and speed up resolution.
Building a Free Image Hosting with GitHub+jsDelivr+PicGo
1. Create a new GitHub repository specifically for storing uploaded images. 2. Generate an Access token.3. Download PicGo software: https://github.com/Molunerfinn/picgo/releases 4. Fill in the information created on GitHub earlier, specify the path of the storage folder. When PicGo uploads files, it will automatically create this folder in the GitHub repository. Custom domain: https://cdn.jsdelivr.net/gh/username/image-hosting-repository-name5. You can start uploading images now. After uploading an image, the image link will automatically be copied to your clipboard.
Summary
Although setting up this free CDN is a bit troublesome, it is free after all and can also be used as an image hosting service to save your hosting traffic. Plus, jsDelivr and GitHub are both major companies, so it「s relatively reliable. Those who enjoy tinkering can put the entire site on GitHub and then use the CDN function in the plugin 」WP Super Cache「 to handle static resources. I won」t demonstrate it here; if you「re interested, you can tinker with it yourself. Finally, if you don」t want to go through this trouble, you can read this article #The Easiest Way to Determine if a Website Uses CDN Acceleration_Recommended Free CDN Services
🚀 Still feeling confused after reading the tutorial? Let me guide you step-by-step instead.
「Naibabiji WordPress Website Building Coaching」 — From selecting a domain and purchasing hosting to installing themes and publishing posts, I「ll guide you through every step, helping you avoid detours and reach your goals directly.
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.