Nginx - Enabling Browser Caching - nginx

I'm no expert on this subject and the server isn't managed by myself but I've tried to setup W3 Total Cache on a WordPress site which is running via Nginx.
W3 Total Cache has created an nginx.conf file in the following location:
/var/www/domain.com/public/nginx.conf
Nginx has been restarted but the browser caching rules don't seem to be applying.
Can anyone shed any light on why this isn't working or what I'd need to look for?
Any advice would be greatly appreciated. If you have any questions or need further clarification on anything, please let me know.
Thanks in advance!

Related

How to fix cache miss header on litespeed?

can some one help me please fix this issue ? iam using wordpress with openlitespeed and cyberpanel
litespeed headers
Thanks
i'm expecting to see cache hit

Why is the www version of website not working properly?

I'm facing a problem with the following website: https://www.rhythmandstrums.ie/
When I open the "www" version of it: https://www.rhythmandstrums.ie/ I get a bugged website, failing to open stylesheets and possibly other file sources, whereas if I open the website without the "www", everything works as expected: https://rhythmandstrums.ie/
Some considerations:
This website is hosted in a Wordpress Multisite, so it shares the same configuration files as other websites, none of the other websites have this issue. So I was wondering if this could be a problem with redirection, although, again, none of the other websites have this problem and they share the same config files (including server block settings and such, it is in nginx).
I have checked the DNS values and nameservers and everything looks fine (I took base from all the other websites that were set up in the same way, I can post a screenshot if it might be of help).
This error also seems to happen in the Wordpress backend, with the admin dashboard not being able to load parts of plugins, it seems like it is looking where it doesn't exist.
I have replaced instances of the www version of the url in the database, as I do with other websites as well, but that didn't seem to fix the issue.
I have cleared cache a few times (both in the cache plugin and manually in the nginx server - manually deleting the contents of the cache folder), and since this has been going for a long time, I don't know if this is cache related, but any suggestion is highly appreciated. Again, all the configs, included the cache plugin settings are the same for all the other websites in the network, which none are having this issue.
If I inspect the console when I'm accessing both versions of the website, www and non-www it seems like it's trying to pull information from different locations, but I can't figure out why it's doing that.
Guys, I hope this was not confusing, but let me know if you you would like to see screenshots or other info that might be relevant. Thanks so much in advance, I really appreciate it.

Wordpress core file changed

I get an alert from wordfence that one of the Wordpress core files has changed. Its about wp-login.php
Some lines about cookies were #commented since the 23th. See image.
I asked my hoster about it if they did it, because i have a running support ticket about woocommerce,varnish and cookies with them.
But they say they don't know.
Now i'm wondering are there plugins that edit core files? and what is the #commented code about?
So that i have a better understanding where i'm standing in this situation. I dont think i'm hacked. But any advice would be helpful.
compared files wordfence screenshot

WordPress - How to get PageSpeed 100/100

I want to increase my PageSpeed score, I tried W3TC but it doesn't help much. Does anyone have a better solution?
Thanks
W3TC alone is not enough. I highly recommend you to setup CloudFlare, simply because you will benefit from free cdn service that is going to reduce so much bandwidth hit on your website; Resulting into fast page loading.
Also if you are on a dedicated/VPS server you must install Redis on your server and then install redis plugin which is available on wordpress plugins directory.
Here are tutorials that I have used for so many of my clients:
REDIS SETUP FOR WORDPRESS: https://www.digitalocean.com/community/tutorials/how-to-configure-redis-caching-to-speed-up-wordpress-on-ubuntu-14-04
CLOUDFLARE SETUP: https://www.youtube.com/watch?v=6NPSFZI3TTo
I suggest you the following combination:
wpsupercache
autoptimize
tinypng
cloudflare
changes in htaccess
changes in wpconfig
changes in functions.php
advantage: free and no costs
disadvantages: time effort for optimal settings.

An Unexpected HTTP Error occurred during the API request in wordpress

I get this error on my wordpress blog hosted on my server each time i search for plugins or try to upgrade wordpress and on the dashboard. I have tried changing the timeout from 5 to 30 in the http.php file in wp-includes. This did NOT help. My blog works perfectly fine. This problem is really annoying as I have to manuall copy plugins and themes and upgrades.
I had this problem the other day. It was due to my server's firewall settings not allowing outbound connections to port 80 (which is what the Wordpress plugin install stuff uses)
I just restarted the firewall and fail2ban (to be sure) and it started working.
Is your web server behind a firewall?
It seems that your host can't see the WordPress server in order to query it for searches and updates. This will be because of some configuration of your host or its network, controlled by your hosting company.
Raise a support request with your hosting company, telling them that your hosting machine has a problem connecting to api.wordpress.org (which is almost certainly the server you're having trouble connecting to) and asking them to look into the problem.
You may have more luck asking on ServerFault; this isn't really a programming question.
I had the same problem and it drove me mad!! The issue was actually in /etc/php5/apache2/php.ini and nothing to do with the time out problem everyone is going on about (for me at least) I was convinced it wasn't a time out issue because I was presented with the problem immediately upon requesting the download, so here is the solution and I hope it helps others:
sudo nano /etc/php5/apache2/php.ini
change: allow_url_fopen = Off
to: allow_url_fopen = On
Then restart apache server: sudo /etc/init.d/apache2 restart
If I'm honest, I'm at a bit of a loss. I googled the error and there seemed quite a few resources on it (admittedly most suggesting the timeout fix). But I did find a comment that might help?
What's your PHP memory_limit? I recently ran into problems when enabling plugins as my limit was set to 24M, upping it to 64M solved all the problems.

Resources