The MU forums have moved to WordPress.org

Best test environment for WPMU? (26 posts)

  1. skcsknathan001
    Member
    Posted 18 years ago #

    Hi guys,

    I would like to know what would be the best way to have the test environment for WPMU. I have my live site. I have it setup as subdomain blogs. But I want a test site [obviously a subdomain test site].

    I tried to install WPMU on LocalHost, but it says cannot be installed on LocalHost. Is there a workaround?

    Or did you guys actually buy another domain with the same/different [cheaper] web service provider?

    Or did you guys added another subdomain with the same account and installed "somehow" on the same web space?

    Please give your ideas

  2. andrea_r
    Moderator
    Posted 18 years ago #

    You can do it locally if you set up a localhost.something. Mine is on desktop.local. it just doesn't like one word domains there. (ie, "desktop" also would not work.)

    Eventually though I'm going to get a spare domain to play with and/or finally set up our Linux computer for it.

  3. skcsknathan001
    Member
    Posted 18 years ago #

    how to setup localhost.something?

    I mean do I need to have DNS configured ?

  4. andrea_r
    Moderator
    Posted 18 years ago #

    Have you got server stuff set up on your desktop? you'd be chaning/adding stuff in there to recognize it.

  5. PerS
    Member
    Posted 18 years ago #

    skcsknathan001: In \WINDOWS\system32\drivers\etc\hosts, add local.domain (or what ever you'd like to call it) to the localhost line i.e.:

    127.0.0.1 localhost local.domain

    andrea_r: what do you mean? I'm running my develop/test environment on my windows xp portable using xampp

  6. andrea_r
    Moderator
    Posted 18 years ago #

    You gave the answer PerS. :D Yes, I was asking if the OP had something like xampp set up.

  7. skcsknathan001
    Member
    Posted 18 years ago #

    Ok... I'm almost there.
    I setup WPMU and it said successfully created my site & my username & password has been sent.

    Well, I don't have any mailserver running on my computer so I didn't receive any mails!

    but the XAMPPlite comes with Mercury. I made it run & installed WPMU again. But didn't send mail. Without the password, I'm unable to login.

    How to run the mailserver using xampp?
    make WPMU send email?

  8. PerS
    Member
    Posted 18 years ago #

    skcsknathan001, you can set smtp server in php.ini (windows only). More info at http://www.php.net/manual/en/ref.mail.php#ini.smtp

  9. skcsknathan001
    Member
    Posted 18 years ago #

    PerS,

    Yes, I uncommented the line "extension=php_smtp.dll" and "extension=php_mailparse.dll" and made sure all smtp stuff are not commented in php.ini

    checked the sendmail.ini, which has smtp server as "localhost". I left as it is.

    But still no mail.

    Please elaborate as I'm totally lost in sending email in local computer installation of WPMU.

  10. lunabyte
    Member
    Posted 18 years ago #

    Look up the coffee2code SMTP plugin.

    It works fine with MU. Just drop it in the plugins directory like you would for a standard WP install.

    Warning:

    I don't personally recommend it for a live site. Reason being is that each user can activate their own SMTP, which could be bad juju.

    For testing on localhost though, it's fine unmodified.

  11. skcsknathan001
    Member
    Posted 18 years ago #

    lunabyte,

    I don't want a temporary smtp server created. I installed WPMU [not WP] in my local system. WPMU sends mail to admin with the temporary password, when you first install WPMU successfully. I don't get that. So I can't activate the coffee2code plugin, since I can't even login to the site.

    Also needed when a new blog is created, WPMU sends an email with activation link.

    for all those, the email should work

  12. lunabyte
    Member
    Posted 18 years ago #

    It's not a temporary SMTP server, it sends out mail using an existing SMTP account on an actual SMTP server.

    So the second part of your problem for your local test would be solved.

    I know you installed MU, but as I said the mentioned plugin is a WP plugin that works fine for MU. Meaning you can use it on your local test box, and not have to worry about it.

    Now, for your initial problem.

    Do you have a standard install of WP on your test box? Doesn't matter where, or whatever, just as long as it's local. If so, you can swipe the hash of a known password from that user table, and paste it into your MU table. Now you can log into the primary account that was created, and change the pass to whatever you like.

    Then you can use that plugin mentioned, and all the emails are sent just fine.

  13. skcsknathan001
    Member
    Posted 18 years ago #

    yes, I see the hash of the user password [in my local computer mySQL DB]. But how do I get the actual password from that?

    this is what I see in user_pass in DB
    8121e8c0678b81d60d9641a97c039c6f

    I tried to re-do MD5 on it and it gave a long key again.

    Thanks lunabyte for your help.

    Oh I'm running IIS's SMTP server. I added my 127.0.0.1 in Relay Access.

  14. lunabyte
    Member
    Posted 18 years ago #

    OK, so you already have an existing SMTP on that box then. Makes a big difference I guess.

    For that, make sure you have a valid user specified in your php.ini file. I (unfortunately) had the pleasure of setting up a site on IIS a couple weeks ago, and that was one of the things I remember having to correct.

    As a note, however, by default WP and WPMU use sendmail and not SMTP. I ended up needing the plugin anyway to get mail to work on that IIS box, but that may be because the SMTP server required a username and password for authentication.

    Onto the password deal.

    Like I said, do you have a working version of WP on this same box? Not your MU install, plain old WP. The newer, the better.

    Since MU is built from WP, the password function is the same.

    So, you can open up the WP (standard) DB, get into the user table, and grab the hash from one of the users (like admin) where you already know what the password is.

    Then, you can open up your WPMU db, get into the users table, and edit the admin account. Paste the password hash from the standard WP db you copied, into the MU's user field to replace the one that MU generated and "sent" to you.

    Now, you have a new hash in there, that you already know the password for.

    What you're doing is taking a hash from a standard WP install, sticking it into MU, so you already know the password to log in with.

    Hopefully that makes more sense.

    If you don't have a local version of WP running on the same box, you can install one temporarily to make a hash.

    It's a little bit of a hassle, but at least you can get logged in.

  15. jshare
    Member
    Posted 18 years ago #

    skesknathan001 - you don't need to get the password from the hash, just change it immediately after installing, as described in this post

  16. skcsknathan001
    Member
    Posted 18 years ago #

    Thanks Lunabyte and Jshare for help.

    My computer was down past week. ONly now I was able to login.

    Lunabyte,
    I couldn't get the sendmail to work. That's why I installed IIS's SMTP server. If you can tell me the configuration for the sendmail to work, then definitely I would prefer to use the sendmail.

    JShare,
    Yes, I tried your way of changing the password in mySql DB. It worked. Thanks a lot for the link

  17. lunabyte
    Member
    Posted 18 years ago #

    That's the thing.
    You're on windows. The only option is SMTP, AFAIK.

    Sendmail is *nix, unless there is something in the "other" world that lets you specify sendmail but uses something else.

    windows, iis... two things I can definitely live without. :D

  18. suleiman
    Member
    Posted 17 years ago #

    following this method and using:

    127.0.0.1 localhost local.domain

    in my etc/hosts file, I had a once-working local setup of MU.

    But then it suddenly stopped. I checked the hosts file and it still uses the above text.

    What's more, pointing my browser to http://localhost.localdomain, produces a "no server at address" error.

    Anyone know what I may be doing wrong here?

    EDIT: I was able to correct the problem by adding the following line to my hosts file:

    127.0.0.1 localhost.localdomain

    instead of:

    127.0.0.1 localhost local.domain

    My concern now is that the hosts' file comments explicitly state:

    # localhost is used to configure the loopback interface
    # when the system is booting. Do not change this entry.
    ##

    So is this something I should be worried about? Will my Mac still boot up when I restart?

  19. lunabyte
    Member
    Posted 17 years ago #

    Here's what you need to do:

    First, make sure you have a

    127.0.0.1 localhost

    entry.

    below that,
    add something like:

    127.0.0.1 domain.loc

    Edit:
    /private/etc/httpd/httpd.conf

    make sure vhosts are enabled.

    Then add a new virtual host for domain.loc towards the end of the file.

    Vi is the easiest way to go for editing, or emacs. I prefer vi, but whatever floats your boat.

  20. suleiman
    Member
    Posted 17 years ago #

    luna, since i don't really care about subdomains for my local install, I think the virtual hosting isn't necessary.

    But I have gone ahead and taken your advice. My revised hosts file now looks like this:

    127.0.0.1 localhost
    127.0.0.1 localhost.localdomain

  21. lunabyte
    Member
    Posted 17 years ago #

    um, virtual hosts in apache have nothing to do with subdomain, initially.

    It would allow you to have different test sites though, or more than 1 local domain for whatever.

    Guess you need to read up on apache though.

    You don't have to use the whole localdomain, either. You could literally use whatever you want. I personally use .loc, for short, and to remind me at a quick glance it's on the internal server.

  22. suleiman
    Member
    Posted 17 years ago #

    thanks luna, i definitely do need to read up on apache, but it's on the bottom of my todo list.

    for now this works great, thanks for the tips.

  23. indojepang
    Member
    Posted 16 years ago #

    need more help about this..

    Got the
    127.0.0.1 localhost
    127.0.0.1 localhost.localdomain
    workin..:)

    and I know the localhost doesn't act like wildcard entries, so we have to add each subdomain to the hosts file as well.

    127.0.0.1 localhost
    127.0.0.1 localhost.localdomain
    127.0.0.1 test.localhost.localdomain
    127.0.0.1 test2.localhost.localdomain

    But when I'm testing listAll plugin, it only show my main blog not the blogger site.

    Why this happening? Do I have to set something else o Xampp?
    Please help.. thank you

  24. indojepang
    Member
    Posted 16 years ago #

    andrea.. lunabyte.. !! please help!! :(

  25. andrea_r
    Moderator
    Posted 16 years ago #

    Check and make sure the blogs are set to PUBLIC.

  26. indojepang
    Member
    Posted 16 years ago #

    YESS!!!!!! THANKS ALOT ANDREA!!!! MILLION TIMES!!!!
    It's like found water in desert after month Journey for me!
    Thank u.. thank uu.. thank uuuuuuuuuu...

About this Topic

  • Started 18 years ago by skcsknathan001
  • Latest reply from indojepang