WordPress with nginx

See https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress/

    location = /favicon.ico {
        log_not_found off;
        access_log off;

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;

    location / {
        # This is cool because no php is touched for static content.
        # include the "?$args" part so non-default permalinks doesn't break when using query string
        try_files $uri $uri/ /index.php?$args;
    location ~ \.php$ {
        #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
        include fastcgi_params;
        fastcgi_intercept_errors on;
        fastcgi_pass unix:/var/php-nginx/162475923957101.sock/socket;
        #The following parameter can be also included in fastcgi_params file
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;

    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
        expires max;
        log_not_found off;

Setup blog with WordPress self-hosted


  • A domain from matbao or namecheap
    • for Vietnamese domain, matbao has a simple user interface and very good support for registering and payment
    • namecheap protects domain information (whois) without any fee – it’s free
  • a wordpress packages, bluehost is a good option. If you want to have more controll on your own host, try a VPS on aws lightsail, linode, vultr, digital ocean (standard price) or heiztner contabo (cheap price)


  • Simple text content with 2011, 2017
  • Advance features theme from wordpress market, or Envanto’s – Themeforest

Recommended plugins:

  • Security: Sucuri – monitor the website, notify if there is any changes made
  • Security: Prevent Concurrent Logins
  • Security: Limit Max IPs Per User
  • Security: reCaptcha by BestWebSoft: add Google’s capcha to login/ comment
  • Site Kit by Google – Add sites to Google’s search console and analytics