Manage your Raspberry Pi website with the WordPress CMS

Lead Image © Dietmar Hoepfil,

Easy Web

If you want to build your own website, or create a simple blog, but you don't feel like grappling with HTML and CSS, try your luck with the WordPress CMS.

Most users don't have the time or the skills to develop complex websites from scratch and therefore hire web programmers to do the job. An alternative is a Content Management System (CMS). A CMS lets you post to your site without having to worry about the details of HTML. You can create, edit, and manage your website using a simple GUI interface that does not require advanced technical knowledge. Organizations that don't have a full time webmaster often use a CMS to allow a non-technical person to manage the site. Offices that do have technical support also use CMSs because they can save lots of time and eliminate many possibilities for random errors.

Of course, you do need a bit of know-how to install and configure a CMS for your Raspberry Pi system. In this article, I will take you through the steps to install the popular WordPress CMS. This solution will work well for a small internal website in your home or office. For performance and security reasons, your Raspberry Pi web server is not a good candidate to act as a web server on the open Internet.

WordPress [1] is a free and open source content management system (GPLv2 licensed) based on PHP and MySQL. WordPress supports plugins and offers lots of themes – some free and some available for purchase online. If you are familiar with HTML and CSS, you can also adjust themes yourself.


WordPress is a service that runs on top of the web server. You need to set up Apache and some other tools on your Raspberry Pi before you can add the WordPress CMS. WordPress falls into the category of tools that are part of the LAMP environment. LAMP stands for Linux, Apache, MySQL, and PHP (or sometimes another P language, like Python or Perl).

Apache performs the web service functions, WordPress acts as an interface for the user, the data resides in a MySQL database, and PHP scripts pass commands and data between the other components. The beauty of a CMS is that most of this interaction is invisible to the user, but you do have to set up Apache, MySQL, and PHP before you can use WordPress.

Setting Up Apache

To install the Apache web server, be sure your Raspberry Pi is connected to the Internet and type the following command:

sudo apt-get install apache2

As you can see in Figure 1, the package manager resolves all dependencies and offers to install additional software packages. Hit Y and Return to continue. After APT has downloaded, unpacked, installed, and configured the software, if all goes well, your new web server will start automatically.

Figure 1: To set up the Apache web server, simply install the apache2 package and confirm the package manager's selection and suggestions.

You can easily confirm that the web server is running. In a browser window, on the Raspberry Pi, visit the address http://localhost to see the default web page. Alternatively, if you are accessing the web page from another computer on the local network, use the IP address of the Raspberry Pi system http://<IP-address>. For example, you can use:

to visit the new site (Figure 2). See the box called "Finding the IP Address" for more information.

Figure 2: Open the default website either on the Pi or, as in this example, in a web browser on another computer on the network. The image shows the default page for Raspbian Jessie.

Finding the IP Address

To find the IP address of your Raspberry Pi system, open a terminal window on your Raspberry Pi and enter the /sbin/fconfig command (Figure 3). If you're using a standard Ethernet cable to connect your Raspberry Pi with the network, use the IP address for the eth0 interface, labeled inet addr in Figure 3.

Figure 3: Enter the ifconfig command on the Rasp Pi to discover its IP address.

Buy this article as PDF

Express-Checkout as PDF

Pages: 5

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content