Today, I take down the CDN, just use the native VPS to provide all the static content of the WordPress blog.

I will use a lot of screenshots to present the settings I configured.

What is W3TC?

Someone may ask what is W3TC standing for. It is a short name for W3 Total Cache, a plugin to improve the blog performance.

The latest version is 2.1.1.

What I have on my WordPress site?

This WordPress blog is running on a VPS. It has NVME SSD storage.  2GB RAM.

PHP 7.4.3

Memcached v1.5.22

W3TC settings

Now I put the settings below.

General Settings

Enabled Page Cache: Method Memcached

Minify Enabled, Auto mode, Using YUI Compressor

Opcode Cache with Opcode: Zend Opcache

Database Cache Enabled. Memcached

Object Cache Enabled. Memcached.

 

And also, enabled Browser Cache.

UserUser Experience: Enabled Lazy Load Images, Disable Emoji, Disable wp-embed script.

Let me put some detailed settings of above. Just a few, not all. Some are too simple. Just use default is fine.

Minify

For JS, I use yuicompressor to minify the file. So I need Java and yuicompressor.

I run the command sudo apt install openjdk-8-jre to install the  java run time environment.

I downloaded Yui compressor from the official site LINK. Then decompress it and put the files under my own location.

Click test YUI Compressor to check the installation.

Minify engine settings: I select “defer” for both before head and after body. It helps to prevent the “jquery not found” problem.

Here is similar. I use HTTP/2. And I enbled HTTP/2 push function to make sure the css files can be served first.

Database Cache

Memcached: 127.0.0.1:11211

Click test to double-check it.

Object Cache is the same as the Database Cache settings.

 

That’s all I think important for the record. It also may help others who use WordPress.

I did two tests on different testing sites.

Web Page Test

vi

GTmetrix

vi

David Yin

David is a blogger, geek, and web developer — founder of FreeInOutBoard.com. If you like his post, you can say thank you here

Leave a Reply

Your email address will not be published. Required fields are marked *