Support » Networking WordPress » How to 'change blogs.dir subdirectories name'

  • Resolved Fabien Schiettecatte

    (@adam-breit)


    Hello,

    I would like to know how I could change the blogs.dir subdirectories names, from 2 to domain.com and 3 to domain.be etc etc…

Viewing 15 replies - 1 through 15 (of 22 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    You don’t. They’re directly tied to your blog ID. And since no one but you sees them, why do you care?

    Allright,

    So is there a way to change the blog ID? I know how to change the DB so it is wp_domain_ instead of wp_2_, and the blogs.dir subfolder would have to be blogs.dir/domain instead of blogs.dir/2.

    Anything else that is tied to the ID?

    I’m thinking it *is* quite a hassle, if even possible, but I am used to using FTP to upload files to my client’s websites, and now it its 2 – 3 – 4 – 5 – 6 – 7 – 8 … which can get quite confusing.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    DO NOT for the love of monkeys change the DB TABLES!! I will rap your knuckles with a ruler! 😀

    Ahem.

    but I am used to using FTP to upload files to my client’s websites, and now it its 2 – 3 – 4 – 5 – 6 – 7 – 8 … which can get quite confusing.

    You don’t use FTP for those folders in WordPress.

    I know, it’s weird, but you don’t do it. You use the media uploader to upload media, per site. if you have SHARED media, you would upload it to a shared location (like I’d put it in domain.com/content/) and link to it there.

    About the DB;

    I actually, succesfully, migrated old single-install websites to my network by doing a str replace wp_ with wp_ID_ where ID was the ID of the website I assigned (or the network assigned) to it.

    About the Media uploader;

    Well the Media uploader is fun and nice & all that jazz, but it just doesn’t do it for me, if I need to upload .html for a mail backup (click here to watch this mail online) or do some other old fashioned stuff, I like to do it with ftp. Also I feel it is easyer to upload big video/audio files this way.

    Perhaps it is my need to control the mapping and keep it tidy. When I use the GUI media uploader, it gets all chaotic. But that might also be my imagination.

    Anyway, perhaps with this new 2 – 3 – 4 – 5 setup it might start to become easyer to just use the media uploader, except for .html files, that wouldn’t work.

    PS:

    ***Might be offtopic, but it is still related to my original problem;

    I tried the media uploader, and this happens;

    “Unable to create directory /var/www/vhosts/awebhaus.eu/httpdocs/awebhaus/wp-content/blogs.dir/2/files/2012/04. Is its parent directory writable by the server?”

    Checked everything, and it is all 755 from the blogs.dir down, I remember a few months back when I wanted to use the media uploader this happened aswell, the only way I could fix it was to set all to 777, which is a little crazy.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    I actually, succesfully, migrated old single-install websites to my network by doing a str replace wp_ with wp_ID_ where ID was the ID of the website I assigned (or the network assigned) to it.

    Yes, and that’s different than mucking around with renaming the PATTERN 🙂 If you renamed wp_2_ to wp_12_ you’d break things. There are a LOT of places this is used, and some are coded into the core PHP files. Just please, please, please, DO NOT change the naming pattern. They’re numbers. Don’t screw with it if you don’t understand exactly how it works.

    I understand what you mean about the tidy thing, however.

    1) Trust the tool. The whole reason you’re using WP is that it works, right? So every time you try to make an end run around it, you’re making things harder when WP upgrades. Your weird work-around may no longer work. WP has hooks and filters and is extendable so you can do things RIGHT.

    2) You shouldn’t be ‘uploading’ .html at all. HTML goes into posts and pages. Or it’s a link. OR if you HAVE to, make a special /mail/ folder for everyone and link to that. Like … /mail/sitename/ for example 🙂

    3) It’s just as easy to upload large media files on the uploader, and you can use it in places where you may not have FTP (like mom’s computer). It takes getting used to 🙂

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    I remember a few months back when I wanted to use the media uploader this happened aswell, the only way I could fix it was to set all to 777, which is a little crazy.

    Read http://halfelf.org/2011/wordpress-dso-and-permissions/ 🙂 You can do this another way too.

    Ipstenu,

    I read through it all, and I changed the wp-config.php of my multisite-multidomain install to include;

    define(‘FS_CHMOD_DIR’, (0755 & ~ umask()));
    define(‘FS_CHMOD_FILE’, (0644 & ~ umask()));

    But I still get the error, which means I’m doing it wrong. Perhaps horribly wrong.

    Owner is 10000 and group is 1005. I totally have no idea what that even means. And rights are set to flcdmpe(0755) for folders and adfrw(0755) for files (filezilla). I feel like back in the day where I didn’t understand DNS and googling didn’t really help at all.

    If you don’t know to answer out of the top of your head (hat) then I’ll try to keep looking.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    Who’s the owner of wp-content/uploads?

    owner is ‘awebhaus’ (10000) group is ‘psacln’ (1005)

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    If uploads are working for your main site, then that account/group needs to be the owners of /wp-content/blogs.dir/ and ALL sub folders. In my blog post, that’s where I get into having nobody:nobody own everything :/

    Ok,

    Uploads are not working anywhere (not on my ‘main site’ –which is basically a dummy– not on my ‘sub-sites’, but upgrades to plugins and wordpress are working (because I declare an FTP account in wp-config.php).

    So I opened the etc/passwd file and it says this;

    root:*:0:0:Root:/:/bin/false
    awebhaus:x:10000:1005::/:/bin/bash

    no nobody there.

    Setting user to both root or awebhaus doesn’t help. I’m wondering if the WP installation is actually using awebhaus as a user, since if I assign wp-config a 600 (advice gained from http://codex.wordpress.org/Changing_File_Permissions), everything stops working.

    I must be very dumb not to know how and why a WP uses a user from the server to acces the files on the server, but I do not know. is it by declaring an FTP account in wp-config? No; because then wp-config would have to be 655, right?

    Very confused. The main problem is I do not have sufficient basic knowlegde on how a server works, at the moment I am only familiar with the higher languages (php, js, …).

    I am really at a loss. But I tried to do my own research.

    If you have any other pointers to push me in the right direction, I would very much appreciate it.

    PS: a bit of explanation : in the sentence where I say ‘Setting the user to both root or awebhaus doesn’t help. …’ by “I’m wondering if the WP installation is actually using awebhaus as a user” I’m doubting the fact that it is.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    It’s possible that it’s not.

    I must be very dumb not to know how and why a WP uses a user from the server to acces the files on the server, but I do not know. is it by declaring an FTP account in wp-config? No; because then wp-config would have to be 655, right?

    It’s not actually WP here, it’s PHP. See WordPress uses PHP to upload files. So it all comes down to how PHP was set up on the server level.

    What flavor of PHP are you using?

    In Parallels Plesk Panel 10.3.1 it says;

    Under Components Management
    php 5.3.3-7+squeeze3

    I’m really not sure if this is what you mean.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘How to 'change blogs.dir subdirectories name'’ is closed to new replies.