WordPress Nginx Auto Installer Script


This WordPress blog was created using Centmin Mod’s WordPress auto installer script (wpcli_wordpress.sh) which utilises WP-CLI command line tool to automate the installation of WordPress core script along with WordPress Super Cache and a bundle of other essential WordPress Plugins for security, performance and better usability. The blog is using PHP 7.0.0-dev for testing as well given that PHP 7 performance has pretty much caught up to HHVM.

The WordPress auto installer script, wpcli_wordpress.sh is a shell based script which takes less than <2 minutes to automatically install WordPress and an additional 18+ WordPress Plugins – including setting up and configuring WordPress Super Cache for Centmin Mod’s Nginx web server.

This blog is setup on a 2GB KVM based DigitalOcean VPS server (San Francisco) using Centmin Mod LEMP web stack with the dual purpose of testing wpcli_wordpress.sh and also testing Centmin Mod’s PHP 7.0.0-dev (PHP NG) and CentOS 7.0 OS support. For more information, check out the How to install Centmin Mod LEMP web stack on DigitalOcean Droplet Guide.

The Centmin Mod LEMP web stack consists of the following:

CentOS 7.0

cat /etc/redhat-release 
CentOS Linux release 7.0.1406 (Core)

Centmin Mod’s Nginx 1.7.7 compiled options

nginx -V
nginx version: nginx/1.7.7
built by gcc 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) 
TLS SNI support enabled
configure arguments: --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_sub_module --with-http_addition_module --with-http_image_filter_module --with-http_secure_link_module --with-http_flv_module --with-http_realip_module --with-openssl-opt=enable-tlsext --add-module=../ngx-fancyindex-ngx-fancyindex --add-module=../ngx_cache_purge-2.1 --add-module=../headers-more-nginx-module-0.25 --add-module=../nginx-accesskey-2.0.3 --add-module=../nginx-http-concat-master --with-http_dav_module --add-module=../nginx-dav-ext-module-0.0.3 --add-module=../openresty-memc-nginx-module-1518da4 --add-module=../openresty-srcache-nginx-module-ffa9ab7 --add-module=../nginx-sticky-module-1.2.5 --add-module=../nginx_upstream_check_module-0.1.9 --with-openssl=../openssl-1.0.1j --with-libatomic --with-pcre=../pcre-8.36 --with-pcre-jit --with-http_spdy_module --add-module=../ngx_pagespeed-release-1.9.32.2-beta

Centmin Mod’s default PHP 7.0.0-dev PHP-FPM setup and loaded PHP extensions

php -v
PHP 7.0.0-dev (cli) (built: Nov 8 2014 13:29:28) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.8.0-dev, Copyright (c) 1998-2014 Zend Technologies
 with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies

PHP extensions

php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
enchant
ereg
exif
filter
ftp
gd
gettext
gmp
hash
iconv
imap
intl
json
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
pspell
readline
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache

PHP 7.0.0-dev (PHP NG) currently is in alpha state and doesn’t support the following default Centmin Mod installed PHP extensions:

  • igbinary
  • memcache
  • memcached
  • imagick
  • geoip (optional)

PHP 7.0.0-dev WordPress Info

PHP 7.0 (PHP NG) PHP Info

Centmin Mod .08 beta default Nginx index page

 

Very first benchmark using Blitz.io to stress test this WordPress blog’s index page with 1000 users over 60 seconds with California region. The 2GB KVM based DigitalOcean VPS server is located in San Francisco.

Blitz.io 1000 user stress test results

Blitz.io 1000 user stress test results

Blitz.io stress test this WordPress blog’s index page with 2000 users over 60 seconds with California region

Blitz.io 2000 users

Blitz.io 2000 users

Blitz.io stress test this WordPress blog’s index page with 4000 users over 60 seconds with California region. A few minor TCP errors ~419 of them or 0.4% which probably can be tuned away with some minor TCP tweaks 🙂

WordPress Super Cache in action + Centmin Mod LEMP web stack  = 151.9 million hits/day  with peak of 3,032 hits/second and an average of 1,758 hits/second !

Blitz.io 4000 users

Blitz.io 4000 users

Peak cpu and memory usage over the last 60 minutes which includes the 4,000 Blitz.io stress test.

NodeQuery cpu and memory stats

Apachebench benchmark launched from my Las Vegas based server to hit this blog on 2GB KVM based DigitalOcean VPS server in San Francisco. Apachebench with 500 user concurrency and 10,000 requests with keepalives enabled resulted in 3,851 requests per second with mean of 0.260 ms per request.

ab -k -c500 -n10000 http://wordpress7.centminmod.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking wordpress7.centminmod.com (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests


Server Software:        nginx
Server Hostname:        wordpress7.centminmod.com
Server Port:            80

Document Path:          /
Document Length:        10229 bytes

Concurrency Level:      500
Time taken for tests:   2.596 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    10000
Total transferred:      107320960 bytes
HTML transferred:       104395306 bytes
Requests per second:    3851.88 [#/sec] (mean)
Time per request:       129.807 [ms] (mean)
Time per request:       0.260 [ms] (mean, across all concurrent requests)
Transfer rate:          40369.87 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   4.6      0      25
Processing:    19  124 112.7     76    2039
Waiting:       19   42  31.3     36     784
Total:         30  125 113.3     76    2062

Percentage of the requests served within a certain time (ms)
  50%     76
  66%    109
  75%    114
  80%    141
  90%    268
  95%    389
  98%    464
  99%    515
 100%   2062 (longest request)

Network, CPU and Memory statistics for Apachebench test.



 

To further discuss wpcli_wordpress.sh auto installer script out out the Centmin Mod Community forums.

The following two tabs change content below.

George

Owner / Creator at CentminMod.com
Centminmod.com LEMP web stack creator - auto installs Nginx, PHP-FPM, MariaDB MySQL + CSF Firewall on CentOS

Latest posts by George (see all)