Wordpress 相關問題與技巧彙整

  • 參考網址
  • 找到哪個 plugin 使用到 intl_tel_default_setting
    cd /var/www/html//wordpress/wp-content/plugins
    grep -r intl_tel_default_setting *
    :
    plugins/international-telephone-input-for-contact-form-7/script.js:var intl_tel_default_setting={
    :
    international-telephone-input-for-contact-form-7/script.min.js:var intl_tel_default_setting={initialCountry:"auto",utilsScript:wpcf7_utils_url ...
    :
  • 修改 script.js 與 script.min.js 內出現的 freegeoip.net/json 改成 ipinfo.io/json
  1. 先到 https://www.maxmind.com/en/geolite2/signup 註冊帳號密碼 (用 E-Mail 當帳號)
  2. 登入後就可以看到左下方選單有 GeoIP2 / GeoLite2 → Download Files 看畫面
  3. 如果想要看到城市資訊就下載 GeoLite2-City 項目的 GZIP, 如果只需要看到國家資訊就下載 GeoLite2-Country 項目的 GZIP 看畫面
  4. 下載後使用 7-zip 將 GZIP 解開 看畫面
  5. 將 mmdb 的檔名更改為 maxmind.mmdb Exp. GeoLite2-City.mmdb → maxmind.mmdb
  6. 將 maxmind.mmdb 透過 sftp 上傳到 wordpress 的 wp-content/uploads/wp-slimstat/ 目錄內 看畫面
  7. 這樣 Slimstat 套件就可以看到 IP 的城市 看畫面
  1. 進入 Google Cloud Platform - https://console.cloud.google.com/
    1. 申請 Google 網址管理認證 : API 和服務 → 網域驗證 → 新增網域 看畫面 網域第一次新增需要進行網域所有權的認證
    2. 申請 Google reCAPTCHA 網站金鑰與密碼 - https://www.google.com/recaptcha/
  2. 進入 Wordpress 管理介面
    1. 聯絡表單 → 整合 看畫面
    2. 在 reCAPTCHA 上面點 設定整合模組
    3. 輸入上面申請的網站金鑰與密碼
  • tech/wordpress_tips.txt
  • 上一次變更: 2021/03/09 17:00
  • jonathan