Support » Installing WordPress » Pros/cons of using nginx? Questions for people who know nginx WordPress

  • Hi –

    I’m moving to a dedicated host from a VPS because of load issues, and considering a switch to nginx in the process. I’m not an experienced server admin – when I need to do anything with a server, I just find instructions online and follow them. Nginx is appealing for the performance upgrade, though I’m concerned that I might be in the dark when facing any issues with it.

    To those in who know something about WP + nginx – how easy is this to setup and maintain? What are the issues you run into when using WP + nginx? I’m using BuddyPress, with multisite/subdomains – anyone out there happily using a similar setup on nginx? Do you consider the performance upgrade truly dramatic enough to warrant moving from Apache?

    Thanks. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Andrew Nacin


    I’m currently using nginx for If you’re not an experienced server admin, I would consider sticking with nginx as a frontend proxy for Apache, ideally set up to handle microcaching.

    What this means is that all requests would go to nginx, and if it can’t handle it (as would be the case for anything non-static, depending on how you configure it), it would use a try_files statement to pass everything to Apache.

    Microcaching is a really interesting concept that is easiest to do in nginx when you’re using nginx as a proxy. Essentially, nginx will create a temporary page cache and serve it if the same page is requested again within, say, 5 seconds. It’s very, very efficient. If a single page gets nailed, nginx can serve it at thousands of times per second, and Apache won’t notice much. You could scale up a VPS very easily with this.

    But instead of asking “nginx?” I think you should ask “Why can’t my server support the load?” Focus on the problem, not the solution. Given that you are running BuddyPress and multisite, you absolutely should be configuring a persistent object cache, such as APC or Memcached. Do you need more memory? Are your CPU load averages through the roof? What kind of load is your site getting? Is it steady traffic across the site, or is it at peak times for particular pages? Anonymous users, or logged-in users (which means less opportunities to cache)? Lots of questions.

    Awesome – thanks so much for the pointers, I’ll see where I can go with this. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pros/cons of using nginx? Questions for people who know nginx WordPress’ is closed to new replies.