My WordPress Blog Acceleration Plan

Publish: 2014-10-25 | Modify: 2014-12-09

From the beginning, I used Hong Kong virtual hosting, and then gradually started to explore VPS. Although I haven't used many hosting providers, I have experienced both free and paid ones. Recently, I moved my blog to DigitalOcean, which was quite a journey. DigitalOcean is a US-based cloud hosting provider, and its speed may be slightly slower than domestic providers. However, with some optimization, it is not much slower than domestic hosting providers. Here, I will share some optimization strategies based on what I have learned.

1. Find a stable DNS service provider

Usually, domain registrars provide free DNS resolution services. If you choose a smaller registrar or a foreign registrar, I personally do not recommend using their DNS resolution services directly. Smaller service providers may be unstable, and foreign service providers may be blocked. This is a very unfortunate situation, so you need to find a stable DNS service provider.

In China, there are many free DNS services available, such as DNSPOD, Aliyun DNS, Baidu Cloud Acceleration, etc. These are quite reliable as they are all large companies. However, when I used DNSPOD, I encountered DNS errors reported by Google Webmaster Tools. You can try using DNSPOD International Edition.

2. Host static resources

When the server is located overseas, the speed may be slower. If you also load many website files together, it will be even slower. However, you can store images, CSS, JS, and other static files on third-party platforms to achieve acceleration. WordPress users often use services like Qiniu Cloud Storage (10GB free), Upyun (which recently launched a free campaign), or Sina Weibo Image Host. These are all good options. I have been using Qiniu Cloud Storage for my blog.

3. Use third-party front-end libraries

The advantage of using third-party front-end libraries is that they have multiple CDN nodes, ensuring the fastest loading speed. In addition, when you visit a website that uses the same front-end library, the browser does not need to load it again, saving a lot of time. Chinese front-end libraries include Baidu, Sina, 360, Upyun, and Qiniu.

4. Enable caching

WordPress officially recommends a very good caching plugin called WP Super Cache. According to my tests, using this plugin can reduce response time by several hundred milliseconds and significantly improve Baidu Webmaster's speed score. However, it may be slightly difficult for beginners to use and may encounter some strange problems. I recommend using it for websites with a large number of articles or for those hosted on foreign servers.

5. Load JS at the bottom

It is a well-known principle for developers that CSS should be loaded first, and JS should be loaded last. Many websites use share buttons, and the common practice is to directly copy and paste the code. I suggest placing the code that calls the share buttons' JS at the bottom of the body.

6. Accelerate webmaster statistics

I have been using CNZZ webmaster statistics tool, but I haven't found a good acceleration solution. During each test, I found that it did take some time. Recently, I switched to Baidu asynchronous statistics for webmaster statistics, which has also made a small improvement.

These are some strategies I have summarized based on my limited knowledge. They may not be the best, but they do have a certain effect on acceleration. If you have better methods, don't forget to share!


Comments