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

 

  • William

    I get redirected to this IP when clicking login.
    http://192.168.1.24/wp-login.php

    • Yep – That looks correct…. Is that not your IP address?

      • Bold

        I have the same issue as William. My ip is 10.0.0.111 (DHCP with MAC assign). I can ssh RasPi just fine using this address. I can also get successfully to WP login page (10.0.0.111/wp-login.php), but when I input my username and password (default for now) and click [Log In] it redirects to http://192.168.1.24/wp-login.php. So this IP address must be hard coded somewhere in config. Can you check it out, please? Additionally – the wp-login page loads very sloooowly (like 20-30 sec.) over the ethernet – is this normal?

        • Hmm – Interesting. Yea I’ll definitely have to take a look at it.

          I did not hardcode my personal IP address anywhere, but it must of gotten cached somehow. And login times are really quick, especially since I went through all the extra work to use Nginx instead of apache!

          If you run “startx” and login using 127.0.0.1 – does it still redirect?

          • If you can’t wait to get started – The build details should get you up and running right away….

            I’m not near a Raspberry Pi now…but I have a hunch it has something to do with the .htaccess file. I’ll do some testing as soon as time allows and follow up.

            • Bold

              I can wait for the fix, or fix it for myself with little help. I’m checking 127.0.0.1

              • I sent you an invite in skype. For the time being you can set a static ip address to 192.168.1.24 ( if possible in your enviornment ).

                It looks like the issue has been reported before with other WordPress users – For which their solution seems to be using phpmyadmin to change the IP address in the database….well since we’re using nginx – not sure if thats possible. I’m still searching for a better fix!

              • Alright – I think I’ve got a fix – Working on version 1.1 now.

                It pulled in the IP address at the time of installing wordpress – ( Settings > General > Site URL ) While I could add instructions for users on how to change these…I think it just makes sense to have users install a fresh copy of wordpress instead.

                It has the added benefit of users being forced to create a unique user name / password as well – which is great if they everyone doesn’t feel like following the entire guide for opening their site up to the world!

              • NVM all that above – I found a better way to do it.

                After all that mucking around – It would seem that simply setting the hostname via rapsi-config and re-installing wordpress allowed it to pull in the correct settings.

                Tested with 2 different IP addresses – Doing 1 more test and then I’ll package up the image and post it for you to test!

                Thanks Bold!

              • Ok…. several hours later and 1.3 is finally released!

                It should be noted as well that bold discovered a bit of a bug with accessing internally hosted websites on the Mac OS. He said he’ll provide a writeup for others soon 🙂

                Other than that – 1.3 is better than ever – I fixed a bunch of bugs and was able to speed loading times up / optimize a few other bits and pieces a long the way.

                ~Enjoy

              • Bold

                I’ve just flashed newest version (1.4.1) and it is working great out of the box. Great job, thanks!

              • FYI – it’s all fixed^

            • Bold

              under midori 127.0.0.1/wp-login.php just freezes (I can’t get to login page). under dillo login page loads instantly, but when I click [Log In] button it freezes at “Contacting host..”

              I’ve also noticed that when I hover cursor over [Log In] button it shows (in status) bar that button link is “192.168.1.24/wp-login.php”

              I’ve send you my contact info via e-mail so you can contact me on skype or e-mail (if you want).

  • Bold

    Thanks for this. Just in time for my WP server on Raspi. Is this overclocked by default?

    • Yea – I can’t believe I forget to add that in there….

      Should be 900mhz. (meduim)

      • Bold

        Superb! Thanks again. I’ll be installing this tomorrow.

  • Unplugged

    Hi Ryan, thanks for the image. I successfully transferred my own blog into the Pi. I’ll be linking your site to my blog. Keep it up!

    • That’s great news 🙂

      Please be sure to leave a link for your site so I can check it out.
      ~Cheers

  • I’m still looking for a decent free url forwarding with masking service.
    You can reach my pi server at pi.abzdcorp.com for now until i found one to replace this url.
    Pls bear with me, our isp here sucks!

  • Forgot to mention that presspi 1.5 is working as it should be. Thanks agan Ryan.
    http://pi.ph.gp

  • Marten Van Der Meulen

    You’ve forgot to mention that if you change the MYSQL password you also need to change the wp-config.php file and where it’s located.

    Otherwise excellent tutorial.

  • test

    latest release file is corrupt when you unzip it

    • Thanks for letting me know! I put the older version(v1.3) back up until I can fix the new version.

      • I went through the upgrade process on a fresh 1.6 image and re-uploaded it.

        Please let me know if you have any more issues!

  • Corey OConnor

    I cannot get the mysql password changed when I ssh into the pi. Here is the error I keep getting…

    mysql> SET PASSWORD FOR wpadmin@localhost = PASSWORD(pa$$word);

    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘pa$$word)’ at line 1

    • Corey,

      I just tested it – It should be working as shown in the post.

      I noticed that your syntax above is slightly off though. Here is the correct syntax:
      mysql> SET PASSWORD FOR ‘wpadmin’@’localhost’ = PASSWORD(‘pa$$word’);

      **The apostrophe around your new password field is required.

      • Corey OConnor

        Thanks Ryan! I swear I tried it many ways after the way the post is written failed. But, after plenty of sleep and coffee… it works. So my bad! Thank you for this build tho! It is simply amazing.

  • Ryan

    Really loving this program, but are there any tutorials? This is my first pi project and it’s a bit daunting.

    • Thanks Ryan, glad you are digging the image. Presspi is turnkey, so you should just have to image it and go. What kind of tutorial are you looking for exactly? WordPress? Imaging PressPi to the SD card?

  • Phil

    how can i create a new database?

    • You can create a new database by logging into phpmyadmin^

      • Phil

        everytime i try and create a database it says “Access denied for user ‘wpadmin’@’localhost’ to database”

        • Are you running the command from phmyadmin or command line?

          • Phil

            command line and if i login through webui its says “Create new database and under that No Privileges”

            • Phil

              any advice? still can’t get it

              • I am able to replicate the issue on my end – It should just be a simple permission adjustment for the wpadmin user. I’ll post back sometime this weekend with the fix.

              • Ok – sorted it out.

                You need to login as root user to have full access.
                User: root
                Pass: !WPadmin!

              • I was able to figure it out.

                Need to log in as root user to get admin access.
                User: root
                Pass: !WPadmin!

          • Phil

            any advice? still can’t get it.

  • Tony Fitzsimons

    Hi I cant seem to change mysql password! I am entering !WPadmin! but I get the following
    ERROR 1045 (28000) : Access denied for user ‘wpadmin’@’localhost’ (using password: yes)
    Any help gratefully appreciated!

    • Tony Fitzsimons

      managed to sort it.

  • Tony Fitzsimons

    Up and running now! Loving this. A great deal to learn but having great fun! Excellent tutorial.

  • hi Ryan, what’s the new features of v2.1? I want to add several hosts with my Pi, is it recommended? Just for personal stuffs, my bandwidth is just small.

    • You could try it^ 🙂 I personally would probably opt for 1 site = per raspberry pi…but If bandwidth is small, you could probably do a few sub sites no problem.

      Version 2.1 was just an update to make it compatible with latest model Raspberry Pi. I may revisit the image down the road to optimize for speed further ( namely APC, HTaccess stuff). But otherwise It’s more or less going to stay the same I’d imagine.

      That being said – any ideas for future versions are welcome^
      ~Cheers

  • Lee Hoover

    Help! Was screwing around trying to configure everything to port forward my presspi and managed to incorrectly change the “WordPress Address (URL)” and “Site Address (URL)” so of course I can no longer log in as wpadmin. Is there a file on the Pi that I can SSH into and manually edit these two General Settings to regain access?

    • I’ll have to double check when I get home, but I’m pretty sure u want the wp-config file

      • Lee Hoover

        Thanks for the reply Ryan. I have looked in the wp-config file and everything looks OK there. The MySQLhostname still says “localhost”.
        When I was messing around, I accidently put ‘presspi.com” instead of “presspi” in the wordpress URL and Site Address URL. So now when I try and log in now to my local IP address I get to the wp-log in screen and can type in my user id and password. The problem is that when I hover over the “Log In” button I can see that it is trying to redirect my ID and password to “presspi.com” instead of my local presspi.
        Is there something in the SQL database I need to change?
        Thanks,
        Lee

  • Oddsko

    Awesome work.
    Is there by any chance an easy way to add another WordPress blog to the server?
    I would like to try and run 2 sites at the same time.

    • Yea – You will want to look into setting up multi site.

  • Niklas Sihvo

    This is great! But I can’t get Ninja Forms to send me an email, have tried mandrill services for mail but no luck… Connectiontest says all ports closed, is there any firewall installed?

  • tim

    if i install the woocommerce plugin i can’t customize my permalinks, wich i need to enable cashing (to make my site faster… anybody else having problems with that?

  • Tamsyn Murphy

    Thanks for this tutorial, it has been very useful and works like a charm. I just want to check that updating the WordPress components shouldn’t cause any issues on the Raspberry Pi 3? Thanks.

    • Nope – should be good just fine to update for v3.

      • Tamsyn Murphy

        Thanks 🙂

  • Camden

    I am having problems changing the MYsql password. I followed the instructions and when I go to acess the wp-admin login page it says “having trouble communicating with the MYsql database.” Thanks for any help!

    • Can you make sure that the MYSQL service is running?

      sudo service mysql start

      • Camden

        Yes…It is already running

        • Did you also update the password in the wp-config.php file?

          • Camden

            I did.

            • Hmmm…

              Let’s knock a few questions out at once so we aren’t doing this back and forth thing 20 times.

              -Are you using the Pre-configured Presspi.img or did you build it yourself using the instructions in this guide?

              -Have you tried reboot the device? (or restarting relevant services)

              -If you change the password back to to the default, are you able to login?

              • Camden

                I used the pre-configured Presspi.img

                I have tried rebooting the device

                I changed the password back to the defult and I was able to login.

              • Well if you’ve also cleared your browser cache (or tried another browser) and it is still not working for you I would ask you to go through the process again to rule out any user error type stuff.

                If that still doesn’t work, I can spin up a copy and double check this weekend.

              • Camden

                Ok, Thank You.

                Just to be sure I can just copy and paste this into my pi?
                SET PASSWORD FOR ‘wpadmin’@’localhost’ = PASSWORD(‘your_new_password_here’);

  • Paul Bishop

    pi user via ssh cant write to www folder? how to fix?

  • Polyterative

    This package is incredible. Set up my personal hosting+domain in 1 hour

  • Chewie Mantou

    Good day,

    Thank you for this image, and your time and effort. Not sure if this is still active developed and updated. I would just like to know if this Presspi v3.01 is suitable for raspberry pi 3 and how to maintain the installed software the distro. Is it Raspbian Jessie? Can I update it normally? New to linux way of installing software as I could installed NIGNX and PHP with out problem and only MYSQL giving me major headacke regarding the root password setup..

    Will there be plan to further develop other turnkey ready image of other service like Tiny RSS?

    Kind regards,
    Terry

    • It Should work with 3.0 if I recall, Yes.

      I actually have made several turnkey images for the raspberry pi, you can find all of them on this site. No plans for Tiny RSS currently.

      ~Cheers

  • Enrique Gonzalez

    Hey man, Ive been trying to install this on a RPI 3,
    It seems to get stuck at the initial loading screen with the 4 raspberries on top and never loads to a GUI. Is this right?

    • It will never load to a GUI. You should be able to browse to the WordPress frontend by getting the devices IP address and logging in. The instructions in the post should take care of the details.

  • Roy Schuurmans

    Trying to get in touch with you, are you still maintaining this project?

    • On occasion yes. I am actually working on an update right now.

      What’s up?

      • Roy Schuurmans

        Sent a mail to the presspi contact email. Was hoping for a reply.

        • My partner actually get’s those e-mails. Can you copy+ paste your issue here so others may benefit from the resolution?

          • Roy Schuurmans

            It actually was a proposal regarding the project. Nothing technical.

            The proposal was about adopting the project.

            • Ah – Ok. Found you on FaceBook. I sent you a private message there. Let’s continue this convo there 🙂

  • AbdulNaser Al Othmany

    Mr Ryan after making this project is there any possible ideas to control my raspberry pi from that wordpress site and let my users print papers from a printer connected to raspberry pi and the raspberry send a completion comment to the user after checking from sensor on GPIO , I will really appreciate if you can help me do this task

    i have already a wordpress site hosted by bluehost and purchased a raspberry pi

    • Not that i know of… That sounds fairly unique. Needing users to print from wordpress… May be able to setup a papercut print server and just have them email to print. Or if you insist on involving wordpress, setup a contact form with attachments to send to papercut

  • Just an FYI – If you set the static IP address – MySQL may fail to start. The following should fix it: changing the

    bind-address
    in

    /etc/mysql/my.cnf
    to the current ip and restarting the server

    sudo /etc/init.d/mysql start

    • Also… If you are hosting a site externally. Will need to add an entry in your hosts file for internal access.

      c:WindowsSystem32Driversetchosts
      192.168.1.xxx yoursite.com

  • Jan

    Hi Ryan,
    First of all, congratulations to PressPi. What a great idea!!!
    Is it possible to assign a dynamic DNS to PressPi (adding “Let’s encrypt”) so that the website may then be reached from the anywhere from outside via https?
    Regards,
    Jan

  • Enrique Gonzalez

    Hi Ryan, Thanks for your hard work, an excellent setup. I have a few questions hopefully you can help.
    When trying to access the website ive created from another computer on the same network im running into issues. Ive changed the ngnix config file’s server and wordpress urls from presspi to “www.mysite.com ” and I can access it from outside my network but I still can only access it from inside my network from http://presspi/ and when I click any link, the link goes to for example http://www.mysite.com/category/presspi/ and it doesn’t work until I manually replace it with http://presspi/category/presspi/.

    Also, would it be possible to have multiple installs of wordpress on 1 pi, for hosting 2 low traffic websites? Many thanks for your time.

    • Yep – Just add an entry for the site in your hosts file. IE –
      192.168.1.xxxx mysite.com

      • Enrique Gonzalez

        Hi Ryan, thanks, i got it to work on one of my computers.
        Why is it that all computers can access presspi using http://presspi even though http://presspi is not on their host files? is it possible for me to change it to http://mysite for all computers in the network without modifying the host file?

        Also have you ever tried multiple installs of wordpress on press pi? if so how?
        many thanks!

        • Multiple installs is possible, but I haven’t tried it personally. Look up Nginx + wordpress multiple installs, should point you in the right direction.

          The name resolution for PressPi without a host entry is a very good question. It took me awhile to figure that out when I first set the image up…but I honestly don’t recall what I did exactly to make it work.

Pin It on Pinterest