Menu Close

WordPress performance comparison – NginX vs Apache2

I examines the relative performance of each web server with WordPress to see how they compare head-to-head. Keep in mind that this is just rough comparison and suitable for wordpress user or administrator. All the time, the reasonable point is the well balanced situation & thought  in these complex real world. 

Testing method
Directly use our sites – both sites are the same WordPress, theme, plugins, hardware, contents. Only web server is different, Nginx & Apache2. Surely there are some diagnostic tools (S/W) out there, but I used pingdom and pageSpeed for its convenience and site administrator’s needs.

  • ISP : DigitalOcean VPS 2G RAM
  • Ubuntu 16.04 LTS
  • Apache2
  • Nginx
  • MySQL
  • WordPress / Twentyseventeen Theme 
  • Google adsense / analytics / monsterInsight

For last years, many WordPress administrators have suffered for its low performance with functional plugins or nice themes. So checking server http response time or related doing are very important for them, like us.

[table “4” not found /]
[table “4” not found /]

After running 10 laps, the Nginx was faster than Apache2 at 2 times, especially the server waiting time is less. The  Apache2 average total server waiting time (including page loading time) for each Lap was 4.6 second in compare to 300ms for Nginx.

[table “5” not found /]
[table “5” not found /]

Above images show all composites ratio for test web site including java scripts, images, and so on. One big difference between Apache and Nginx is the actual way that they handle connections and traffic. This provides perhaps the most significant difference in the way that they respond to different traffic conditions.  In terms of real world use-cases, one of the most common comparisons between Apache and Nginx is the way in which each server handles requests for static and dynamic content.

Apache, being one of the oldest, is the most widely used today. However, it was implemented with a scaling mechanism that can be relatively inefficient in some ways. Some newer web servers have come out in the last few years that attempt to address some of the shortcomings of Apache. The most prominent of these are Lighttpd and Nginx.

Useful resources