Advertisements

PressPi – A Turn-Key Raspberry Pi WordPress Server Image!

The Raspberry Pi is a fantastic platform for running a local copy of WordPress for development, testing & even production (for smaller sites!).  WordPressPi is a fully configured image that is powered by Nginx for blazing fast performance and of course the latest version of WordPress as the CMS. You can have your own WordPress blog setup locally in a matter of minutes with the PressPi image, or if you are feeling a tad more adventurous – I’ve included detailed instructions for sharing your WordPress site with the world. ~Enjoy

Download PressPi:

You can download PressPi v3 HERE.

 

Installing PressPi:

  1. Download Win32DiskImager
  2. Write image to SD Card. (8gb+)
  3. After initial Boot-up, Run “Sudo raspi-config” to expand the file system.

 

About The Image:

  • Raspbian Base
  • A, B+, v2 compatible
  • Powered by Nginx
  • SSH: pi/raspberry
  • User: wpadmin / !WPadmin!
  • MySQL: wpadmin / !WPadmin!
  • PHPmyadmin: root / !WPadmin!
  • Raspcontrol: presspi / !PressPi!
  • Access WordPressPi
    • http://your_pi_ip_address/wp-login.php
    • http://presspi/wp-login.php
  • Access PHPmyadmin
    • http://presspi:81
  • Access Raspcontrol
    • http://presspi/raspcontrol

 

Version History:

  • PressPi v2.1 is Done!
  • PressPi v2.2 is Done
  • PressPi v2.3 is Done
  • PressPi v2.32 is Done
  • PressPi v3 is Done!

Also, Make sure to check out the official website! http://presspi.com

 

Import Your Current Website Into PressPi


To easily migrate an existing WordPress blog, its data and configurations to PressPi, check out my tutorial on migrating your website – The easy way:

http://everyday-tech.com/dead-simple-guide-to-migrate-your-wordpress-blog-to-a-new-domain/

**Note: Make sure to clear your browser cache after importing! All in one WP migration plugin does not change your site url / so everything can still be accessed via http://presspi, however it will require your new sites user name & password. 

 

Share Your PressPi Site With The World


 

Change Your MYsql password:

1.) SSH into your Pi

2.) Login to MySQL:

3.) Run the following command to change your password:

4.) You then have to also update your password in your wp-config.php file. For ease of use, I’ve setup samba so you should be able to browse under network to find your presspi server.

Update_WPconfig_PHP_DBPW

 

5.) I recommend using Notepad++ to edit and make the following changes to wp-config.php.

Save your changes then exit.

 

6.) Finally, Clear your browsers cache and test to make sure that you can access your login page @ http://presspi/wp-login.php.

 

Change Your wpadmin password:

Login to WordPressPi & navigate to: Users > Your Profile.

Scroll down and set a new password for wpadmin and click Update Profile!

WordPressPi-change-wpadmin-password

 

Change Your Pi password:

Run:

Choose Option #2 to change the password for user Pi.

 

Set Static IP Address on your Raspberry Pi(wired):

1.) SSH into your Pi.

2.) Then we want to edit the network interfaces:

 

3.) You’ll see some settings that look like this:

Replace the line: iface eth0 inet dhcp
with: iface eth0 inet static

4.) Then specify the address, netmask, network, broadcast and gateway, like this:

iface eth0 inet static
address 10.0.1.64
netmask 255.255.255.0
network 10.0.1.0
broadcast 10.0.1.255
gateway 10.0.1.1

 

**If you are unsure what the above settings should be, You can run the following:

 

5.) Finally, Reboot and make sure that you can ping the new static IP address. Then make sure your Pi can reach the inter-webs!

 

Router Port Forwarding:

Login to your router and make 2 entries for your Raspberry Pi IP address. (1 for port 80 = http / 1 for port 443 = https)

Router-Port-forwarding-wordpresspi

 

Edit Your Domains DNS Records:

I’m assuming that you have a domain name registered that you would like associate with your PressPi installation. I personally use and recommend Bluehost, however the following steps detailed in the BlueHost interface should closely resemble most Hosting/Domain name providers.

First we will need to find your external IP address. To do this simply visit: IPChicken.com

Then what you need to do is change your DNS settings for your domain. To do this in the BlueHost interface, click on: Domain > Zone Editor.

Bluehost-zone-editor
From here – Edit your  main (A) host record to reflect your external IP address you grabbed earlier from IPChicken.

BlueHost-zone-editor-ahost-records

**Note: DNS changes can take a few hours to propagate!

 

Change The Site Web Address  in WordPress:

Now login to WordPressPi @ http://raspberry_pi_IP_address/wp-login.php.

Then navigate to: Settings > General

Modify your WordPress & Site URL & Save.

WordPress-General-Settings

 

Modify Servers Domain Name in Nginx

Finally you will want to make sure to modify the servers domain name to match the site you are importing:

Then Find and edit the following line:

 

That should do it! Grab your mobile device to test outside of your network (turn wi-fi off). If you can access your domain, you are all set! If not, remember that DNS Changes generally take a few hours to update – be patient! In order to access your domain name internally – you will have to add host records to your router/PC.

 

Important!
There is probably more you can do to secure your new Raspberry Pi Web Server once you make it available to the world. This is merely a tutorial to get you online – Please make sure to educate yourself further about the pitfalls of hosting your own server locally!

 

Build Details:


Preparing The Image

Sudo Raspi-Config:

  • Changed HostName
  • MemorySplit = 16mb
  • OverClock = Meduim

 

The usual updates:

 

Setting Up Samba

 

