REDIS / NGINX caching
-
Wondering if the plugin would work on a setup where we run Redis object cache / NGINX page cache and a modified WP-rocket setup on a NGINX server.
How much does WP do and how much this plugin.
More or less related, how does this adds/interferes with pagebuilders like Elementor where you can set already different sizes (but not everybody does).
Just curious if it is worth the extra overhead.
-
Hello, my friend,
First of all what our plugin does is independent of what Redis or WP-Rocket do. So there should be absolutely no incompatibilities there.
About NginX, if you use it as your main web server, then it is totally supported, but you need to edit its configuration file manually, because it is now accessible like Apache’s .htaccess file.
If you use NginX as a caching server, then you are actually using it as a tiny CDN. In this case you need to enable the CDN support feature in the plugin settings page. Unfortunately, this mode is a bit experimental, because caching servers deliver content themselves and, thus, your WordPress installation (and consequently our plugin) does not get the chance to handle images for every request. Experimental means that a) we automatically add url parameters on images via Javascript, b) we miss CSS background images and c) we might miss very few images that might get the chance to load in full size before our Javascript runs. We understand this is a drawback, but caching is… caching and CDNs are… CDNs.
Now, about your last question, the answer is that it depends. But the truth is that one cannot always rely on using the img srcset attibute in order to load smaller image sizes per device. WordPress itself and plugins like Elementor use WordPress thumbnails for this and WordPress thumbnails are not optimised per device size and also they might be cropped. So the Adaptive Images plugin will make sure that all your images are dramatically downsized uniformly, even if they do not use the img srcset attribute.
As a conclusion, from all the above, I guess the only thing to actually care/worry about is how to integrate the Adaptive Images plugin with a caching server like NginX or a CDN. The rest seems to be pretty streamlined so far.
Let me know if I can help any further!
Cheers,
TakisThanks for the explanation. Indeed we run a full NGINX server and use it for page caching too.
We added the suggested directive, switched the CDN option on and off but couldn’t make it cache.
I love the concept of the plugin and we focus on speed with our server setups. Would be great to make it work together.I would love to be able to test and debug your setup if it is possible. NginX is indeed a very important server and I always seek to cover all possible situations.
Is there a demo website that I could check?
Also, if there is the option of giving me FTP access to a demo installation, then I could also debug this first hand. Feel free to email me at info [at] nevma [dot] gr.
Cheers,
TakisDue to the European GDPR rules I can not give you access to our (dev) sites since they contain customer data. But I have setup a test site on the same server and will send you a login. The fact that you talk about FTP tells me you are not very security aware so SSH or SFTP (restricted by IP) will not happen but I am happy to change files for you.
Setup is simple:
Classicpress alpha with Oxygen 2.1 WP-rocket, NGINX cache (left Redis out here)
NGINX directives for adaptive images added to the setup.
As you can see here om GTmetrix
Everything is OK except for the logo I made 1024×2014 (on purpose)
No smush or other optimizer added, no settings in CP changed except for the permalinks.
Cache dir is not made and no errors in the logs.If we find something I will post here for people who follow this topic.
Well, we do not need GDPR to respect customer data now, do we? 🙂 This should go without saying. A staging website would do just fine!
But I think you misunderstood me when I asked for FTP access. This was not to be taken literally. I assure you I am more that quite security aware. Think of it this way: my plugin accesses a WordPress files and then delivers them to the web. Actually, one has to be super security aware, in order to take all the necessary precautions that no sensitive files are leaked. For instance the wp-config.php, or the .htaccess or even files outside the WordPress installation!
Anyway, this is besides point. Without file access I cannot debug anything and I cannot make changes to the NginX configuration file which is usually the issue with NginX installations. I will totally respect it if you do not wish to give me access, but there is no other way really. And, all in all, it is still supposed to be a staging website with nothing sensitive in it, right?
Cheers,
TakisStaging website but live server with a lot of websites. Changing NGINX directives would need service restart / reload and we cannot do this.
I will mail you the current directives, if we need to change something we can prepare and I will reload at night.Interesting puzzle.:-)
Hello, @zebrahosting,
Have you had any updates on the issue? Would you like us to start looking at it from scratch with a fresh start? We are here any time you wish! 🙂
Cheers,
Takis
The topic ‘REDIS / NGINX caching’ is closed to new replies.