ghellquist
Posts: 58
Joined: Thu Aug 02, 2012 8:47 am
Location: Stockholm Sweden

Ideas for wordpress performance

Sun Aug 05, 2012 5:16 pm

Time for next step in learning process for me.

I have a simple wordpress site up and running on my Raspberry. It runs the standard Apache / MySql / PHP5 setup. The site files and MySql database is placed on a USB SSD disc (had an extra small SSD disc around and placed in a USB enclosure).

The site is only partly for real, there will be a few things for me and my friends there, but it mostly intended as a learning experience.

Next step is trying to understand a little about tweaking performance. Any pointer out there?

One idea is to switch to nginx -- not in the apt-get library, how do I get it to run?

Happy smiles from Stockholm, Sweden // Gunnar

benthepoet
Posts: 29
Joined: Sun Oct 02, 2011 5:36 am
Location: Traverse City, MI USA
Contact: Website

Re: Ideas for wordpress performance

Mon Aug 06, 2012 5:19 am

You're using Raspbian, right? Because nginx is available via apt-get. You'll need to install php5-fpm to use PHP with it though.

You should at least probably look at installing php-apc from apt-get. This helps PHP cache compiled code so it doesn't have to recompile it everytime it's called.

Aside from that, nginx would likely help. One thing you could try with Apache is cutting down the number of pre-forked workers that it uses (the defaults are way too high on the Pi's limited hardware). I'd cut it down to somewhere between 2 - 5 on your load. Do this could cut down RAM usage quite a bit.
Ben Hanna
Ducky Pond
http://www.ducky-pond.com

permaband
Posts: 62
Joined: Wed Aug 01, 2012 2:14 pm
Location: uk
Contact: Website

Re: Ideas for wordpress performance

Mon Aug 06, 2012 11:15 am

of all the php scripts I use or have tested on my pi server wordpress was the worst by a mile. the problem seems to be that it is rather bloated and very poorly optimized which shows through on this performance level sadly. php caching with dynamic content is irritating as hell as you constantly have to keep force refreshing every page. it wont do much for you at this point ..

ghellquist
Posts: 58
Joined: Thu Aug 02, 2012 8:47 am
Location: Stockholm Sweden

Re: Ideas for wordpress performance

Mon Aug 06, 2012 1:10 pm

Thank you for the feedback benthepoet and permaband.

Beeing a near beginner in LAMP there is a quite a bit to learn.
I will use the Raspberry setup to learn more about performance tweaking. It is very easy to see what makes a difference, not so on a larger server. After all, right "out of the box" the site runs well enough for the actual use I am planning. Guess that I would do a "real" site differently (probably not at home).

I do run the latest raspbian.
Could not apt-get nginx, will try again.
Will also try caching php and tweaking apache2.

And yes, I look at the wordpress php code and it sure looks "interesting" to say the least (actually, I get lost quite soon). Having a lot of fun though, tweaking ahead with plugins and generally making a mess of things. That´s what the rasp is for.

// Gunnar

benthepoet
Posts: 29
Joined: Sun Oct 02, 2011 5:36 am
Location: Traverse City, MI USA
Contact: Website

Re: Ideas for wordpress performance

Mon Aug 06, 2012 4:47 pm

@ghellquist
Make sure you're typing apt-get install nginx otherwise you will get nothing.

@permaband
I don't know what kind of caching you're talking (I assume you mean client-side content caching in the browser) but installing php-apc will most certainly make a difference in PHP execution times. PHP-APC caches frequently used bits of PHP, it doesn't cache the output content. It's completely transparent to the end-user and doesn't require you to force refresh on the page (that's only for content that is cached by the browser, not the server).
Ben Hanna
Ducky Pond
http://www.ducky-pond.com

ghellquist
Posts: 58
Joined: Thu Aug 02, 2012 8:47 am
Location: Stockholm Sweden

Re: Ideas for wordpress performance

Mon Aug 06, 2012 8:14 pm

Again, thanks for the help.
Simply installing php-apc made a quite noticable difference in site speed.
Also managed to install nginx, probably misspelled something before. No time right now to test switching server, will come.

Aaah, how nice to know that I may beat up this server to my hearts content. Slowly learning to understand a thing here and there about LAMP and the billion settings possible.

Good speed // Gunnar

n00badmin
Posts: 46
Joined: Tue Aug 14, 2012 2:09 pm

Re: Ideas for wordpress performance

Thu Aug 16, 2012 4:04 am

Gunnar,

did you simply run apt-get php-apc to install?
n00badmin
CCNA JNCIA
www.n00blab.com

ghellquist
Posts: 58
Joined: Thu Aug 02, 2012 8:47 am
Location: Stockholm Sweden

Re: Ideas for wordpress performance

Thu Aug 16, 2012 5:48 am

n00badmin wrote:Gunnar,

did you simply run apt-get php-apc to install?
Yes, nothing more. Did no changes in setups (it was a bit over my head to understand what if anything to change). This made a large difference in speed.

Additionally I added wp super cache and simple enabled it on first page. A slight difference. I have tried advanced settings but this broke things in the site, a bit too complicated for me right now. Again, shows how little I understand.

Not come around to going for different web server yet. Will not happen soon as time is limited.

// Gunnar

Return to “Networking and servers”

Who is online

Users browsing this forum: No registered users and 13 guests