If you are a single person handling few WordPress sites hosted on unmanaged servers, then Apache is the robust option for you. You can always use Nginx on a small cloud server to reverse proxy the Apache server (in the way we have described in this guide). The question is not whether Nginx or Apache is better than the other. The question is about use case, documentations, easy to add new features and fault tolerance.
Does Not People Suggests Nginx Over Apache for WordPress?
Yes, some of the users suggest Nginx over Apache. Nginx is a light weight asynchronous server with easy configuration file. Most of their claims to support Nginx is biased, sometimes completely wrong.
The configuration checker unit of Apache is robust and all the errors are properly documented. If you face an odd error such as Config variable ${APACHE_RUN_DIR} is not defined, then it is easier to fix. You’ll get a lot of old answers on StackOverflow or individual tech blogs.
---
Nginx is great in certain circumstances. It is great for reverse proxy, great for serving static files, great for installing on Raspberry Pi but it is not optimum for a single dedicated server with enough DDR4 or DDR5 RAM to handle the initial request. Most of us use a CDN to handle the static files. Our question for a WordPress site is about handling PHP. When the matter is about handling PHP and optimizing SSL, Apache is more easy to configure.
There are many web servers which are better than Apache in certain things, for example LiteSpeed.
Is an Optimized Apache is Slower for WordPress with SSL/TLS?
For a WordPress site with daily 1000 to 10,000 traffic per month, there will be almost no difference between Apache and Nginx.
It is relatively easy to optimize SSL/TLS on Apache. Most of us these days use mod event and PHP-fpm.
Illustration: A modern Apache setup is illustrated by www.layerstack.com
The most reliable module for handling PHP is mod prefork but it is too heavy and slow for the high traffic websites. Nginx and Nginx Plus is great around handling a site which mainly serves static files and perform reverse proxy. Also, using Varnish in front of Apache is a good option other than using Nginx in front of Apache.
If your WordPress site has a lot of posts (above 5000) and you publish 2-3 articles per day, then no WordPress cache plugin will be able cache all the posts. The full load will be on MySQL and Apache.
The problems of WordPress can not be solved by just using Nginx. The easiness to setup Nginx becomes the problem when a site starts to face error.
Using Nginx will not dramatically make WordPress use less memory or blazing fast. You should only load the modules you need and do other configuration that will reduce the memory Apache needs. Also, Apache has caching modules for various purposes. Apache supports zillions of dynamic modules.
It is just easy to test certain thing on Apache on the fly and again revert back. You can test mod security, PageSpeed on Apache on the fly.
Nginx is good for the medium to larger companies who have enough number of experienced sysadmins and developers.
How Much RAM Usage We Can Expect For Apache and Nginx
If you face a traffic spike, then your MySQL will suck a huge RAM and sometimes CPU. If you want to blame just one software for high RAM usage, then it is MySQL.
If your WordPress site has a lot of posts (above 5000) and you publish 2-3 articles per day, use a CDN and cache plugin, then for 5000 hits per day, you need at least a dedicated server with 16GB RAM. Using Nginx or Apache will not change the story.
If you are handling a dedicated server alone, then SSH to the server at least once a day. Consider using some third party server management service for the months when you’ll be busy.