Pi
Portfolio Project ยท Self-Hosted Infrastructure
WordPress on
Raspberry Pi
A Raspberry Pi 4 running a full LAMP stack, self-hosted WordPress portfolio with SSL, automated backups, and 24/7 uptime for under โฌ11/year.
๐ฏ
The Goal
Build a fully self-hosted WordPress portfolio server on a Raspberry Pi 4, no shared hosting, no cloud dependency. Full control over the stack, the data, and the infrastructure.
๐ง
What I Built
A production LAMP stack on Ubuntu Server 24.04, complete with SSL via Let's Encrypt, MariaDB database, Apache virtual host configuration, and automated backup scripts.
๐ก
Why It Matters
This site munyakazi.org runs entirely on this Raspberry Pi. Every project you read here is served from a device consuming less power than a light bulb, running 24/7 from my home in Berlin.
Project Specifications
Tech Stack & Hardware
Every component chosen for reliability, low power consumption, and real-world performance.
Hardware
Raspberry Pi 4 (8GB)
128GB microSD card ยท ARM Cortex-A72 ยท ~3.5W average power draw
Operating System
Ubuntu Server 24.04 LTS
Headless server configuration ยท SSH access ยท Static IP assigned
Web Server
Apache2
Virtual host configuration ยท .htaccess rules ยท mod_rewrite enabled
Database
MariaDB
Lightweight MySQL-compatible database ยท Optimised for low-RAM environments
Language
PHP
Current stable release ยท Tuned php.ini settings for Raspberry Pi memory limits
SSL & Domain
Let's Encrypt + Certbot
Auto-renewing TLS certificate ยท Custom domain ยท HTTPS enforced site-wide
Implementation
Setup Process
Seven steps from blank SD card to live WordPress site with HTTPS.
1
Flash Ubuntu Server to SD Card
Used Raspberry Pi Imager to write Ubuntu Server 24.04 LTS to a 128GB microSD. Configured headless SSH access before first boot.
2
Configure SSH & Static IP
Connected via SSH, assigned a static local IP, updated all packages, and configured hostname and timezone for the Berlin environment.
3
Install Apache, PHP & MariaDB
Full LAMP stack installation via apt. Tuned PHP memory limits and MariaDB buffer settings to run efficiently within the Pi's 8GB RAM.
4
Upload & Configure WordPress
Downloaded latest WordPress, configured wp-config.php with database credentials, set correct file permissions (755/644) and Apache virtual host.
5
Domain & Port Forwarding
Configured DNS A record pointing to home IP, set up router port forwarding (80/443), and enabled dynamic DNS to handle IP changes automatically.
6
SSL Certificate with Certbot
Installed Certbot and obtained a Let's Encrypt certificate. Configured auto-renewal via cron. All HTTP traffic redirected to HTTPS.
7
Backup Automation
Wrote a shell script to back up the WordPress database and files on a schedule. Script documented in the GitHub repository with full instructions.
Running Costs
Energy Efficiency Analysis
Calculated at the German average electricity rate of โฌ0.35/kWh for 24/7 operation.
What This Project Demonstrates
Skills & Competencies
๐ง
Linux Administration
Ubuntu Server, SSH, package management, file permissions, system tuning
๐
Web Server Config
Apache2 virtual hosts, .htaccess, mod_rewrite, HTTPโHTTPS redirect
๐
SSL & Security
Let's Encrypt TLS, Certbot auto-renewal, Wordfence, security hardening
๐๏ธ
Database Management
MariaDB setup, WordPress DB configuration, performance tuning for low RAM
๐ค
Shell Scripting
Backup automation scripts, cron jobs, scheduled maintenance tasks
๐
DNS & Networking
Domain configuration, A records, dynamic DNS, port forwarding (80/443)
๐ฐ
Cost Optimisation
Self-hosted vs cloud cost analysis, โฌ10.73/year vs โฌ60โโฌ180 shared hosting
๐ฆ
Version Control
GitHub repository with config files, backup scripts, and full documentation
Explore the Code
The full setup guide, Apache config, backup script, and wp-config sample are available on GitHub. Browse the repository or explore more projects.
I built this setup as both a personal learning journey and a way to gain full control over my online presence. Hosting my portfolio on a Raspberry Pi might sound ambitious, but itโs proven to be stable, cost-effective, and incredibly rewarding. If you’re curious about the process or thinking of trying something similar, feel free to drop a comment, happy to exchange ideas!
I enjoyed going through it while having my morning coffee ๐
Hey Remba! ๐
Thanks so much for checking out the project, I’m really glad to hear you enjoyed it (especially with your morning coffee, thatโs the best combo!). It means a lot to me. More cool setups and experiments are coming soon, so stay tuned!
Let me know if you have any feedback or ideas, always happy to exchange thoughts.