Making WordPress faster

Post Reply
User avatar
dpeca
Site Admin
Posts: 239
Joined: Fri Jun 19, 2020 9:59 am
Making WordPress faster

Post by dpeca »

In SSH, as root, run:

Code: Select all

apt update && apt -y install memcached php-memcached php-memcache
Then install W3TC plugin in WordPress.
Download https://raw.githubusercontent.com/myves ... /W3TC.json as file to your computer.
Import that file in W3TC settings.

wpinsites
Posts: 4
Joined: Thu Jul 30, 2020 7:06 am
Re: Making WordPress faster

Post 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?

User avatar
dpeca
Site Admin
Posts: 239
Joined: Fri Jun 19, 2020 9:59 am
Re: Making WordPress faster

Post by dpeca »

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.

wpinsites
Posts: 4
Joined: Thu Jul 30, 2020 7:06 am
Re: Making WordPress faster

Post 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.

User avatar
dpeca
Site Admin
Posts: 239
Joined: Fri Jun 19, 2020 9:59 am
Re: Making WordPress faster

Post by dpeca »

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.

wpinsites
Posts: 4
Joined: Thu Jul 30, 2020 7:06 am
Re: Making WordPress faster

Post by wpinsites »

So it is! :oops:

Ominae
Posts: 13
Joined: Fri Jul 10, 2020 4:30 am
Re: Making WordPress faster

Post by Ominae »

dpeca wrote:
Tue Jul 28, 2020 6:10 pm
In SSH, as root, run:

Code: Select all

apt update && apt -y install memcached php-memcached php-memcache
Then install W3TC plugin in WordPress.
Download https://raw.githubusercontent.com/myves ... /W3TC.json as file to your computer.
Import that file in W3TC settings.
:shock: oooh !!!

Do you recommend this improvement, on woocommerce sites?

User avatar
dpeca
Site Admin
Posts: 239
Joined: Fri Jun 19, 2020 9:59 am
Re: Making WordPress faster

Post by dpeca »

Yes, it will works without any issues.


Post Reply