第一步
- 網站必須啟用https
- 將以下代碼放入主題的functions.php文件中
- 指令:必須添加在child theme !!
/**
* Enables the HTTP Strict Transport Security (HSTS) header in WordPress.
*/
function tg_enable_strict_transport_security_hsts_header_wordpress() {
header( ‘Strict-Transport-Security: max-age=10886400’ );
}
add_action( ‘send_headers’, ‘tg_enable_strict_transport_security_hsts_header_wordpress’ );
第三步
- 安裝Sucuri Security PLUGIN [搜”Sucuri Security”]

- 左邊MENU> SECURI SECURITY> SETTING> Import & Export Settings
加入以下SCRIPT
第四步
- 安裝perfmatters PLUGIN [https://perfmatters.io]
- 跟以下setting

第五步 (非必要)
WP Hide & Security Enhancer
WP Hide >> General ?HTML / meta
