Raspberry Pi Web Server: What You'll NeedBecause 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)
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
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 PerformanceFor 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.
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 PerformanceDrupal 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.
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.
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 PerformanceWith 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.
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 PerformanceOverall, 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 AnalysisOverall, 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?