How to switch to Nginx from Apache!

Currently I am hosting my site on 8GB memory plan with Wordpress in ServerPilot,whenever my site hit 500+ visitors my CPU goes beyond 80% .

i)Is it normal for CPU to reach 80%+ whenever the visitors reaches 500+ in 8GB memory?

ii)I am searching for an answer to counteract this problem and I have read that NGinx is better than Apache for performance plus squeezing out more number of visitors,so I am planning to switch to Nginx but I have no idea how to get started .So far all the tutorials I have read speaks of installing Nginx in a newly created droplet not for switching from APache to Nginx.I have also contacted the serverpilot support team and they said “they cannot provide any assistance for an Nginx-only stack” ,well I am lost!

Will anybody kindly help me!! any good tutorial link on “how to switch from APache to Nginx” in a live site will be appreciated.

Thank you.

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.

I stopped using Apache w/ WordPress some years ago and have had no issues.

Keep in mind that there are some trade-offs that you will need to keep an eye out for. For example NGINX does not read your .htaccess file(s) so any plugins relying on this will not work entirely. I am not to sure if there is a way to change this functionality as I have not considered looking at this time.

You could consider an architecture change and run NGINX in front of Apache and leverage caching or look at using Varnish.