Forums

blogs.dir and /wp-content/blogs.php (3 posts)

  1. honewatson
    Member
    Posted 2 months ago #

    Just wanted to find out if there is any particular reason for using /files/2008/09/myimage.jpg instead of /wp-content/blogs.dir/1/files/2008/09/myimage.jpg?

    Apart from the pretty url's is there any other reason for using /wp-content/blogs.php to serve static files?

    The reason I ask is this seemingly uses server resources unnecessarily. Nginx can serve millions of static files comfortably with low memory and cpu. By serving these files through php it dramatically lowers the amount of static files that can be served on my server, (unless I use nginx fastcgi cache).

    If there is no other reason other than pretty url's for using blogs.php then I may write a plugin to override, this feature so that statics can be served directly from nginx.

  2. fserer
    Member
    Posted 2 months ago #

    Honewatson,

    I agree with you and i think it's an interesting approach the plugin you mentioned.

    As you say, you can serve much much more static images with nginx that way. I'm using now varnish cache as a front-end to cache all the static stuff (img, css, js, ...) to reduce blogs.php requests

    Maybe for security reasons it's better not to publish the id, with those urls you'll know the id of each blog. Other problem could be if you move (export/import) a blog from one wpmu to another, the id of the blog will change, for example so the user would have to change the url of the images in the xml manually.

    in any case, i'm also interested on this :)

  3. Wuogger
    Member
    Posted 1 month ago #

    Sorry for the month-old bump, but we're running an installation that has run into the limitations of handling files in this fashion. We have many audio files that are over 90mb and pushing these files through blogs.php is creating a tremendous load on our server.

    I would like to continue using the Add from Server plugin, because it makes the process easier on my users. Honewatson, have you come up with a plugin to access files directly?

    Any other ideas?

    Thanks,
    jason

Reply

You must log in to post.

About this Topic