WordPress Elementor Multisite 環境で Nginx を最適化
環境
- debian
- CPU 8コア
- RAM 約10GB
- PHP-FPM 8.4
- Nginx
- WordPress + Elementor
- Multisite
nginx.conf
nginxの設定ファイルは、inclde されていて、分割で設定されていることがあります。
一度に、設定ファイル全体を見るには、T オプションを使います。
nginx -T | less
設定ファイル
/etc/nginx/nginx.conf
nginx.conf の最初
user www-data;
worker_processes auto;
worker_rlimit_nofile 200000;
events {
worker_connections 4096;
multi_accept on;
use epoll;
}
nginx.conf http セクション
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30;
keepalive_requests 1000;
types_hash_max_size 4096;
}
WordPress + Elementor向けバッファ設定
client_body_buffer_size 256k;
client_max_body_size 128m;
client_header_buffer_size 16k;
large_client_header_buffers 4 32k;
fastcgi最適化(WordPress重要)
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
nginx 再起動
sudo nginx -t
sudo systemctl restart nginx


