Hello @patboran ,
This issue often arises from dynamically generated CSS/JS files that trigger the re-creation of the CSS/JS combination file with each request. To resolve this, it’s important to identify the files causing the problem and exclude them from the CSS/JS combination feature in our plugin. You can use the following filters to exclude specific files:
add_filter( 'sgo_css_combine_exclude', 'css_combine_exclude' );
function css_combine_exclude( $exclude_list ) {
// Add the style handle to the exclude list.
$exclude_list[] = 'style-handle';
$exclude_list[] = 'style-handle-2';
return $exclude_list;
}
add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' );
function js_combine_exclude( $exclude_list ) {
$exclude_list[] = 'script-handle';
$exclude_list[] = 'script-handle-2';
return $exclude_list;
}
For more details on using custom filters, please visit: SiteGround Custom Filters Tutorial.
Additionally, there is a cron event named siteground_optimizer_check_assets_dir that should automatically clear the siteground-optimizer-assets folder once a day if it exceeds 1000MB. You may want to verify that this event is scheduled correctly.
Typically, the contents of the /public_html/wp-content/uploads/siteground-optimizer-assets/ folder should be automatically cleared when you purge the SG cache from the admin area of the application, which helps reduce the folder’s size.
If the issue persists, I recommend submitting a Helpdesk request through your SiteGround account. Our technical team can then review the case, investigate further, and provide more detailed information.
Best regards,
Georgi Ganchev
SiteGround.com