Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1329357

    Dear Experts
    I had to do cleanups today due to shortly running out of disk space alert of my hoster and I stumbled over the /dynamic_avia directory where a lot of (temp?) files seem to be hanging around. Is my assumption correct that these are temp files? and if so, why are they left over and not cleaned by the related process? Or am I missing something here to understand who should monitor this directory (or any other Enfold related directory, which should be monitored closely)?

    best regards
    Anja

    #1329408

    Hey amollde,

    Thank you for the inquiry.

    You can actually delete everything in that folder but you have to make sure to resave the theme options to regenerate the dynamic styling and merged scripts back. The Performance > File Compression settings should be enabled. After saving the theme options, purge the cache and everything should be working as usual.

    You can also tell the theme to delete expired scripts and stylesheets by enabling the Enfold > Performance > Delete old CSS and JS files? option, which is located at the very bottom of the panel. Just make sure to toggle the cache because some of the generated files might still be in used or might still exist in the cache.

    IMPORTANT: Make sure to create a site backup and restore point before proceeding with the steps above.

    Best regards,
    Ismael

    #1330853

    Ismael!

    I built the Newsletter webpage for my company using Enfold. It’s an awesome theme! But I’m getting questions from those who monitor the server about the “dynamic_avia” directory and I want to be able to tell them what it is and how it works.

    The impression I get is that Enfold has a built in back up dynamic that creates a snapshot of your site so if anything were to go south, you would use the most recent script to restore what would otherwise have been lost.

    But you have to keep an eye on it because, while it’s a great feature, the directory can become very large fairly quickly.

    That’s what I’m thinking, but your response to amollde has me a little hesitant, as far as believing that I’ve got a solid handle on what the “dynamic_avia” folder really is.

    What is it about the directory that translates to a situation where you can’t just delete the temporary files that exist inside of it? And when you say…

    “You can actually delete everything in that folder but you have to make sure to resave the theme options to regenerate the dynamic styling and merged scripts back. The Performance > File Compression settings should be enabled.. After saving the theme options, purge the cache and everything should be working as usual.”

    …could you explain what you mean by, “resave the theme options?” How do you do that and why do you do that?

    And then when you say, “purge the cache” are you referring to the browser history or is there a setting within Enfold that I need to be aware of?

    Again, because I’m talking to guys who monitor the server, I want to be able to explain what this is. They’re a sharp group of people, but they’re also very guarded about anything that looks like it might tax the performance of our main application and that’s why I want to be sound like I know what I’m talking about.

    Thanks!

    #1331149

    Hi,

    @ brucegust: The theme only loads the latest version of the merged or compressed file. It doesn’t have a snapshot mechanism where older files can be restored at will. That option does not exist. All the other files in the dynamic_avia folder becomes invalid once the latest version of the file is generated, so you can safely delete them. The theme will just load the newest file. The name of the compressed file is stored in the database.

    …could you explain what you mean by, “resave the theme options?” How do you do that and why do you do that?

    The theme regenerates the compressed file after saving the theme options, just toggle any option then click the save changes button. The theme checks if compression is enabled, then regenerate the compressed file if it does not exist yet.

    And then when you say, “purge the cache” are you referring to the browser history or is there a setting within Enfold that I need to be aware of?

    I was referring to a plugin cache. You can set the theme to automatically delete the older files by enabling the Enfold > Performance > Delete old CSS and JS files? option but make sure to purge the plugin cache, if you are using any, to ensure that the latest merged script will be loaded.

    I hope that helps.

    Best regards,
    Ismael

    #1331177

    Ismael, we are poised on the threshold of greatness! Thanks for getting back with me!

    At the risk of wearing out my welcome, I’ve got a couple of questions that I want to pose, again, just so I can explain this to my Server Administrator sufficiently.

    1) At the risk of overlooking something obvious, when you say the theme regenerates the merged or compressed file, what IS that compressed file? I know that it’s a JS file, but what is it’s purpose and how is it generated to begin with?

    I’m thinking that anytime you make a change to the theme options, that triggers a JS file being added to the “dynamic_avia” directory. It is not a “snapshot” of the site, per se. But it does represent the most current theme settings, as far as what you’ve established as basic theme options. Is that accurate?

    I’m scratching my head here because I see in the directory footer scripts, head scripts, merged styles, gutenberg scripts as well as an enfold.css file. So, it looks like there’s more than one kind of JS file being generated when you save a theme option, yes?

    2) Imagine someone deleting every file in the “dynamic_avia” directory. Based on what I understand, the site wouldn’t come up properly. You would first have to login to the admin suite, go to the “Enfold” page where the theme settings are housed and save whatever’s there. At that point, you’ve now introduced the necessary JS file(s) in the “dynamic_avia” directory and the site will come up normally. Is that correct?

    3) How do you clear you Plugin cache? When I googled it, I saw what appears to be a plugin that you can install that clears that cache. Is that the route I need to go or does Enfold provide a mechanism that does that?

    Bottom line: Here’s the way I would explain what the “dynamic_avia” directory is to my Team…

    The “dynamic_avia” folder is a repository for JS files that capture the theme’s current settings. It’s a file(s) that’s generated any change is made to the theme’s options which is accomplished by going out to the menu option that’s represented by a “home” icon, which is the “Enfold” homepage for lack of a better way to describe it, and saving either your changes or whatever is there.

    To keep it clean, you’ve got a couple of options, all of which are healthy practices…

    – active the Delete old CSS and JS files option
    – clear every file in the directory except for the most recent ones or…
    – clear every file in the directory and then go to the Enfold homepage and save the changes that are there
    – use a plugin to clear the plugin cache to keep that dynamic from becoming a bottleneck

    Am I on point?

    #1331261

    Hi,

    Thank you for your interest in this topic.

    1) what IS that compressed file? I know that it’s a JS file, but what is it’s purpose and how is it generated to begin with?

    1.) The compressed files (css or js) in the dynamic_avia folder contain every scripts or stylesheets registered or enqueued in the site. The compressed files in the dynamic_avia folder are the combined version of those files. If you want to know more about how the files are generated, please check theenfold/config-templatebuilder/avia-template-builder/php/class-asset-manager.php file. Look for the merge function, which retrieves the enqueued css/js files via the global variables $wp_styles and $wp_scripts.

    But it does represent the most current theme settings, as far as what you’ve established as basic theme options. Is that accurate?

    No, it doesn’t. The merged files only contain the scripts and stylesheets. The theme options are saved in a different entry in the database.

    At that point, you’ve now introduced the necessary JS file(s) in the “dynamic_avia” directory and the site will come up normally. Is that correct?

    2.) Yes, that is correct. Someone has to login to the site and save the theme options to regenerate the content of the dynamic_avia folder.

    3.) It depends on the plugin that you are using. You might want to check this article for more info.

    // https://www.wpbeginner.com/beginners-guide/how-to-clear-your-cache-in-wordpress/

    Best regards,
    Ismael

    #1331444

    Perfect, Ismael!

    Thank you!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Temp files in /dynamic_avia ?’ is closed to new replies.