Month: May 2016

WordPress: a recipe for switching from Apache to Nginx.

Posted by – Monday 2016-05-23

This blog runs on a bunch of software items, among them an instance of the WordPress content management system and a web server. For years I have trusted on the Apache HTTP server, despite I never liked it. Recently I switched to Nginx, a web server that is gaining a lot of traction, particularly among the busiest web sites [1, 2].

Why did I do this switch? For some reason unknown to me, some weeks ago Apache’s appetite for RAM memory went through the roof. None of the solutions I tested worked, including an update from version 2.2 to 2.4. Thus, I had a blog that was unusable: almost every request raised a HTTP 500 error. The following data provides some context: this blog is a low traffic one – it serves an average of 70 pages per day – and it is hosted on an inexpensive VPS that has 512 MB of RAM memory.

The solution I took was switching to Nginx, and it worked.

LEMP: Linux + Nginx + MySQL + PHP

This post is a quick-and-dirty recipe for switching an existing WordPress blog from the Apache web server to Nginx in a machine running a Debian 7 operating system. There is no original research: the instructions given here are taken from several web pages about Nginx, PHP and WordPress and put together here; and it is likely that there is room for improvement.

More…