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
ComponentDetails
HardwareRaspberry Pi 4 (8GB), 128GB microSD
OSUbuntu Server 24.04.2 LTS
Web StackApache, MariaDB, PHP (LAMP)
CMSWordPress (clean base + plugins)
SecuritySSL (Let’s Encrypt)
DomainCustom domain with HTTPS
Hosting PurposePersonal 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

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)
  1. Flash Ubuntu Server 24.04 to SD card
  2. Configure SSH & static IP
  3. Install Apache, PHP, MariaDB
  4. Upload WordPress files
  5. Set permissions & wp-config.php
  6. Set up domain & SSL with Certbot
  7. 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

5 2 votes
Article Rating
Subscribe
Notify of
guest

3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Jean Claude Munyakazi
1 month ago

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!

Remba
Remba
Reply to  Jean Claude Munyakazi
1 month ago

I enjoyed going through it while having my morning coffee ๐Ÿ™‚

Jean Claude
Reply to  Remba
1 month ago

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.

3
0
Would love your thoughts, please comment.x
()
x