📝 Part 1: Feasibility, Costs and Setup Overview – Planning Your WordPress Blog on Raspberry Pi 5
📝 Part 2: WordPress Installation Guide – Free Domain Setup with No-IP on Raspberry Pi 5
📝 Part 3: Final Deployment with Paid-Domain Migration and Backup Recovery on Raspberry Pi 5✍️ Editor’s Note: All technical steps were developed, tested, and verified by the author on a real Raspberry Pi 5 deployment. This blog post was drafted with assistance from AI to streamline the writing and formatting process so that the reader may seamlessly follow along and reproduce it.
📝 Part 2: WordPress Installation Guide – Free Domain Setup with No-IP on Raspberry Pi 5
👋 Introduction
In Part 2 of this project, I will guide you through how to install WordPress on a Raspberry Pi 5 using No-IP, a full-featured, self-hosted blog setup with no cloud services, no monthly fees, no domain charges and with full control. Previously in Part 1, I had covered the feasibility analysis and provided a brief overview of the tech-stack and plugins used.
Part 2 of this project walks you through the entire setup from scratch, including:
- Setting up Ubuntu and the WordPress LAMP stack,
- Dynamic DNS using No-IP (for a free public URL),
- SSL via Let’s Encrypt,
- And network configuration to access your website globally.
Later in Part 3, I’ll show you how I upgraded the staging address (your-staging.ddns.net
) to a real .com
domain and recovered from a full WordPress stack misconfiguration, which is good to know if you’re managing your own deployment.
🧱 What You Need
Item | Details |
---|---|
Raspberry Pi 5 (8GB) | Ideal for performance and future scaling |
Storage | MicroSD card or NVMe (via PCIe board) |
OS | Ubuntu Server 24.04 (64-bit) |
Static Local IP | e.g., 192.168.X.X reserved in router |
Dynamic DNS service | Free from No-IP |
Public router access | For port forwarding (80/443) |
Getting Started with WordPress on the Raspberry Pi 5 and No-IP
🖥️ Step 1: Install Ubuntu
- Download Ubuntu Server 24.04 64-bit from the official Raspberry Pi site.
- Flash it to your SD card or NVMe drive using Raspberry Pi Imager.
- On first boot, login via SSH or keyboard and set up a new user (e.g.,
piadmin
).
🔧 Step 2: Install the WordPress LAMP Stack
To install WordPress on a Raspberry Pi 5 with No-IP, we’ll begin with the standard LAMP stack,
Update your Pi:
sudo apt update && sudo apt upgrade -y
Install Apache, PHP, and MariaDB:
sudo apt install apache2 mariadb-server php php-mysql libapache2-mod-php php-cli php-xml php-mbstring php-curl php-zip php-gd -y
Enable services:
sudo systemctl enable apache2 mariadb
sudo systemctl start apache2 mariadb
🔐 Step 3: Secure MariaDB and Create Database
Secure MariaDB:
sudo mysql_secure_installation
Create WordPress DB and user:
sudo mysql -u root -p
Inside the MariaDB shell:
CREATE DATABASE wordpress_db; #change this as desired
CREATE USER 'wp_user'@'localhost' IDENTIFIED BY '<your_password>'; #set a username & password
GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wp_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
🌐 Step 4: Install WordPress on the on Raspberry Pi 5
Download and extract:
cd ~
wget https://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
Move to web directory:
(This is an important step as its the main working directory for the Apache Server, where the relevant permissions are granted to ensure compatibility downstream.)
sudo mv wordpress /var/www/html/
Fix permissions:
sudo chown -R www-data:www-data /var/www/html/wordpress
sudo find /var/www/html/wordpress -type d -exec chmod 755 {} \;
sudo find /var/www/html/wordpress -type f -exec chmod 644 {} \;
🌎 Step 5: Set Up No-IP for Free Domain Access on Raspberry Pi 5
- Register a No-IP free account.
- Create a hostname like
your-staging.ddns.net
. - Install No-IP client:
wget https://www.noip.com/client/linux/noip-duc-linux.tar.gz tar xzf noip-duc-linux.tar.gz cd noip-* sudo make sudo make install
- Run the configuration:
sudo /usr/local/bin/noip2 -C
- Make it start at boot via systemd:
sudo nano /etc/systemd/system/noip2.service
Add:[Unit] Description=No-IP Dynamic DNS Update Client After=network.target [Service] Type=forking ExecStart=/usr/local/bin/noip2 Restart=always [Install] WantedBy=multi-user.target
Then:sudo systemctl enable noip2 sudo systemctl start noip2
🌐 Step 6: Apache Virtual Host & SSL Setup
This configuration ensures your WordPress installation on Raspberry Pi 5 is reachable using your No-IP dynamic domain.
Create a virtual host config:
sudo nano /etc/apache2/sites-available/wordpress.conf
Paste:
<VirtualHost *:80>
ServerName your-staging.ddns.net # Ensure to change the URL accordingly
DocumentRoot /var/www/html/wordpress
<Directory /var/www/html/wordpress>
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Enable and reload:
sudo a2ensite wordpress.conf
sudo a2enmod rewrite
sudo systemctl reload apache2
🔐 Step 7: Enable HTTPS with Let’s Encrypt
Install Certbot:
sudo apt install certbot python3-certbot-apache -y
Generate SSL:
sudo certbot --apache -d your-staging.ddns.net # Ensure to change the URL accordingly
✔️ Certbot will:
- Get a certificate
- Configure HTTPS
- Redirect HTTP to HTTPS
✅ Step 8: Final Testing of the Raspberry Pi 5 Running WordPress with the Free No-IP Domain
Visit:
https://your-staging.ddns.net
Run the WordPress setup wizard. Enter your:
- DB Name:
wordpress_db
- Username:
wp_user
- Password:
<your_password>
- Host:
localhost
You should now see your WordPress dashboard.
✅ Step 9: Setting up the Dashboard
(To be updated)
🔄 What’s Next (Coming in Part 3)
- Connecting a purchased
.com
domain - Redirecting from
your-staging.ddns.net
to your final domain - Fixing Apache/WordPress misconfigurations
- Recovering from broken installs using backups
- Optimizing for production
- Optional: Setting up an email server
🛡️ Security & Maintenance Tips
- Regularly backup with tools like UpdraftPlus or via
tar
+mysqldump
. - Schedule certbot auto-renew:
sudo certbot renew --dry-run
- Harden permissions:
sudo chown -R www-data:www-data /var/www/html/wordpress
🙌 Final Words
With this setup, you now have a complete understanding on how to install WordPress on Raspberry Pi 5 using No-IP , making it entirely free and publicly accessible with full HTTPS access. No hassling around with cPanel, no paid hosting, and no bloat. Stay tuned for Part 3, where we go deeper into setting up a paid domain, error recovery, and migrating to production.
Have questions or want to build in other features like Docker, staging branches, or Git-based deployment? Drop a comment or reach out!