• Hey guys,

    All my wordpress sites have a very poor performance using Nginx. It takes almost one minute to load a page. Guess this has to be related with Nginx configuration via WHM/cpanel.
    I got 8GB Ram with 6 processors under the hood.

    What are the best config settings?

    Thanks in advance!

    WordPress version: 4.1
    Plugin Nginx:
    Nginx Admin (v5.0 Stable)
    (Nginx Version: (1.6.2 )

    CENTOS 6.6 x86_64 virtuozzo – host
    WHM 11.46.2

    user  nobody;
    # no need for more workers in the proxy mode
    worker_processes  auto;
    error_log  /var/log/nginx/error.log warn;
    worker_rlimit_nofile 20480;
    events {
     worker_connections 5120; # increase for busier servers
     use epoll; # you should use epoll here for Linux kernels 2.6.x
    }
    http {
     server_name_in_redirect off;
     server_names_hash_max_size 10240;
     server_names_hash_bucket_size 1024;
     include    mime.types;
     default_type  application/octet-stream;
     server_tokens off;
    # remove/commentout disable_symlinks if_not_owner;if you get Permission denied error
    # disable_symlinks if_not_owner;
     sendfile on;
     tcp_nopush on;
     tcp_nodelay on;
     keepalive_timeout  5;
     gzip on;
     gzip_vary on;
     gzip_disable "MSIE [1-6]\.";
     gzip_proxied any;
     gzip_http_version 1.0;
     gzip_min_length  1000;
     gzip_comp_level  6;
     gzip_buffers  16 8k;
    # You can remove image/png image/x-icon image/gif image/jpeg if you have slow CPU
     gzip_types    text/plain text/xml text/css application/x-javascript application/xml application/javascript application/xml+rss text/javascript application/atom+xml;
     ignore_invalid_headers on;
     client_header_timeout  3m;
     client_body_timeout 3m;
     send_timeout     3m;
     reset_timedout_connection on;
     connection_pool_size  256;
     client_header_buffer_size 256k;
     large_client_header_buffers 4 256k;
     client_max_body_size 200M;
     client_body_buffer_size 128k;
     request_pool_size  32k;
     output_buffers   4 32k;
     postpone_output  1460;
     proxy_temp_path  /tmp/nginx_proxy/;
     proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=microcache:15m inactive=24h max_size=500m;
     client_body_in_file_only on;
     log_format bytes_log "$msec $bytes_sent .";
     log_format custom_microcache '$remote_addr - $remote_user [$time_local] '
            '"$request" $status $body_bytes_sent '
            '"$http_referer" "$http_user_agent" nocache:$no_cache';
    include "/etc/nginx/vhosts/*";
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • It is not about ur server. my 512mb ram working perfectly with my music streaming site with double wordpress and some really powerful plugins. I think it is about nginx or some plugins or theme messed up. I have had some horrible experience (no offense) and found there are too much things to do manually to make wp 100% working in nginx. It messed with permalink, CHMOD, directories and bla bla.. my 3 days was nightmare. Then I installed Apache again. But if u are a pro then nginx is best. If ur site takes 1 minuet (!) with a normal internet connection then I afraid cache and other optimization plugins wont help. A wp sites load time is 2-10 second avarage.
    Some suggestion (not professional):
    *disable gzip.
    *increase process numer.
    *Double check internet connection, plugins,theme.
    *be careful about Js from 3rd party site.

    Thread Starter Kookidooki

    (@kookidooki)

    Thanks Sykat for your help.

    The weird thing is that all these wordpress sites worked fine and fast on my former provider with Nginx also installed. And I made no changes to my plugins…So theme- and plugins issues can be ruled out. The problems occured after I migrated to my new provider. I guess there are config problems with Nginx or my current server.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress sites poor performance on Nginx’ is closed to new replies.