Installing WordPress on Raspberry Pi

Please share with your friends...
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

⇐ BackPageNext ⇒

nginx-logo-64x64 Nginx

Nginx (pronounced engine-x) is a free, open-source and high-performance web server known for its stability and low resource consumption. This makes it ideal for use on the Raspberry Pi platform.

  1. To install Nginx, use the following package install command:
    sudo apt-get install nginx -y
  2. Once installed, verify the status of the Nginx service, using the following command:
    systemctl status nginx

    The command will produce output similar to the following:

     nginx.service - A high performance web server and a reverse proxy server
       Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
       Active: active (running) since Sun 2016-04-25 12:00:15 UTC; 15s ago
     Main PID: 5737 (nginx)
       CGroup: /system.slice/nginx.service
               ├─5737 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
               ├─5738 nginx: worker process
               ├─5739 nginx: worker process
               ├─5740 nginx: worker process
               └─5741 nginx: worker process
  3. Use a web browser to view your Raspberry Pi’s IP address, and assuming all has gone well, you will see the default Welcome to nginx on Debian! web page:
    Welcome to nginx on Debian!

    Welcome to nginx on Debian!

Nginx is now installed and running on your Raspberry Pi.

⇐ BackPageNext ⇒

Please share with your friends...
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

4 comments

  1. Thanks for this tutorial, Chris. I was just wondering, do you have any tips for helping to “harden” the web server? I guess I’m a tiny bit paranoid and wish to deter would be intruders …

    1. Hi Ben,

      The Nginx configuration is already very lean and should be secure (barring code vulnerabilities – remember to keep Raspbian and WordPress updated!).

      However, you will get lots of bruit-force login attempts though the standard WordPress Log In page. I decided to use a Google Authenticator plugin to enable two-factor authentication.

      Kind Regards,
      Chris.

  2. Excellent tutorial!
    I’m getting blank page with index.php like but not when i remove “!–” to
    What would be the steps to add multi-site subdomain such as – http://www.example.com and wiki.example.com?

    1. Hi idris,

      Thanks for letting me know about the “!–” for the phpinfo() page – that was a bug in my tutoral!! I’ve fixed it up now 🙂

      If you have followed all the steps in the tutorial, you should be setup for multi-site subdomains. You just need to run the configuration.

      The most important steps of the tutorial for WordPress multi-site are:
      PHP step 5 – adding *.example.com to the server_name list; and
      WordPress step 17 – adding the WP_ALLOW_MULTISITE line to wp-config.php.

      This bit is from memory (I need to write a tutorial on this bit too). Log in to the WordPress Dashboard and go to Tools > Network Setup. You should have the option of creating a Subdomain or Subdirectory site install.

      http://codex.wordpress.org/Create_A_Network

      Also, for a Subdomain setup to work, WordPress expects that you have DNS wildcard subdomains setup with your DNS provider.

      Hope that gets you started! 🙂
      Chris

Leave a Reply