Title: Multisite Cache Handling
Last modified: May 16, 2023

---

# Multisite Cache Handling

 *  Resolved [Galfom](https://wordpress.org/support/users/galfom/)
 * (@galfom)
 * [3 years ago](https://wordpress.org/support/topic/multisite-cache-handling/)
 * First off I do have a multisite network with some twenty sites but those are 
   all clubs and family & friends stuff and zero business so the price range of 
   pro is way out of question (tbh I probably wouldn’t even pay 20 bucks/year for
   all sites combined and my limit would probably be 20 bucks/lifetime since it 
   is only volunteering and even there I’m not sure 😏).
   Anyways, in return I don’t
   mind some hassle and usually stick to doing things with just some custom code
   and/or workarounds. However the ugliest of those workarounds currently is a WP
   admin backend hook that just disables the cache management buttons since those
   always clear the whole cache folder. Obviously hooking into the plugin would 
   enable nicer workarounds but would not be as update-stable (though the JS approach
   isn’t as well 😆).So having at least site id based cache folders even in the 
   free version would be nice. I can understand if this contradicts your monetization
   strategy but since I assume most WP installation are private and not business
   related even/especially the multi sites (since I would get gray hair if would
   need to install a new WP instance for every friend asking to host something just
   to not care about it 4 weeks later and there are probably a lot people like me
   out there) I thought I mention it. Feel free to ignore it or not 😎

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [3 years ago](https://wordpress.org/support/topic/multisite-cache-handling/#post-16744370)
 * Hi!
 * You’re right! The free version of OMGF doesn’t support Multisite, but I’ll give
   you a code snippet to make it work, as long as you promise you won’t tell anyone:
   😉
 * Put this code in your theme’s `functions.php` or in a custom plugin:
 *     ```wp-block-code
       add_filter( 'omgf_upload_dir', [ $this, 'rewrite_upload_dir' ] );
       add_filter( 'omgf_upload_url', [ $this, 'rewrite_upload_url' ] );
   
       function rewrite_upload_dir() {
       	return wp_upload_dir()['basedir'] . '/omgf';
       }
   
       public function rewrite_upload_url() {
             	return wp_upload_dir()['baseurl'] . '/omgf';
       }
       ```
   
 * This code is fully update proof.
 * Enjoy!
 *  Thread Starter [Galfom](https://wordpress.org/support/users/galfom/)
 * (@galfom)
 * [3 years ago](https://wordpress.org/support/topic/multisite-cache-handling/#post-16745634)
 * 😘

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Multisite Cache Handling’ is closed to new replies.

 * ![](https://ps.w.org/host-webfonts-local/assets/icon-256x256.png?rev=3300821)
 * [OMGF | GDPR/DSGVO Compliant, Faster Google Fonts. Easy.](https://wordpress.org/plugins/host-webfonts-local/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/host-webfonts-local/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/host-webfonts-local/)
 * [Active Topics](https://wordpress.org/support/plugin/host-webfonts-local/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/host-webfonts-local/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/host-webfonts-local/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Galfom](https://wordpress.org/support/users/galfom/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/multisite-cache-handling/#post-16745634)
 * Status: resolved