spud693
Posts: 7
Joined: Sun Jul 08, 2012 9:53 pm

Running wordpress on my pi LAMP server...

Sun Jul 08, 2012 10:05 pm

Hi everyone, im seeking some assistance here, as im having a few issues running wordpress on my pi LAMP server.

I'm very much a linux noob - had a decent computing education but never dabbled really dabbled in linux and havent made much use of my education since i had it many moons ago, so even that's fairly rusty.

Nonetheless, i did manage to get what appears to be a fully functioning LAMP server setup on my pi, created the my sql database in phpmyadmin, ran the wordpress php install script - which worked fine, and indeed now i can access the index.php file and it renders a nice generic wordpress blog, and brosing around all works fine.

- however - i can log in to the admin dashboard but as soon as i select ANY dashboard option, change theme etc, it gets stuck loading the page (which appears to never load) it freezes the server (no longer able to open the site etc) and i can't even establish an ssh connection to the pi at this stage - which to me suggests it has frozen. only option i have left at this stage is to pull the plug on it, power it up again, at which point everything boots up nicely, and i am again able to access the main page of my wordpress blog, but again - if i so much as think about performing any admin functions it freezes again...

any ideas? i've re-installed wordpress a few times and it appears to make no difference.

:?:

Holy One
Posts: 29
Joined: Mon Jul 02, 2012 5:44 pm
Contact: Website

Re: Running wordpress on my pi LAMP server...

Mon Jul 09, 2012 2:17 am

seems likely to be one of two things:

1. your pi is having power issues, using cheap unregulated phone chargers etc. can fail to output the required power under full load causing the pi to crash.

2. you're experiencing a kernel panic which is crashing the system. this is something you need to reproduce using a logger and check to see what it says.

are you using the latest firmware?

troubleshooting should begin with you using the pi with a monitor attached to discern if the operating system/hardware =is= actually crashing or just the networking end of things becoming unresponsive.

spud693
Posts: 7
Joined: Sun Jul 08, 2012 9:53 pm

Re: Running wordpress on my pi LAMP server...

Mon Jul 09, 2012 6:45 am

Hi, thanks for replying.

I'm using the recommended power cable sold by RS, so hopefully not that.

I'm running the newest Debian squeeze from the downloads page.

I'll reproduce the error again later to see if it does indeed freeze the command line on the pi itself, and I will report back with my findings!

Thanks

spud693
Posts: 7
Joined: Sun Jul 08, 2012 9:53 pm

Re: Running wordpress on my pi LAMP server...

Mon Jul 09, 2012 6:40 pm

Ok then!...
Connected my tv back to the pi - opened my Wordpress page on my phone, logged into my admin dash and tried to select a theme. Stuck loading, server now unresponsive - on the pi itself the command line hasn't frozen - its painfully slow (type a single letter and it is shown on the command line maybe 10 seconds after the keypress, but it is still running...
Any thoughts on how I should diagnose this? Is it possible that Wordpress is too heavy for it? ( despite assurances from some who say it can)
One other thing - I rebooted it last night and left it running, at some point over night it seems it got bogged down in something again, despite no admin access...

brainsys
Posts: 71
Joined: Fri Jun 29, 2012 7:16 pm

Re: Running wordpress on my pi LAMP server...

Mon Jul 09, 2012 7:49 pm

Wordpress lock-up seems a common issue. Read the comments at the bottom of this page:
http://mitchtech.net/wordpress-on-raspberry-pi/

tino
Posts: 3
Joined: Tue Jul 10, 2012 1:57 pm

Re: Running wordpress on my pi LAMP server...

Tue Jul 10, 2012 1:59 pm

Hi ,

I am running a copy of Wordpress with Lighttpd and sqlite as the database and am not experiencing any lockups.

Its not particularly fast, i.e. 5seconds to load a page, however I have been tweaking it and its improving.

I would look at using lighttpd instead of apache if possible, I'll put the installation procedure on here later when I get back and can find what I did.

spud693
Posts: 7
Joined: Sun Jul 08, 2012 9:53 pm

Re: Running wordpress on my pi LAMP server...

Tue Jul 10, 2012 5:29 pm

