New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multisite issue with main site #111
Comments
I can provide a pull request, but would appreciate your input on which directory should be used for the main site. Options I see:
Suggestion for Option 3:
Possible cases to be covered:
|
I believe |
No, that won't solve the problem. As far as I understand, the ´!is_network_admin´ is required to avoid that the %site_id% is replaced when you're on the Network Admin screen. See my suggestion above. I would think that covers everything. |
@JonasBrand that last option works for me! If you're willing/able to submit a pull request, I'd be glad to review and merge. |
Fixes #111: Multisite issue with main site
When using WP Document Revisions in a multisite installation, there are issues with the uploads folder setting when using the plugin both on the main site (usually site with ID = 1) and on other sub-sites.
This is how the uploads folder is set by default for multisite installations:
Your first site on a fresh install will put uploaded files in the traditional location of /wp-content/uploads/, however all subsequent sites on your network will be in the /wp-content/uploads/sites/ folder, in their own subfolder based on the site number, designated by the database. These files will be accessible via that URL.
Source: https://codex.wordpress.org/Multisite_Network_Administration#Uploaded_File_Path
When I set the uploads path in the WP Document Revisions network-wide setting to
"[PATH]/wp-content/uploads", it will work on the main site but not on other subsites.
When I set it to "[PATH]/wp-content/uploads/sites/%site_id%/", it won't work on the main site but on the other subsites.
The text was updated successfully, but these errors were encountered: