WordPress on Raspberry Pi: A Self-Hosted Portfolio Setup
Introduction
This project transforms a Raspberry Pi 4 (8GB) into a reliable, self-hosted WordPress server using Ubuntu Server 24.04 LTS. Itโs optimized for personal portfolios and blog hosting with low energy consumption and full SSL security.
Project Overview
Component | Details |
---|---|
Hardware | Raspberry Pi 4 (8GB), 128GB microSD |
OS | Ubuntu Server 24.04.2 LTS |
Web Stack | Apache, MariaDB, PHP (LAMP) |
CMS | WordPress (clean base + plugins) |
Security | SSL (Let’s Encrypt) |
Domain | Custom domain with HTTPS |
Hosting Purpose | Personal Portfolio & Blog |
Project Files & Structure
wordpress-raspberrypi-setup/
โโโ docs/
โ โโโ setup-guide.md # Full installation instructions
โโโ config/
โ โโโ wp-config-sample.php
โ โโโ apache-vhost.conf
โ โโโ backup-script.sh
โโโ wordpress-clean-setup.tar.gz # Base WordPress files (no media)
โโโ README.md
โโโ docs/
โ โโโ setup-guide.md # Full installation instructions
โโโ config/
โ โโโ wp-config-sample.php
โ โโโ apache-vhost.conf
โ โโโ backup-script.sh
โโโ wordpress-clean-setup.tar.gz # Base WordPress files (no media)
โโโ README.md
Key Features
- LAMP Stack deployment
- WordPress installation + plugin setup
- SSL encryption via Certbot
- Backup automation with shell script
- Clean WordPress base (no uploads included)
- DNS & domain integration
Energy Efficiency: Running Cost Estimation
Raspberry Pi Model | Avg Power | Monthly kWh | Monthly Cost (๐ฉ๐ช โฌ0.35/kWh) | Yearly Cost |
---|---|---|---|---|
Pi 4 (8GB) | ~3.5W | ~2.52 kWh | ~โฌ0.88 | ~โฌ10.73 |
Pi 5 (16GB) | ~6.0W | ~4.32 kWh | ~โฌ1.51 | ~โฌ18.40 |
Ideal for long-term 24/7 hosting with minimal environmental footprint.
Setup Guide (Simplified)
- Flash Ubuntu Server 24.04 to SD card
- Configure SSH & static IP
- Install Apache, PHP, MariaDB
- Upload WordPress files
- Set permissions & wp-config.php
- Set up domain & SSL with Certbot
- Test and go liveย
๐ Full guide available in setup-guide.md on GitHub
Lessons Learned & Future Improvements
- Learned the full Linux LAMP stack process
- Hands-on SSL certificate management
- Performance tuning with limited resources
- Next: Docker-based WordPress + external database
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.