• Resolved portantica

    (@portantica)


    Good evening,
    first of all with the adoption of FVM I have greatly improved the performances verified in Gt metrix, but I have a problem and I ask you for help in this regard; I immediately noticed that the Backups increased in size even slightly, but progressively and that the FVM cache is always large.I tried to exclude the dynamic URL through the IGNORE list, but the requests increased and the site performance decreased so I went back to the previous setting. What do you advise me to do? Thank you and greet Vittorio

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Raul P.

    (@alignak)

    The cache will grow depending on several factors, for example:

    a) If you are dequeueing or adding different css / js files in each page, that means, each page has different set of files to merge. It’s best to leave all files in their places (the default) so that they stay consistent across pageviews. It’s more efficient to have one big file that can be cached on the user browser, than to have your users download a different css and different js file on every page, even if those are smaller.

    b) One of your css or js files is being generated by a php file (not a static file). This means, the file name, query or content could be changing in every pageview, thus creating a new set of files to be merged. Even if one character changes on the whole set, FVM has to rebuild a new cache just for that page.

    c) Some css or js file was added inlined, as a children of a file and that code is changing on every pageview. Some editors create css classes that have random names and they change on every single pageview… so those cannot be merged.

    A possible solution is to use a page caching plugin with a long expires period (not always practical) or exclude the files via the ignore list. Those are usually poorly coded and shouldn’t be dynamic in the first place… but it was your choice of plugin or theme that lead to it.

    Another better alternative would be to replace the plugin causing it, or hire a developer to make it static.

    Yet another possible and easier alternative, would be to set a cronjob to purge the cache daily via wp-cli, if disk space is a concern.

    For cpanel or similar hosting, something along these lines:
    0 1 * * * /usr/local/bin/php -d suhosin.executor.include.whitelist=phar /usr/local/bin/wp --allow-root --path="/home/yoursite/public_html" fvm purge >> /home/yoursite/public_html/fvm.cron.log.txt

    Just make sure to have the correct paths or ask your hosting to add it for you. This will run daily at 1 am. The -d suhosin.executor.include.whitelist=phar may or may not be needed, depending of your server.

    • This reply was modified 4 years, 6 months ago by Raul P..
    Thread Starter portantica

    (@portantica)

    First of all thanks Raul,
    I state that I do not have training as a creator and developer as yours therefore, I have some difficulty understanding what you would advise me, I will try to study what you advise me and if I have difficulties or questions I hope I can disturb you again, for now thanks endless, Vittorio

    Plugin Author Raul P.

    (@alignak)

    Yes… but you can ask your hosting to setup the cronjob, if space is very limited. Just point them here and they will know what to do.

    0 1 * * * /usr/local/bin/php -d suhosin.executor.include.whitelist=phar /usr/local/bin/wp –allow-root –path=”/home/yoursite/public_html” fvm purge >> /home/yoursite/public_html/fvm.cron.log.txt

    Thread Starter portantica

    (@portantica)

    Well Raul and thank you,
    I was already immersing myself in the problem to understand what to do, but it seems to me that you advise me to take this step immediately. Will this also limit the growth of the weight or size of the site? Thanks again Vittorio

    Plugin Author Raul P.

    (@alignak)

    That cronjob will simply delete and refresh all cache daily. It’s the easiest possible method that doesn’t require a developer auditing your site, as the cache will never grow older than 1 day.

    It doesn’t change how the cache grows, but it will limit the total cache to 24 hours, so it won’t fill up your disk in the long run.
    You could also change this to once a week for example… just tell that to your hosting and they can adjust the cronjob accordingly.

    Thread Starter portantica

    (@portantica)

    Thanks Raul,
    I just forwarded a ticket to my hosting service Netsons, explaining what you told me about and recommended, I await an answer from them and in the meantime, I thank you warmly, for the timeliness in responding, patience and competence, I will do to know, for now thanks again Vittorio

    PS: I use the google translator so I could also write in English in a comic way,

    Thread Starter portantica

    (@portantica)

    Sorry again Raul,
    how would you recommend me to configure, in my specific case, the basic settings and special exceptions FVM? Any particular choice? Thanks Vittorio

    Plugin Author Raul P.

    (@alignak)

    It would depend on your site. Each site works differently, so it’s by trial and error. You can try different options and see what works best for you. Just beware of deferring js scripts, because not all sites support it.

    You can look into google chrome console log for errors, but for fine tuning, you may need to hire a developer.

    Thread Starter portantica

    (@portantica)

    Ok Raul thanks,
    there is something that worries me a little, my site every time I check from wordpress or from the size of the backups increases in size even without adding photos, this can be attributed in your opinion only to the cache files? Before installing FVM it never happened … Vittorio

    Plugin Author Raul P.

    (@alignak)

    The backup size can increase from many sources and plugins, including database logging by some other statistics plugin, another page caching plugin also creating page cache files, etc.

    I don’t know the origin of the cache growth, but since you opened this topic, I assumed you already know it’s the fvm cache that is growing.

    You can configure your backups to exclude the cache directory, most likely.
    You don’t need to backup caches ever, as those can be deleted anytime.

    Thread Starter portantica

    (@portantica)

    Raul !,
    This is a very good idea! See how you can learn from those who are competent! Exclude cache backup from backups! This is done on the server side, if I usually make backups on the server, I guess? Therefore I will have to ask the hosting service? thanks always for your availability, Vittorio

    Thread Starter portantica

    (@portantica)

    Good evening Raul,
    I’m sorry to have patience, I’m still here to disturb you to ask you one more thing that I would like to understand; after installing your FVM Plugin, I am faced with a fact I was not used to. Before this installation, my site grew in size if I added files for example images and decreased if I removed an image; now every day the installation increases in weight even if I don’t add anything, is there a limit ie a maximum weight and size beyond which the site will no longer increase? Or this increase in size is completely natural while cleaning the cache and not adding anything? Thank you and apologize, but I would like to understand, thank you Vittorio

    Plugin Author Raul P.

    (@alignak)

    It’s explained in the faqs:
    https://www.ads-software.com/plugins/fast-velocity-minify/faq/

    Basically, either your theme or one of the plugins you use, makes use of anonymous functions on wordpress (I call it lazy, as long as it works development), so whenever you refresh the page, it generates new css class names.

    This causes FVM to see different code everytime, and to regenerate cache every page view.
    If that changing code is inside an external php file, we can use the ignore list.
    If it’s inlined (common with Divi for example) you cannot merge or minify some of it’s code.

    If your site has low traffic, do not worry much about it.
    But if you have a lot of traffic, a developer needs to look into it in more detail.

    You can use page cache to prevent this, as I explained earlier.
    With page caching, the whole html doesn’t change for a while, thus the cache won’t grow.

    Thread Starter portantica

    (@portantica)

    Raul good morning,
    and first of all thank you for the patience you are using with me! My site had a maximum of 80,694 monthly hits this year and 7199 different monthly visitors.
    Do you consider these significant numbers of high or low traffic? Thanks again Vittorio

    Plugin Author Raul P.

    (@alignak)

    depends on what you benchmark it against… for me, I don’t think it’s too much that you need to worry, but you should still install a cache plugin.

    For my case, this is what I call high traffic (one of my sites):

    View post on imgur.com

    I still recommend wp rocket with everything disabled under the file optimization, or the cache enabler plugin (free).

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Constant increase in site size’ is closed to new replies.