View Categories

How Infinite Uploads Handles WordPress Multisite Uploads

2 min read

WordPress Multisite is a powerful feature that allows you to run multiple websites from a single WordPress installation. Each site in the network, known as a subsite, can have its own content, users, and settings. However, when it comes to managing uploads, Multisite has a specific file structure that needs to be handled carefully, especially when offloading to cloud storage.

Infinite Uploads is designed to seamlessly integrate with WordPress Multisite, ensuring that your uploads are offloaded to the cloud while maintaining the integrity and isolation of each subsite’s files. In this article, we’ll explain how Infinite Uploads manages uploads in a Multisite environment.

CDN URL in Multisite #

In a WordPress Multisite network, all subsites share the same root CDN URL when using Infinite Uploads. This means that regardless of which subsite a file is uploaded to, it will be served from the same CDN URL. This unified approach simplifies management and ensures consistent performance across the entire network.

File Structure in Multisite #

WordPress Multisite organizes uploads in a specific directory structure:

  • The primary site (Site ID 1) stores its uploads directly in /wp-content/uploads/.
  • Each subsite has its own directory based on its site ID. For example:
    • Subsite with Site ID 2 stores uploads in /wp-content/uploads/sites/2/.
    • Subsite with Site ID 3 stores uploads in /wp-content/uploads/sites/3/.
    • And so on for other subsites.

This structure ensures that each subsite’s uploads are kept separate from others, preventing file conflicts and maintaining organization.

How Infinite Uploads Offloads Multisite Uploads #

Infinite Uploads offloads the entire /wp-content/uploads/ directory to its cloud storage, including all subsite directories under /sites/. Here’s how it works:

  1. Mirrored Structure: When offloading, Infinite Uploads mirrors the exact folder structure of your Multisite installation in the cloud. This means:
    • The primary site’s uploads are stored in the root of the cloud storage.
    • Each subsite’s uploads are stored in their respective /sites/[site_id]/ directories.
  2. Preserved Isolation: By maintaining the same directory structure, Infinite Uploads ensures that each subsite’s files remain isolated and organized, just as they would be in a standard Multisite setup without offloading.
  3. Seamless Integration: When a file is requested from any subsite, Infinite Uploads dynamically serves it from the correct location in the cloud, using the shared CDN URL. This process is transparent to both the site administrators and visitors.

Submit a Comment

Your email address will not be published. Required fields are marked *