Hello @tatjanaostalceva ,
1. Do I need to paste this code twise, first time to nginx.conf, second time to the http or inside server section?
Http and server section is part of the nginx.conf. When you open then nginx.conf file you will see those parts:
https://www.nginx.com/resources/wiki/start/topics/examples/full/
So depending on how your nginx.conf looks you will paste that code between:
http {
}
or
server {
}
If you still have issues with that I suggest contacting your hosting provider and ask them to help.
kind regards,
Kasia
Okay, now I understand that I need to paste this code only once. but could you please explain step by step, click by click, what I need to open, and where I open it, in wordpress dashboard, or in my hosting, and what kind of document I should look for, and where exactely do I put this code? Between tags and brackets – it can be a large space, I need to know the line.
I reached to my server support and they told me that your plugin supposes to change settings for all server, which is impossible, because they provide hosting for many sites and they can’t impose my private settings to all other sites. Is this true, do you want me to change settings for the whole server?
Hello @tatjanaostalceva
I hope you are doing well!
The code that is provided in Hummingbird is a widely used code to enable Browser Caching and it needs to be added to a server’s configuration file, which is only one. When it will be added to the server’s config file, it will apply for the whole server. If you have other sites n this server, other sites will have Browser Caching enabled too, if this is how your server is setup.
You can add the code inside the server section in the file. So for example, look for a line that starts with server:
server {
listen 80 default_server;
listen [::]:80 default_server;
Add the given code inside the existent server block.
Based on your reply though, it looks like you are on shared hosting and do not have access to the server’s config file. If that is the case, please contact your hosting provider and ask them to enable Laverge Browser caching for your site.
Kind regards,
Nastia
Well, my server support refused to make changes to their settings, but they offered me to set up browser caching through hp.access file, adding there the following code:
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType text/html “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType text/x-javascript “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresByType image/x-icon “access 1 year”
ExpiresDefault “access 1 month”
</IfModule>
## EXPIRES CACHING ##
I changed all terms for 1 year where it was set up for 1 month, and after I pressed re-check status, your plugin showed the required settings were working. Could you please check it on your side, to make sure that there are no mistakes?
Hello @tatjanaostalceva
Yes, the snippet looks good! :thumbup:
Take care,
Dimitris