admin管理员组文章数量:1416651
I will best explain this by showing an example
subsite URL: (site uses sub-directories)
/
correct/actual uploaded file URL:
/...
current upload file URL: (what WP is currently using)
/...
Why is WP adding the sub-directory of the subsite in a URL that is supposed to be for an uploaded file? WP uploads the files correctly, but then in both the media area and included in a post/page the URL is incorrect.
The files do indeed get uploaded to their correct location.
Things I've tried:
I was able to fix this temporarily on a site by including a redirect in my DNS, but this solution is far from universal and still doesn't actually fix the problem.
I have also set the "upload path" and "upload url path" in the network admin area for the individual site
The file and directory permission are correct
disabling all plugins also changed nothing
Using a standard theme (2019) change nothing
Further inspection:
The file URL change is happening for all included local files (css, js, etc), but these other files fork fine. They load, I can access them with and without the added subsite sub-directory.
Solution: (for now) I moved the entire uploads folder to the default location.
I will best explain this by showing an example
subsite URL: (site uses sub-directories)
https://domain/sub1/
correct/actual uploaded file URL:
https://domain/uploads/sites/1/2019/08/...
current upload file URL: (what WP is currently using)
https://domain/sub1/uploads/sites/1/2019/08/...
Why is WP adding the sub-directory of the subsite in a URL that is supposed to be for an uploaded file? WP uploads the files correctly, but then in both the media area and included in a post/page the URL is incorrect.
The files do indeed get uploaded to their correct location.
Things I've tried:
I was able to fix this temporarily on a site by including a redirect in my DNS, but this solution is far from universal and still doesn't actually fix the problem.
I have also set the "upload path" and "upload url path" in the network admin area for the individual site
The file and directory permission are correct
disabling all plugins also changed nothing
Using a standard theme (2019) change nothing
Further inspection:
The file URL change is happening for all included local files (css, js, etc), but these other files fork fine. They load, I can access them with and without the added subsite sub-directory.
Solution: (for now) I moved the entire uploads folder to the default location.
Share Improve this question edited Aug 9, 2019 at 17:39 KnightHawk0811 asked Aug 9, 2019 at 16:59 KnightHawk0811KnightHawk0811 3322 silver badges12 bronze badges1 Answer
Reset to default 0I moved the entire uploads directory to the default location.
Not sure exactly why a standard WP install can easily move the uploads folder but a multisite install causes this problem, but there it is. I removed the line in the wp-config file and also moved the directory on the server.
本文标签: uploadsMultisite subdirecty added inside URL to uploaded files
版权声明:本文标题:uploads - Multisite subdirecty added inside URL to uploaded files 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745255046a2650048.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论