1.) Install Samba

 

2.) Now we need to edit our samba.conf file.

 

3.) In the configuration below – I’ve shared out the Nginx WordPress Path. This way you can easily grab/upload files locally.

Installing Pre-requisites & WordPress

I actually followed the amazingly well done tutorial from RaspiPress.com almost to the T. If you are interested in doing a build yourself, Make sure to check out his detailed write-up HERE.

Additional Configuration

 

1.) Increase File Upload Size & Max Post Size:

 

2.) Increase Memory Limit

 

3.) Change Client_Max_Body_Size

**It is important to note that the client max body size must equal the upload_max_limit!

 

4.) Set Client_max_body_size

 

5.) Set Timeout Tresh-holds:

 

Finally, Restart php/nginx

 

Install PHPmyAdmin & RaspControl

Install PHPmyadmin

When prompted select yes to configure dbconfig database – Then enter the Mysql password we configured earlier.

 

Then Enable the mcrypt module & restart php5

 

Finally Edit your Nginx config to route your phpmyadmin page to a different port

Then Run the following command to restart Nginx and load this new config:

 

Should now be able to access phpmyadmin via:

http://presspi:81

User: wpadmin
Pass: !WPadmin!

**We use the above configuration for added security – As usually accessing phpmyadmin is done via http://ip_address/phpmyadmin

 

Install RaspControl

1.) Clone The RaspControl directory from github

**Original author is no longer hosting Raspcontrol – This is a fork.

 

2.) Create the required directory + files for access

 

3.) Set username / password for raspcontrol access.

Save + Exit. You should now be able to access raspcontrol via:

http://presspi/raspcontrol

User: presspi
Pass: !PressPi!

Change Log

1.0

  • Initial Image

1.1 – 1.3

  • n/a

1.40

  • Added new artwork (yay!)
  • Custom Login
  • WP SuperCache (to improve loading times)
  • Added Welcome Post
  • Added Mac host resolution post

1.41

  • Added upload limit threshold ( fix timeout issue with importing/exporting)
  • Minor corrections in post information
  • Added All-In-One-WP-Migration Plugin

1.5

  • Updated to 2015 Theme
  • Updated Welcome Post
  • Updated Images + media
  • General Re-branding for official launch

1.6

  • Added PHPmyadmin
  • Added RaspControl
  • Added WP Simple Firewall

v2.0

  • Misc bug fixes & quality of life changes

v2.1

  • Update to make PressPi compatible with latest model of Raspberry Pi

 v2.2

  • Update to make PressPi compatible with latest model of Raspberry Pi

 

Version 2.30 Changes – 12/11/2015

  • Updated WordPress to 4.4
  • Updated Default Themes
  • Updated All Plugins
  • Removed iControl Security Plugins
  • Added EWWW Image optimizer plugin
  • Added Autoptimize Plugin
  • Enabled & Configured APC (Caching)
  • Added Troubleshooting section to Welcome Post

 

Version 2.31 Changes – 12/11/2015

  • Ran: sudo apt-get update && sudo apt-get upgrade -y
  • Ran fsck (sudo shutdown -F -r now)
    **Note: Version never released.

 

Version 2.32 Changes – 12/11/2015

  • Reduced image size (from ~7.5gbs > 3.9gbs)

 

Version 3.0 Changes

  • Updated For Raspberry Pi 3

 

Version 3.01 Changes

  • Updated WordPres+Plugins
  • Jessie Update
  • Fixed Misc. spelling & grammatical problems with welcome post.

 

Version 3.10 Changes – 6/20/2017

  • Updated WordPress + Themes
  • Cleaned Up Tutorial + Welcome Posts
  • Created Default Entries For Common Functions ( Static IP,Postfix, etc – All commented out for ease of use)
  • Setup Postfix for send function
  • SSL Hardening on Nginx & Postfix
  • Setup UFW Firewall Rules (disabled by default)
  • Created Helpful MOTD

Additional Resources

I couldn’t of done this all on my own – Here is a list of resources I used to Build WordPressPi and help create these tutorials.

 

Whew’ Between building & testing the image and additional tutorials – we covered a lot here. I hope you enjoy PressPi – As always if you run into any technical issues, Feel free to let me know in the comments.

~Cheers

 

Advertisements

108 Comments

  1. William
      • Bold
            • Bold
              • Bold
            • Bold
  2. Bold
      • Bold
  3. Unplugged
  4. Marten Van Der Meulen
  5. test
  6. Corey OConnor
      • Corey OConnor
  7. Ryan
  8. Phil
      • Phil
          • Phil
            • Phil
          • Phil
  9. Tony Fitzsimons
    • Tony Fitzsimons
  10. Tony Fitzsimons
  11. Lee Hoover
      • Lee Hoover
  12. Oddsko
  13. Niklas Sihvo
  14. tim
  15. Tamsyn Murphy
      • Tamsyn Murphy
  16. Camden
      • Camden
          • Camden
              • Camden
              • Camden
  17. Paul Bishop
  18. Polyterative
  19. Chewie Mantou
  20. Enrique Gonzalez
  21. Roy Schuurmans
      • Roy Schuurmans
          • Roy Schuurmans
  22. AbdulNaser Al Othmany
  23. Jan
  24. Enrique Gonzalez
      • Enrique Gonzalez
  25. Tobe
  26. alejandro
    • alejandro
  27. Andrew Doig
      • Andrew Doig
          • Andrew Doig
  28. ZenDaddy
  29. Stuart Weenig
  30. Schafferm
  31. inventor84
      • Ace
  32. When Pigs Fly