Focus on cloud service provider activities
Notes on website operation and maintenance

Six effective methods to solve the problem of slow WordPress

At present, WordPress has been upgraded to version 4.0. As users, we may not see much change, because as CMS users, we only need to use the theme we like to complete a website. In the current free and open source PHP CMS, WordPress is undoubtedly the CMS product with the largest number of users and the most common users. But the only problem that hasn't been solved is that the loading speed is always slow. How to solve it WordPress slows down Both at home and abroad, there are various solutions and secrets to the problem of.

Including Lao Zuo who wrote an article before“ 7 Ways and Techniques to Solve the Slow Opening of WordPress "In fact, foreigners are more persuasive about the extent of the use of WORDPRESS. I don't see several articles about the solution of WORDPRESS slowing down, so I integrate them into this article, hoping to learn something from myself and users.

 Solution to slow WORDPRESS

First, select a host with good speed

An excellent, stable and fast virtual host and VPS is one of the key factors affecting the opening speed of our WORDPRESS website. No matter which CMS we use to build our website, we need to choose a good host. Different merchants and data centers have different speeds. For example, we usually choose VPS to set up Chinese websites, and we mostly choose the computer rooms of overseas businesses that are physically close to us, such as Japan and Los Angeles. If it is an English website, even though the overseas gap is relatively small, the computer room should be selected according to different user groups. For example, if we have a computer room for European users, it is better to choose European computer room products.

Even though we need BEIAN for domestic hosts, considering the speed, stability and durability, if we are formal and want to stick to it for a long time, Lao Zuo still suggests choosing a domestic service provider.

Second, choose the appropriate theme

Many WordPress users, especially those who have just contacted the website, hope that their blog/website will also look beautiful when they see that WP has numerous beautiful themes (as every new webmaster does), and then they will choose various complex, even overseas, business themes. In fact, the more complex the theme is, the more information such as images, external calls, JS, etc., which will inevitably lead to the loading speed of the entire page.

Therefore, when choosing a theme, we should consider the loading speed of the theme. Our domestic network speed is different from that of foreign countries. Some externally loaded resources need to be localized, and the size of images needs to consider our bandwidth speed. You can't shut down your beautiful website before the user's visit is opened in order to look good.

Third, the use of control pictures and JS

It is recommended to select and use a reasonable compression size and size for both the pictures in the page decoration and the pictures in our article, which is conducive to loading pictures. When necessary, the image buffer lazyload.js plug-in should also be used (it is better to code directly without plug-in). For the invocation of styles and JS, the current popular method is to place CSS at the top of the page and JS at the bottom of the page, so that the loading speed is better.

Fourth, it is necessary to use CDN acceleration

Lao Zuo personally does not recommend using the so-called third-party CDN acceleration( Share 5 domestic free CDN service providers and use comments )Even though it has the acceleration function to a certain extent, it is said that in some areas, the acceleration is not as fast as the direct opening. However, if there are storage resources, such as image or document resources, you can use acceleration services alone, such as third-party CDN storage services such as Qiniu, to use resource occupied information for third-party accelerated storage.

Fifth, solve the problem of Google font loading

Whether it is the default WORDPRESS program theme or the downloaded third-party theme, Google fonts are also included. We need to install the Disable Google Fonts plug-in to solve the problem. If fonts are also loaded in the theme, we need to replace google apis with useso in the corresponding theme code. Of course, localization should also be considered for calls to other external resources.

VI. Regularly sort out the database and draft version

By default, WORDPRESS will automatically generate some version information, which takes up a large database cache. We can use the WP Cleaner plug-in to clean it regularly. At the same time, our MYSQL database also needs regular maintenance and optimization, which is generally sufficient once a week. The WP Optimize database optimization plug-in is also available. These plug-ins can be installed and started when we use them, and deleted when not in use.

In short, if we want Wordpress to be lightweight, we should be lightweight in the selection of topics, and try to reduce the number of pictures and small pictures in the content. It is better to use a third-party storage CDN acceleration resources, and the host/VPS speed we use is also better. Every detail should be improved. WORDPRESS is still a good choice for CMS.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Six effective methods to solve the problem of slow WordPress


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge