未優化前,只有慘可以形容

行動版

參考這篇:【WordPress】邁向95分 Google

使用了
1、Autoptimize


這裡Remove Google Fonts、emojs及安裝ShortPixel外掛,並設定為Lossy

2、Cache Enabler

3、再啟用gizp壓縮
#vim /etc/nginx/conf.d/wordpress.conf
加入
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;

#systmectl reload nginx

4、裝外掛WP LCache 
再參考這篇:WP-Lcache 更好的 WP 对象缓存解决方案
修改wp-config.php

#vim /var/www/wordpress/wp-content/object-cache.php 
加入
<?php
$lcache_path = dirname( realpath( FILE ) ) . '/plugins/wp-lcache/object-cache.php';
require_once( $lcache_path );

再修改wp-config.php
#vim /var/www/wordpress/wp-config.php
加入
define('WP_CACHE', true);

試幾次後,發現先前有設定memcached反而會降低分數,關閉後分數較好看。但雖電腦版拿到100了,實際沒特別感覺…

手機版
電腦版