How to Make a Raspberry Pi Web Server With WordPress, Drupal, Apache, NGINX, and Python

The Raspberry Pi is a nifty single-board computer. Since it boasts a small footprint and low power draw, the Raspberry Pi makes for an excellent lightweight server. Using software such as Plex and Emby, you can create a media server for a do-it-yourself (DIY) Netflix or Spotify. But for a web server, you can install WordPress, Drupal, and more on the Raspberry Pi. Learn how to make a Raspberry Pi web server using WordPress, Drupal, Apache, and Python!

Raspberry Pi Web Server: What You'll Need

Because software to create a web server on a Raspberry Pi is free, the cost of a Raspberry Pi server is pretty low. You'll need a Raspberry Pi board, Linux distribution (distro), server software, microSD card, peripherals like a keyboard and mouse, plus a case. 

What you'll need for Raspberry Pi WordPress hosting:
  • Raspberry Pi board (Raspberry Pi 3 or Raspberry Pi 3 B+ recommended)
  • Case (optional, recommended)
  • Linux operating system (OS)
  • microSD card
  • Peripherals (Keyboard and mouse)
  • Internet connection
  • 5V 2.5A power supply (PSU)
Total cost: $35+ USD 

I suggest opting for a Raspberry Pi 3 or Raspberry Pi 3 B+. You'll benefit from additional computing power over the Raspberry Pi Zero and Zero W. A case is optional but recommended, and you'll need an appropriate 5V PSU.
Raspberry Pi WordPress Installation

Installing WordPress on the Raspberry Pi

Running WordPress on the Raspberry Pi is pretty simple. You'll need to start with a Pi running a Linux distro like Raspbian or Ubuntu. Raspberry Pi WordPress hosting requires installing Apache, MySQL, PHP, and WordPress. It's easy to load on a Raspberry Pi, and works well on a Pi 3 or  Pi 3 B+.

Raspberry Pi WordPress Performance

For Raspberry Pi WordPress server performance, I found an average response time of 5 seconds. However, keep in mind that this was a barebones installation for testing, not a full-fledged website. As the number of concurrent users increases, and you add plugins, performance will take a hit. The Raspberry Pi works fairly well as a lightweight WordPress server, but performance won't be suitable for a heavily customized WordPress site or one with moderate to heavy web traffic. 

Raspberry Pi Drupal Installation

You can easily install Drupal on the Raspberry Pi using Drupal Pi. The Drupal Pi GitHub page reveals that it's related to the Raspberry Pi Dramble project, a software solution for creating a Raspberry Pi web server cluster. Drupal Pi is intended for a standalone Pi-based Drupal install. Drupal Pi requires Ansible, while the vanilla installation merely features Drupal. 

Raspberry Pi Drupal Web Server Performance

Drupal touts enterprise-level security. The installation process was a little easier with WordPress than Drupal, but that's probably because I've installed WordPress more times than Drupal. In terms of performance, I pulled in about 150 requests per second. Though I used Drupal 7, benchmarks seem to indicate that Drupal 8 takes a performance hit. 

Raspberry Pi Python Web Server Installation

Python is a programming language used in creating web apps and desktop apps. Using Python microframework Flask, you may create a Raspberry Pi Python web server. It's pretty basic and uses CSS along with HTML. Though it's initially easier than a WordPress or Drupal installation on a Raspberry Pi, a Python web server remains heavily customizable.

Raspberry Pi Apache Server Installation

Apache ranks among the most utilized web server programs available, with use among 37% of the top million websites, and 43% usage overall. You can make an Apache server with a Raspberry Pi. After installing Apache, you'll also install PHP to add dynamic content. 

Raspberry Pi Apache Web Server Performance

With fewer concurrent users, I found Apache moderately fast, but with higher users performance took a dip. With one user, I clocked about 6.1 seconds. As more "users" were added to my benchmarking, performance dipped and became slower.

How to Make a Raspberry Pi NGINX Server

The free, open-source, high-performance HTTP server and reverse proxy NGINX is a fantastic choice as a Raspberry Pi web server. It's also packing IMAP and POP3 functionality. NGINX boasts low resource consumption and worked well on my single Pi board set up.

Raspberry Pi NGINX Web Server Performance

Overall, NGINX ran like a champ. At one concurrent user, response time was around 6.5 seconds with a test script, but as concurrent users were scaled, this remained pretty stable and actually scored better than Apache's benchmarks at higher numbers of concurrent users.  

How to Create a Raspberry Pi Web Server With WordPress, Drupal, NGINX, Apache, and Python: Final Thoughts and Performance Analysis 

Overall, creating a Raspberry web server is pretty simple. While WordPress provided faster response time generally, and easy installation, a Raspberry Pi 3 B+ won't compare to even a slightly aging desktop CPU. Additionally, I tested with a Raspberry Pi WordPress installation sans plugins. As you load plugins, you'll find slightly slower response time. Similarly, my Raspberry Pi web servers were all single board installs. If you're using a cluster, you'll have a different experience and benefit from more computing power albeit at the cost of added complexity.

Ultimately, I suggest WordPress as a web server for the Raspberry Pi. Raspberry Pi WordPress server performance was solid, and installation is a breeze. Combined with the fact that it's well supported with tons of community resources. Drupal is an excellent option as well which provides tons of security. I also appreciated the benchmarks from NGINX which prove that it runs well on a low-power board like the Pi.

Your turn: What web server software are you running on the Raspberry Pi?

Moe Long

Moe Long is an editor, writer, and tech buff with a particular appreciation for Linux, Raspberry Pis, and retro gaming. When he's not hammering away at his keyboard, he enjoys running, reading, watching cinema, and listening to vinyl. You can read his writings on film and pop culture at CupOfMoe.com and check out his thoughts on movies on the Celluloid Fiends podcast.


Leave your feedback...

Latest Articles