That would be great. Thanks everyone for your help, in the meantime i've switched to Textpattern which seems to be running fine in the meantime. If you keep me informed regarding your guide, I'll be sure to give it a go!

tino
Posts: 3
Joined: Tue Jul 10, 2012 1:57 pm

Re: Running wordpress on my pi LAMP server...

Wed Jul 11, 2012 6:27 pm

Hi ,

To get lighttpd installed I had to run the following commands:

Code: Select all

addgroup www-data
adduser www-data
apt-get update
aptitude install lighttpd php5-cgi php5-cli php5-common vim
I use vim as my default text editor , vi is already installed , you can use gedit I believe if you prefer a gui.

These should run without issue , I then opened the lighttpd.conf

vim /etc/lighttpd/lighttpd.conf

and added the following

Code: Select all

server.modules = (
  "mod_access",
  "mod_alias",
  "mod_compress",
  "mod_fastcgi", <-- This was added
)
I have also amended / added the following

Code: Select all

fastcgi.server = ( ".php" => ((
  "bin-path" => "/usr/bin/php5-cgi",
  "max-procs" => 2,
  "bin-environment" => (
    "PHP_FCGI_CHILDREN" => "2",
  ),
  "socket" => "/tmp/php.socket"
)))
If you want a tutorial on how to install Wordpress and sqlite , I can dig up those commands, although there are some issues with that , that I need to resolve as some commands within Wordpress fail.

paulhath
Posts: 11
Joined: Wed Jul 04, 2012 7:56 am

Re: Running wordpress on my pi LAMP server...

Sun Jul 15, 2012 12:19 pm

I've had a play with several CMS's on another linux machine to evaluate how they might perform on a RPi. These were: Wordpress, Drupal 7 and Joomla! Here's my opinions...

1, Wordpress - great, easy to set up out of the box, but rather too system intensive for the RPi
2, Drupal - also very good, but not quite as easy to configure
3, Joomla! - I can see this is a very flexible system, but it seems that a lot of configuration is at the coding level, and I'm really not up to speed on php or CSS.

My conclusion - Drupal looks a good bet, and I'm running that with no problems on my RPi (website, SSH session and VNC session all running simultaneously - not the fastest, but it works!)

System info - 4GB SD card with Wheezy beta, Drupal installation on a 200 MB USB flash drive partition, linked from the home www directory via a symbolic link

These are my opinions and experiences, and others may vary :mrgreen:

spud693
Posts: 7
Joined: Sun Jul 08, 2012 9:53 pm

Re: Running wordpress on my pi LAMP server...

Sun Jul 15, 2012 4:36 pm

I can add something to that now - having encountered issues using wordpress i moved onto textpattern, which appears to run without any issues. again, it isn't as straightforward as wordpress, but with a bit of tweaking you can achieve decent results.

For anyone interested, my blog is up and running on my PI @ http://www.spud693.co.uk.

Have a look!

User avatar
Casalor
Posts: 67
Joined: Wed Feb 15, 2012 11:14 am
Location: Nantwich, UK
Contact: Website

Re: Running wordpress on my pi LAMP server...

Mon Jul 16, 2012 6:57 pm

Nice work, Spud!

I've gone down the LLMP route with wordpress (on Arch) but did encounter a problem where the php-cgi processes were being orphaned and not killed off properly (eventually using up the whole memory). To get around this I've restricted the number of child processes in lighttpd.conf to

Code: Select all

fastcgi.server = ( ".php" => ((
   "bin-path" => "/usr/bin/php-cgi",
   "socket" => "/tmp/php.socket",
   "max-procs" => 1,
   "bin-environment" => (
   "PHP_FCGI_CHILDREN" => "1",
   "PHP_FCGI_MAX_REQUESTS" => "500"
   ),
)))

paulhath
Posts: 11
Joined: Wed Jul 04, 2012 7:56 am

Re: Running wordpress on my pi LAMP server...

Fri Jul 20, 2012 1:26 pm

Nice site Spud!
My experiences with configuring/extending Drupal caused me to over-stress my RPi, and ended up with a corrupted boot partition :oops:

System now rebuilt the same as before, but now using e107 for the CMS - take a look at:
http://whistem.no-ip.org/home

The site runs reasonably fast, despite existing on a standard USB flash drive partition.


Return to “Networking and servers”