Page 1 of 1

Making WordPress faster using memcached and W3TC caching plugin

Posted: Tue Jul 28, 2020 6:10 pm
by myVesta
First we need to install memcached service.
In SSH, as root, run:

Code: Select all

v-update-myvesta
v-commander 'inst memcached'
Now we need to install "W3 Total Cache" plugin in WordPress.

After you install W3TC, download https://raw.githubusercontent.com/myves ... /W3TC.json as file to your computer.
Import that file in W3TC settings.

Re: Making WordPress faster

Posted: Thu Jul 30, 2020 7:18 am
by wpinsites
Cheers for that.

With various metrix sites throwing a little fit if browser cacheing isn't enabled, what are your thoughts on there maybe being a checkbox option with an input field for the cache expiry value, on NGINX basic options page to add it to (or remove it from) the server section of the conf?

Re: Making WordPress faster

Posted: Thu Jul 30, 2020 9:29 am
by myVesta
If you think on this:

Code: Select all

    # File cache settings
    open_file_cache          max=10000 inactive=30s;
    open_file_cache_valid    60s;
    open_file_cache_min_uses 2;
    open_file_cache_errors   off;
to be honest, I never played with that, so I would leave these default values.

Re: Making WordPress faster

Posted: Thu Jul 30, 2020 11:33 am
by wpinsites
I believe those settings are to do with the file cache on the server? I'm meaning something like this to go into the "server" config section of the NGINX conf to set browser cache expiry:

Code: Select all

    location ~* \.(txt|xml|js|css|flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg|jpg|jpeg|png|gif|swf|webp)$ {
        expires 8d;
    }
The period is arbitrary and could be set by the user via an input. Easy enough to manually add, but a fairly common thing to enable browser cacheing these days.

Re: Making WordPress faster

Posted: Thu Jul 30, 2020 11:52 am
by myVesta
but it's already 'max' - https://github.com/myvesta/vesta/blob/m ... g.stpl#L15

Code: Select all

expires        max;
max
This is the opposite of the “epoch” value. The Expires header will be equal to “31 December 2037 23:59:59 GMT”, and the Cache-Control max-age set to 10 years. This basically means that the HTTP responses are guaranteed to never change, so clients are free to never request the same thing twice and may use their own stored values.

Re: Making WordPress faster

Posted: Fri Jul 31, 2020 6:17 am
by wpinsites
So it is! :oops:

Re: Making WordPress faster

Posted: Wed Aug 05, 2020 9:31 pm
by Ominae
:shock: oooh !!!

Do you recommend this improvement, on woocommerce sites?

Re: Making WordPress faster

Posted: Wed Aug 05, 2020 10:25 pm
by myVesta
Yes, it will works without any issues.

Re: Making WordPress faster

Posted: Tue May 04, 2021 11:25 pm
by websystems
Hello

I have similar issue. VPS with 16 CPU cores and 16G RAM, hardware utilized in 10%. Apache+Nginx+Mysql+PHP-FPM7.4+CloudFlare and TTFB for WP website (good theme, some plugins, nothing special) 1,5-2sec :/ It is for the first load in the browser, then it is much faster...

Played with some options, but no luck so far. Any tips welcome :)

Re: Making WordPress faster

Posted: Thu Apr 28, 2022 9:00 pm
by maag
websystems wrote: Tue May 04, 2021 11:25 pm Hello

I have similar issue. VPS with 16 CPU cores and 16G RAM, hardware utilized in 10%. Apache+Nginx+Mysql+PHP-FPM7.4+CloudFlare and TTFB for WP website (good theme, some plugins, nothing special) 1,5-2sec :/ It is for the first load in the browser, then it is much faster...

Played with some options, but no luck so far. Any tips welcome :)
same here, 10 cores and 30 gb of ram, wp admin is sssooooooooooo slowly and sites same