dqtl46964 2012-06-07 14:08
浏览 27

Wordpress网站,如何为所有网站使用一个文件夹?

I have a multi site network wordpress blog. There are the following sites

domain.com
domain.com/blog2
domain.com/blog3

When I upload files for domain.com they will be in domain.com/media. That is how I want it. But when I upload files for blog2 (or blog3) they will be in domain.com/blog2/files/ (or domain.com/blog3/files/). I can change the file folder for every site in site settings (admin - settings - miscellaneous). I also was able to set not to use the upload date and everything, but regardless what I do, the files will be in /blog2/files (I entered an other folder: /media).

How can I archive that all files will be stored in domain.com/media and all sites are able to choose the files from there?

  • 写回答

1条回答 默认 最新

  • doutanghuan9595 2012-06-07 14:22
    关注

    Just tell Wordpress to store the medias files in an absolute folder.

    Go to <kbd>Settings</kbd> > <kbd>Medias</kbd> > <kbd>Uploading Files</kbd> and paste the full absolute path corresponding to domain.com/media (where it says "Default is wp-content/uploads")

    It can be something like /var/www/domain.com/media e.g, it really depends on your hosting. Obviously it should be readable/writable as well.

    Hope this helps !

    评论

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用