Current location - Health Preservation Learning Network - Slimming men and women - How to configure an optimized environment to speed up wordpress access?
How to configure an optimized environment to speed up wordpress access?
First of all, we should know that the accelerated optimization method applicable to other types of websites is also applicable to wordpress blogs;

Once again, we should know that the user's webpage loading time is divided into three parts: ① webpage execution time ② page and page element loading time ③ browser rendering webpage time,

For these three parts of time, wordpress acceleration methods can be divided into:

1, php code hierarchy acceleration

2.html code hierarchy acceleration

3. Server-level acceleration

4. Indirect wordpress acceleration method

1.php code hierarchy accelerates WordPress.

The so-called "php code hierarchy" refers to the optimization of php execution efficiency and the number of executed queries. There are the following points:

Control the number of plug-ins. ※

※ Use cache plug-ins.

Database query cache ※

Static page cache ※

Partial page cache ※

Optimize the theme. ※

※ Enable Gzip compression.

For webmasters who are not familiar with programs and codes, the most convenient way is to use WordPress plug-ins to optimize WordPress and speed up WordPress loading. Judging from the online browsing, Xiao Sheng shared several wordpress plug-ins widely recommended by experts.

1, parallelism

As the name implies, the role of plug-ins is parallel. This plug-in will allow attachment files of WordPress to be automatically parallelized in multiple host names (images or uploading arbitrary files use the media function of WordPress), so as to realize parallel loading of images or files and speed up page loading. To help with caching, resources will always be loaded with the same hostname.

2、WPFileCache

The plug-in "realizes the hierarchical persistent cache of Object, and WP_Object_Cache can be replaced by built-in WordPress." Unlike other caching plug-ins, this plug-in does not cache your entire page, it only caches the data specified in the plug-in API function. In other words, it will significantly reduce the load of the database, thus speeding up the page loading speed and improving the overall performance of the blog.

3. Fast cache

QuickCache caches all the contents of the blog in real time, including pages, articles and classified pages, which helps to read data quickly and speed up the loading of WordPress. You can go to the plugin settings page to make the necessary settings, and select the parts you think need to be cached to optimize your WordPress loading speed. By default, it is not cached for logged-in users and users who have recently left messages.

4、W3TotalCache

This plug-in ranks among the top three in WordPress cache plug-ins, which can cache all the contents of blogs, speed up WordPress loading and optimize server performance. Developers even guarantee that the performance of W3TotalCache will be improved by at least 10 times after comprehensive optimization. I believe it can save a lot of bandwidth for blogs.

5、WPMinify

WPMinify, a commonly used WordPress plug-in, has many articles introducing and recommending it on the Internet. The principle of this plug-in is to delete unnecessary characters in the source code to reduce the file size and speed up the loading speed of WordPress without changing the function. WPMinify will merge and compress JavaScript, CSS and HTML files of WordPress, greatly reducing the loading time of WordPress.

6、WPSmush.it

Is a widely recommended wordpress image compression plug-in. The loading of images is an important part of blog traffic. Uncompressed and optimized images will not only greatly consume blog traffic, but also affect the loading speed of WordPress. It is worth noting that its compression is "lossless compression", that is, the pictures it compresses will never be distorted, so the compression degree is slightly worse than that of the parallelized plug-in. You can upload local pictures, or you can enter links to pictures on the web page, which supports multi-picture processing. The latest version of WPSmush.it can complete lossless compression of the whole station picture. 6 f9 R( g: W8 K- B

7、WPSuperCache

WPSuperCache, developed by Donncha, the official developer of WordPress, is the most efficient and flexible WordPress static cache plug-in at present. It generates HTML files directly for the whole web page, so Apache doesn't need to parse PHP scripts. By using this plug-in, WordPress blogs can significantly speed up. For the setting of WPSuperCache, there are tutorials online, so you can install the settings according to the method.

8. Cache

If the WordPress blog is hosted on a low-profile virtual host, this plug-in is very suitable. HyperCache is like an optimization tool for PC, except that it optimizes blogs. Compared with W3TotalCache mentioned earlier, this plug-in is easy to configure and use. It can not only cache your website to speed up WordPress loading, but also automatically clean up your system to help reduce disk usage and save storage space.

9、CDNTools

The full name of CDN is ContentDeliveryNetwork, that is, content distribution network. The basic idea is to avoid bottlenecks and links that may affect the speed and stability of data transmission on the Internet as much as possible, so as to make content transmission faster and more stable. The purpose of this plug-in is to greatly speed up the loading time of blogs by loading data into the content distribution network (CDN). It allows you to load Javascript and media files to external server pages, which greatly improves the loading speed.

10, WP- optimization

WP-Optimize is a WordPress database optimization plug-in, which can delete article history, automatically save drafts, delete unapproved and spam comments, and optimize MySQL database. It can optimize database, speed up database query and save database space.

Install and enable the plug-in. The WP- Optimization Management Panel in the WP background has the following options:

Delete all post revisions.

Delete all automatic draft articles (delete all automatically saved draft articles)

Clear comments marked as spam (clear comments marked as spam)

Clear Unapproved Comments (Clear Unapproved Comments)

Optimize database tables (optimize database tables)

Select the operation you want to perform, and then click the "Process" button!

2.html code level accelerates WordPress.

Compared with accelerating WordPress at php code level, optimization at html level is more important. Because the current server configuration is good and php execution efficiency is high, unless you have too many WordPress plug-ins, the speed will generally not have much impact (basically, it can be executed within 1m). Html code determines the loading speed of WordPress, and the speed of browsing your blog is largely determined by this factor (in the same network environment), and users load web pages on it 80% of the time. If you want your WordPress to run quickly, it is necessary to optimize the html level. + H! X+ M2 p5 x( V

Reduce HTTP requests-Reduce the number of HTTP requests.

Compressing components with Gzip-compressing web pages with Gzip.

Put CSS at the top. Put Js at the bottom-put CSS at the beginning and JS at the end.

Avoid CSS expressions–don't use expressions in CSS.

Externalize CSS and js-don't write CSS and JS directly into the web page, but load them from the outside.

Reduce DNS lookups–reduce the number of DNS queries)

Shrinking Javascript and CSS-Removing Redundancy in JS and CSS

Avoid URL redirection–reduce redirection.

Use Cookie-free domain–Use a domain name that does not pass cookies.

Third, accelerate WordPress at the server level.

Some webmasters have their own independent servers or VP, which is aimed at VP or independent servers.

Use lightweight and high performance Nginx. ※

※PHP bytecode cache component apc

Set the expiration time for static elements of web pages (take Nginx as an example). ※

Add Etag. ※

Other load balancing methods ※

Four. Indirect wordpress acceleration method

That is, encourage and remind visiting users to give up IE and use high-performance browsers such as FireFox, Opera and Chrome to indirectly accelerate WordPres.