Increase wordpress performance

Author: zemna
Date: April 17, 2021
Share this:

configure gzip compression with NGINX

Open up the file /etc/nginx/nginx.conf

sudo vi /etc/nginx/nginx.conf

Comment that out gzip options

gzip on;
gzip_vary on;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml;

Restart NGINX server

sudo service nginx restart

Configure browser cache

Open up the site configuration file

sudo vi /etc/nginx/sites-enabled/your_website.conf

Set cache expiration to max

location ~* .(png|jpg|jpeg|gif|svg|webp)$ {
expires max;
add_header Cache-Control "public, no-transform";
log_not_found off;
access_log off;
}

location ~* .(js|css|pdf|html|swf|woff|woff2)$ {
expires max;
add_header Cache-Control "public, no-transform";
log_not_found off;
access_log off;
}
Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *

Let's connect and create
something awesome together!
2023 - Copyright, All Rights Reserved, Made by ZEMNA.NET with ❤️
crossmenu linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram