WordPress knowledge sharing

The installation process of the Batchcache plug-in to speed up the server

Weieis blog wrote an article about opening memcached and opcache. The former is a content cache plug-in, and the latter is a php cache plug-in. I thought that server optimization would be enough. I saw an article on @ Zhang Ge blog these days that after opening memcached, another one could be started Batcache plug-in , which is used to put html static files into memory. After some testing, the plug-in was installed on the ECS, and the relevant operating steps are listed below.

Let's briefly describe the principles of memcached and opcache.

1. OPcache is used to improve the efficiency of PHP code execution and reduce the overhead of loading and parsing PHP scripts each time. For php7, OPcache is integrated by default, so it is enabled in php.ini( Lnmp Enable Opcache Script Cache to Improve PHP Performance )That's all right.

Tip: Therefore, it is recommended that the PHP version should start at or above PHP 7.0, unless the website program does not support it.

2. Memcached is used to cache database contents into memory, so it is recommended to use memcached to reduce the number of database accesses. For ECS (virtual machine cannot do this), you need to first install the memcached server on the server, then install the memcached client and php extension, and finally open it in WordPress.

Related articles:

Look at this with the pagoda panel

One click expansion installation of pagoda panel ionCube/fileinfo/memcached/redis/Opcache

Look at this with lnmp

The process record and memory cache acceleration effect of installing memcached and object-cache.php in the lnmp1.4 environment

Check whether MemcacheD cache is enabled successfully and hit rate

Memcached only allows local access to port 11211 to solve unauthorized vulnerabilities

Multiple methods for real-time monitoring of Memcached hit rate

Memcached can not only cache dynamic query data, but also cache html content, that is, html static cache. This is equivalent to putting the foreground html content into memory, and the website will open faster. The batcache plug-in is required to cache the foreground page html into memcached.

1. Plug in download address: https://wordpress.org/plugins/batcache/

Download the plug-in to the local place and decompress it. Find the advanced cache.php file and upload it to the/wp content/folder of the website. Only upload this file.

Tip: Some bloggers on the Internet said they wanted to modify the parameters, but after Lao Wei modified them, the cache was not updated. If you also encounter the same problem, please do not modify it, and upload the official source file directly, and the web page will be normal.

2. Add the command to enable caching in wp-config.php:

define ( ‘WP_CACHE’ , true ) ;

Upload the modified wp-config.php to overwrite the source file.

In order to take care of novices, Weieis Blog places the screenshot of wp-config.php of memcached and batcache cache commands as follows:

So far, now you can test the opening speed of the foreground web page. Remember to clear the browser cache before each test. The most obvious change during the Weiaisi blog test is the waiting time for background clicking to edit files. After going to Batcache, the small circle on the title bar is reduced from three circles to one circle, and the opening time of the front page is also accelerated. Overall, the effect is pretty good.

The above content has passed the AliCloud server test. AliCloud server activity offers discounts when purchasing Click me to get it Alibaba Cloud 1000 yuan voucher is exclusive to this blog, and 100 products can be worth 50 yuan.

Wordpress optimization

How to optimize and improve the speed of WordPress is an eternal task. To make the website load faster, the key to optimization is to find a balance point, Click me to open The online course starts to learn, comprehensively analyze the reasons and provide a corresponding set of solutions.

Disadvantages: By default, the Batchcache plug-in only caches tourists, because it is afraid of affecting the foreground login status, that is, if you are a logged in user, you cannot see the changes in the foreground in time. Therefore, caching and dynamic judgment have always been contradictory. How to choose between them depends on personal choices. Because the content of the BATCache plug-in on the network is really not much, there are inevitably omissions and shortcomings in the article. I hope my friends can correct them.

Like( one )
Article name: Installation Process of Server Acceleration by Batchcache Plug in
Article link: https://www.vpsss.net/6995.html
Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself.
The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.