High Performance WordPress


Published on

Published in: Technology
  • @palpalani I have setup centminmod on a few vps servers and it seems to work fine. Your config file for nginx vhost might have to be modified a little bit so wordpress will work correctly but for the most part it works pretty good and on very low memory boxes for that matter. More advanced configs might require more editing of config files. I believe centminmod also sets up CSF for firewall so yea I would say it is pretty secure no ftp access though just use a program like winscp to get files to the server.
    Are you sure you want to  Yes  No
    Your message goes here
  • I want to host my site into VPS or Dedicated server and i am newbie to VPS & dedicated servers. I have very basic knowledge of Linux commands.

    I am looking for best free LAMP stack. I found couple of scripts, but i very much interested on http://centminmod.com (Menu based Nginx, PHP-FPM, MariaDB auto installer script for CentOS). Is this secured enough? Are there any known issues? This will help me to proceed further.
    Are you sure you want to  Yes  No
    Your message goes here
  • Does a WordPress site associate with a Google+ Page like Blogger does?
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

High Performance WordPress

  1. HIGH PERFORMANCE WordPress Iliya Polihronov WordCamp San Francisco 2012Saturday, August 4, 12
  2. Iliya Polihronov Systems Wrangler Automattic polihronov.wordpress.com slideshare.net/vnsavage @vnsavageSaturday, August 4, 12
  3. WordPress.com Numbers ‣ 115 million pageviews per day ‣ 2.6 billion requests per day ‣ over 200 plugins ‣ 500ms per pageSaturday, August 4, 12
  4. Notable UsersSaturday, August 4, 12
  5. Services Installation Nginx wiki.nginx.org/Install PHP-FPM Compile PHP with --enable-fpm For Debian Squeeze $ gpg --keyserver hkp://keys.gnupg.net --recv-keys E9C74FEEA2098A6E $ gpg --keyserver hkp://keys.gnupg.net --recv-keys ABF5BD827BD9BF62 $ gpg -a --export E9C74FEEA2098A6E | apt-key add - $ gpg -a --export ABF5BD827BD9BF62 | apt-key add - $ echo deb http://nginx.org/packages/debian/ squeeze nginx >> /etc/apt/sources.list $ echo deb http://packages.dotdeb.org squeeze-php54 all >> /etc/apt/sources.list $ apt-get update $ apt-get install nginx php5-cli php5-fpm php5-cgi php5-mysql php5-memcacheSaturday, August 4, 12
  6. Services Installation APC php.net/manual/en/apc.installation.php MySQL percona.com/doc/percona-server/5.5/installation.html Memcached memcached.org For Debian Squeeze $ gpg --keyserver hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A $ gpg -a --export CD2EFD2A | apt-key add - $ echo ‘deb http://repo.percona.com/apt squeeze main’ >> /etc/apt/sources.list $ apt-get update $ apt-get install php5-apc memcached percona-server-server-5.5 percona-server-client-5.5Saturday, August 4, 12
  7. Nginx Configuration /etc/nginx/nginx.conf worker_processes 8; worker_connections 2048; keepalive_timeout 30; gzip on; gzip_types text/css text/javascript application/x-javascript application/json text/xml; gzip_min_length 500; gzip_comp_level 5; location ~ .(css|js|jp(e)?g|gif|png|swf|ico)$ { expires 1y; } fastcgi_buffer_size 32k; fastcgi_buffers 256 4k; /etc/init.d/nginx ulimit -n 65536 Full configuration at polihronov.wordpress.comSaturday, August 4, 12
  8. PHP-FPM and APC /etc/php5/fpm/pool.d/www.conf pm = dynamic pm.max_children = 40 pm.start_servers = 5 pm.min_spare_servers = 5 pm.max_spare_servers = 10 listen.backlog = 512 /etc/php5/conf.d/20-apc.ini extension="apc.so" apc.enabled = 1 apc.shm_size = 32M /etc/php5/fpm/php.ini output_buffering = 4096Saturday, August 4, 12
  9. MySQL Configuration /etc/mysql/my.cnf key_buffer = 256M sort_buffer_size = 4M read_buffer_size = 4M innodb_buffer_pool_size = 256M innodb_log_buffer_size = 8M tmp_table_size = 32M max_heap_table_size = 32M table_cache = 128 thread_cache = 64 query_cache_type = 1 query_cache_limit = 1M query_cache_size = 32M InnoDB - for tables with lots of reads and writes mysqlreport - inspect important MySQL status valuesSaturday, August 4, 12
  10. Optimizing your WordPress Install ‣ Keep it up to date ‣ Avoid unnecessary plugins ‣ Avoid slow plugins http://wordpress.org/extend/plugins/p3-profilerSaturday, August 4, 12
  11. Caching Memcached Object Cache http://wordpress.org/extend/plugins/memcached/ WP Super Cache http://wordpress.org/extend/plugins/wp-super-cache/ ‣ Custom permalinks, like /%year/%monthnum%/%postname%/ ‣ Enable all the recommended settingsSaturday, August 4, 12
  12. Benchmarks Virtual machine on a laptop, using Apache Benchmark (ab): Without APC 11.07 REQUESTS/SEC With APC 48.39 REQUESTS/SEC With APC and Caching 16,140.70 REQUESTS/SECSaturday, August 4, 12
  13. At a Larger Scale INTERNET Load Balancers Web Servers Caching Servers Web Servers Memcached Master-Slave MySQLSaturday, August 4, 12
  14. Questions? HIGH PERFORMANCE WordPressSaturday, August 4, 12
  15. Iliya Polihronov Systems Wrangler Automattic polihronov.wordpress.com slideshare.net/vnsavage @vnsavageSaturday, August 4, 12