WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to 'change blogs.dir subdirectories name' (23 posts)

  1. Fabien Schiettecatte
    Member
    Posted 2 years ago #

    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...

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

  3. Fabien Schiettecatte
    Member
    Posted 2 years ago #

    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.

  4. DO NOT for the love of monkeys change the DB TABLES!! I will rap your knuckles with a ruler! :D

    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.

  5. Fabien Schiettecatte
    Member
    Posted 2 years ago #

    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.

  6. Fabien Schiettecatte
    Member
    Posted 2 years ago #

    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.

  7. 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 :)

  8. 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.

  9. Fabien Schiettecatte
    Member
    Posted 2 years ago #

    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.

  10. Who's the owner of wp-content/uploads?

  11. Fabien Schiettecatte
    Member
    Posted 2 years ago #

    owner is 'awebhaus' (10000) group is 'psacln' (1005)

  12. 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 :/

  13. Fabien Schiettecatte
    Member
    Posted 2 years ago #

    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.

  14. Fabien Schiettecatte
    Member
    Posted 2 years ago #

    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.

  15. 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?

  16. Fabien Schiettecatte
    Member
    Posted 2 years ago #

    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.

  17. It's close. I should have been more specific and asked which PHP handler - http://boomshadow.net/tech/php-handlers/

    See each one is different :/ I don't know which comes standard with plesk.

  18. Fabien Schiettecatte
    Member
    Posted 2 years ago #

    Allright,

    I ran a

    <?php phpinfo(); ?> (you can see the results here : http://awebhaus.be/phpinfo.php/foobar/?foo=bar - I'll keep it up for today)

    And the thread here : http://forums.iis.net/t/1155738.aspx

    Leads me to believe that as the return on '_SERVER["REQUEST_URI"]' is '/phpinfo.php/foobar/?foo=bar' I run FastCGI.

    It (the external thread) doesn't cover the DSO or suPHP but talks about ISAPI instead, not sure that my answer is indeed 100% correct.

  19. I think in Plesk you can edit Domain Settings, and in there there's an option to "run php as fastCGI application" (which I'm not saying you should, just see if it's set or not).

    Bleah, I'm used to Cpanel, where it's in WMH -> PHP -> Handler

  20. Fabien Schiettecatte
    Member
    Posted 2 years ago #

    Allright,

    I was always looking in the "WHM" section of Parallels (don't even know what it is really called) but it is in de customer control panel.

    For your future reference it is ;

    customer control panel -> websites & domains -> <yourdomain.ext> -> PHP support run as <dropdown> - 1: Apache Module, 2: FastCGI Application, 3: CGI Application</dropdown>, PHP 'safe_mode' on <tickbox>off</tickbox>

    It is running as an Apache Module and safe mode is off. The only other options are to run it as FastCGI or CGI.

  21. Apache Module would be DSO I believe.

    If you have root access, I'd try making the owners nobody:nobody (I know that's weird), or asking your host what they need to be.

  22. Fabien Schiettecatte
    Member
    Posted 2 years ago #

    I set a domain to FastCGI and it works! Now I'm not sure I should keep it this way, since this is not something you mentioned I could do? I read it increases memory usage, I guess if that is the only downside, I'll have to wait to see if my memory can handle it or not. Plus, they say it is more secure?

    Well, I'm eternally grateful, this has been one long help session, I'll bookmark your blog and try to visit from time to time! If you even need anything, just tell me.

  23. Potato, potato ;)

    If your server's well sandboxed, you're fine with FastCGI or DSO. As for memory, you should be okay. SuPHP is the hog of the lot, in my experience.

    I'd keep it for now :) Keep tabs on your memory usage, for sure!

Topic Closed

This topic has been closed to new replies.

About this Topic