WordPress.org

Forums

Advice on directorystructure of site (6 posts)

  1. Jack
    Member
    Posted 10 years ago #

    I'm trying out WP, to use it instead of MT. I installed it and imported my MT entries which worked fine. But now I have two questions about the placing of files.
    1. In MT I had my pages ánd images stored in http://www.mysite.nl/weblog/archives/2003/200302/200302.html and the corresponding images/swf + extra html-pages + subdirectories in that same folder. So everything stored by month. All the embedded images and all the rest within the entries is linked this way via an absolute url. So in the manner of http://... etc. etc. At this moment it works reasonably good because I still have the MT-site running and that directorystructure intact. I cóuld move the entire set of directories to the new wpweblog/ which in the end will be renamed to "weblog", thereby replacing the old weblog. On the other hand I could work a day on correcting the links to a more futureproof system. At this moment I only have about 200 post (most of them including images or swf).
    Any advice on this?
    2. My second question is about the same thing. I will have a directorystructure of http://www.mysite.nl/weblog/ for my indexpage, and http://www.mysite.nl/weblog/wordpress for my wp-files. If I wanted to make this installation futureproof, what's the best way to keep track of my images etc.? Everything in one folder? Like http://www.mysite.nl/weblog/images? This can become I huge folder! And what about extra html-pages? And linking everything relatively instead of absolutely?
    I also ask this because I don't understand how the permalinksystem works. I read something about wp uses links like http://www.mysite.nl/weblog/2003/02/etc. for it's permalinks. Would this mess up the links I have in my posts?
    I'm really sorry for all these questions. But I quess all of them are about the same thing, filing. And I didn't find an answer elsewhere yet.
    Thanks

  2. Ozh
    Member
    Posted 10 years ago #

    Dont know about MT so I'll skip the first part.

    As for your second question, my advice would be :

    - yes, keep everything simple, that is all images in one dir, all swf in another dir, and so on. Of course this can get quite big, but painless. The web server doesnt care if there are 500 files in a dir, and the user isn't supposed to crawl that dir, so as I understand it, it's ok.

    - linking relatively can lead to errors especially with permalinks, read below

    - how do permalinks work ? Physically, there is no directory structure : one index.php, and posts in an sql base. No other files.
    If you want permalinks to be like /archives/2004/05/08, all it does is redirecting this request to index.php?year=2004&month=05&day=08
    So, when your index.php refers to a file, say, "images/image.gif" (relative link), from "archives/2004/05/08" this relative path becomes "archives/2004/05/08/images/image.gif", which is not correct and thus wont display the image.
    So, my advice would be : link everything absolutely from your wordpress home dir.

  3. Jack
    Member
    Posted 10 years ago #

    So suppose I would make the permalink structure the same as within my MTweblog, which is actually "/archives/200302/", could this work? The permalink would then be "/index.php/archives/%year%%monthnum%/". Would this cause WP to serve the right page? For the links within the MT entries this would be perfect, because all the links would remain intact and I could continue to upload my images etc. in that same manner, so physically within directories called "archives/200406/" etc.

  4. Ozh
    Member
    Posted 10 years ago #

    Well, as I said I don't know MT, but yes, I think old links would then remain correct.
    Note that "/index.php/archives/%year%%monthnum%/" is not a "permalink" : in WP it's not pointing to *one* post, but to posts written this month and year. A permalink, i.e. pointing to one particular post

  5. Jack
    Member
    Posted 10 years ago #

    So this wouldn't work after all. Because it would always point to a month and not a particular post. Damn! The switching is not as easy as I hoped for. :(

  6. awh
    Member
    Posted 10 years ago #

    I would "futureproof" now. All the images, swf's and other kinds of binary content should really be in their own folder. If you have a lot of that stuff, you can subdivide it. That way each image has a true permanent, absolute link.
    If you have a lot of images, use subdirectories. You can even divide it up by month, like you're used to. It will just require that you create the subdirectories manually. A good FTP client (like WS_FTP) is capable of this.
    So you're images folder might be:
    /image/200302/pic.png
    /image/200302/pic2.png
    and so on.
    When you link to images or swf's within the blog, do some from an URL like this "/image/pic3.png" for example. Don't put in your http://www.example.com address. That way if you ever move into a new domain, all your local image links will still work.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.