on Install WordPress in less than 5 minutes.

Installing WordPress is a pretty simple and straightforward process. These instructions assume that you already have a working LEMP stack.

First we'll download and extract the latest version of WordPress using the commands below:

mkdir -p /var/www/html/wp-site.me  
wget -q -O - http://wordpress.org/latest.tar.gz | tar -xzf - --strip 1 -C /var/www/html/wp-site.me  

Run the following commands to create a MariaDB database and user:

mysql -uroot -p<root_passwd> -e "CREATE DATABASE wpsite;"  
mysql -uroot -p<root_passwd> -e "GRANT ALL PRIVILEGES ON wpsite.* TO 'wpuser'@'localhost' IDENTIFIED BY 'wppasswd';"  

Next, create a new PHP-FPM pool under which the PHP processes will run, in our example the PHP runs under the alex user/group:

vim /etc/php5/fpm/pool.d/alex.conf  
[alex]
user = alex  
group = alex  
listen = /var/run/php5-fpm-alex.sock  
listen.owner = alex  
listen.group = www-data  
listen.mode = 0660  
pm = ondemand  
pm.max_children = 5  
pm.process_idle_timeout = 10s;  
pm.max_requests = 500  

We also need to create a new Nginx server block:

vim /etc/nginx/sites-available/wp-site.me  
server {  
    listen 80;
    server_name www.wp-site.me;
    rewrite ^(.*) http://wp-site.me$1 permanent;
}

server {  
  listen 80;
  server_name wp-site.me;

  root /var/www/html/wp-site.me;
  index index.php;

  access_log /var/log/nginx/wp-site.me-access.log;
  error_log /var/log/nginx/wp-site.me-error.log;

  location / {
    try_files $uri $uri/ /index.php?$args;
  }

  location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm-alex.sock
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
    fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;
  }
}

Enable the newly created server block by creating a symlink to the sites-enabled directory and restart the Nginx service for changes to take effect:

ln -s /etc/nginx/sites-available/wp-site.me /etc/nginx/sites-enabled/wp-site.me  
service nginx restart  

Finally change permissions of the wp-site.me directory to the user who runs the PHP scripts:

chown -R alex: /var/www/html/wp-site.me  

That's all! Now, open your browser and navigate to your website http://wp-site.me to run the installation script.