Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Use Nginx with PHP-FPM in Plesk

This guide shows you how to turn on Nginx and PHP-FPM for your website in Plesk, so it can load faster.

Plesk2 min read13 steps4 screenshots

What are Nginx and PHP-FPM?

Nginx (say "engine-x") is a web server. A web server is the program that sends your pages to visitors. Nginx is quick at sending images and other fixed files.

PHP-FPM is a way to run PHP. PHP is the language behind many sites, like WordPress. PHP-FPM keeps a team of workers ready, so pages are built faster and with less memory.

In Plesk, Nginx often sits in front of Apache. Apache is another web server. Nginx handles the quick jobs. Apache handles the rest. This is called a proxy setup. Ask Hostvento support if your plan lets you change this.

Before you start

  • Take a backup. A wrong setting can break a site.
  • Know the PHP version your site needs.

Steps to run PHP as PHP-FPM

  1. Log in to Plesk.
  2. Click Websites & Domains.
  3. Click PHP Settings under your domain.
    Screenshot: Click PHP Settings under your domain.
  4. In PHP support, choose your PHP version.
  5. In Run PHP as, pick FPM application served by nginx for Nginx only. Pick FPM application served by Apache if you want Apache with Nginx in front.
  6. Click OK.

Steps to turn on Nginx

  1. Go back to Websites & Domains.
    Screenshot: Go back to Websites & Domains .
  2. Click Apache & nginx Settings under your domain.
  3. Tick Proxy mode to serve fixed files through Nginx. Tick Smart static files processing if you see it.
  4. Click OK.

If you cannot see these options, your host may have turned them off. Ask Hostvento support.

Check that your site works

  1. Open your site and click a few pages.
  2. If a page shows an error, go back to PHP Settings and try the other option.
    Screenshot: If a page shows an error, go back to PHP Settings and try the other option.
  3. Some old .htaccess rules do not work in pure Nginx mode. Keeping Apache behind Nginx avoids this.

For VPS and dedicated servers, this guide needs root access if you want to change server-wide settings in Tools & Settings. A Plesk administrator can do that under Services Management and Tools & Settings.

Screenshot: For VPS and dedicated servers, this guide needs root access if you want to change server-w
Tip: If your site uses .htaccess rules, stay with Nginx in front and Apache behind it.

Need help? Open a support ticket.

Quick recap

  • Nginx serves files fast. PHP-FPM runs PHP efficiently.
  • Pick an FPM option in PHP Settings.
  • Turn on proxy mode in Apache & nginx Settings.
  • Keep Apache behind Nginx if you use .htaccess.