PHP 5.5/Wordpress running slow

  • Posted on September 1, 2014
  • rahoulbAsked by rahoulb

I’ve got an Ubuntu 14.04 PHP 5.5 Wordpress 3.92 installation (using PHP5-FPM and Nginx).

Everything was going really well, until one of the clients created a very complex form (using Gravity Forms). He tested it on his personal dev server (Apache with PHP 5.4 and a local Mysql database) and the page loaded in about 2s - a bit slow but acceptable.

Then we copied it over to the DO server and the page refuses to load in less than 30s!

There is a load of spare RAM and originally the Mysql server was sat on a separate box, so to rule out network latency, I installed a db server locally - this has cut the time down to about 20s but it’s still way too high.

Looking at top, everything seems to be CPU bound - but I don’t understand why the (crappy) dev server would be OK and this production server isn’t. Opcache is on by the way.

Any ideas on what else I should try?

PS: I’ve installed a cache plugin, but unfortunately, most users will be logged in so I can’t rely on page-level caching (as there is user-specific stuff in the page header).

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Thanks for the suggestion.

However, I realised I was actually wrong - it was a 13.04 server, not 14.04.

Did a dist-upgrade and now it’s running as I would expect, rendering the form in less than a second.

No idea why the dist-upgrade would make such a difference, but I’m actually on an LTS release now, so I guess that plays a part.

You can try installing HHVM to speed up your PHP code. I used the following guide to install it: You can learn more about HHVM here: And you can google up benchmarks to show that HHVM executes much faster than Zend.