How To Install WordPress On A Raspberry Pi

Ever wanted a blog? No? Yes you do, ’cause I say you do. You want a blog, and you want it small. You want it on a Raspberry Pi. Are we clear? Good. Well, I’m glad you agree because that just so happens to be what my tutorial is about this week! I walk you through the steps of setting up Nginx, PHP, MariaDB and WordPress so that you can host your own blog using a teeny tiny Raspberry Pi!

Important Links

How To Install WordPress On A Raspberry Pi

Step 1

Setup The Pi

To get wordpress running on a Raspberry Pi, we obviously need a Raspberry Pi to install it on. If you aren’t familiar with them, Raspberry Pi’s are cheap ($35) linux computers. Assuming that you have a keyboard, mouse and HDMI monitor plugged into the Pi, we need to load the operating system onto it.

  1. Download the latest version of Raspbian
  2. Insert a MicroSD card into your computer and use Etcher to copy Raspbian to the SD card.
  3. When it’s done copying, remove the MicroSD card from your computer and insert it into the Raspberry Pi
  4. Power on the Raspberry Pi and run through the automated setup steps.
  5. Give the Pi a static IP address.

Step 2

Installing Nginx

Before we can install WordPress, we need to install a few pre-requisites. The first and foremost is a webserver. There are several free webserver applications available, but I’m going to use Nginx because it works well with the Pi’s limited resources. So open up a command line and run these commands.

sudo apt-get update
sudo apt-get install nginx
sudo service nginx start
sudo service nginx status
systemctl status nginx.service

To exit out of the last command, just hit CTRL+C. Now you can open up a web browser on the Pi and type “localhost” into the address bar. When you hit enter, you should see the Nginx splash page.