Plesk

Speed up sites in Plesk with nginx caching, HTTP/2 and compression

Turn on nginx caching, serve static files directly, enable gzip or Brotli, HTTP/2 and OPcache in Plesk, and check which settings actually make a site faster.

IntermediatePlesk3 min read

Plesk puts nginx in front of Apache, which gives you several free speed-ups: nginx can serve images and CSS directly, cache whole pages, compress responses and use HTTP/2. Combined with PHP OPcache, these settings often cut page load times noticeably without changing your application.

Before you start

  • Access to the domain's Apache & nginx Settings (customers need the permission in their service plan).
  • A way to measure speed before and after, such as your browser's developer tools or an online page speed test.

Open the settings

Go to Websites & Domains, open the domain and click Hosting & DNS → Apache & nginx.

Serve static files with nginx

Under nginx settings, tick Serve static files directly by nginx. Keep the default extensions list (images, CSS, JS, fonts). nginx then answers these requests itself, freeing Apache and PHP for dynamic pages. Also tick Smart static files processing if shown.

Enable nginx caching

  1. On the same page, tick Enable nginx caching.
  2. Set the Cache size (for example 128 MB) and Cache timeout (for example 5 minutes for busy sites).
  3. Keep Bypass cache for these cookies including session and login cookies (such as wordpress_logged_in and PHPSESSID) so logged-in users and carts are never cached.
  4. Click OK.

Warning: page caching can show one visitor's personalised content to another if session cookies are not excluded. Test shops and member areas carefully, or rely on the application's own cache plugin instead.

Compression

Plesk enables gzip for common text types by default. Administrators can install the Brotli support from the extensions catalog or add directives such as gzip_comp_level 5; under Additional nginx directives. Compression reduces HTML, CSS and JavaScript transfer size dramatically.

HTTP/2 and TLS

HTTP/2 is enabled server-wide in current Plesk releases when a site has a valid certificate. Check with the browser's network tab (h2 protocol). Issue SSL with SSL It! if the site still runs on plain HTTP.

PHP-side speed

  • Use a current PHP version; newer releases are significantly faster. See change PHP version.
  • Use the FPM handler and make sure opcache.enable is on in the domain's PHP settings.
  • Raise pm.max_children only if the site gets 503 errors under load; see PHP settings.

WordPress tips

For WordPress, a caching plugin plus nginx static file serving is usually enough. WP Toolkit can also apply speed-related settings. Avoid stacking several page caches – one well-configured cache is faster and easier to debug.

Measure

  • Check response headers: curl -I https://example.com. A header such as X-Cache-Status: HIT appears if you add it via nginx directives, showing cache hits.
  • Compare time to first byte before and after.

Troubleshooting

  • Changes not visible after editing: the page is cached. Lower the timeout or temporarily disable caching while editing.
  • Logged-in users see stale pages: add the app's session cookie to the bypass list.
  • .htaccess rules for static files ignored: nginx now serves those files; move rules to nginx directives. See redirects and directives.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.