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
5 months 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
5 months ago

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

Jean Claude
Reply to  Remba
5 months 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