The MU forums have moved to WordPress.org

How to install wordpress-mu locally with XAMPP?pls help (27 posts)

  1. Taradeiv
    Member
    Posted 15 years ago #

    Randomly i searched for installation procedure and did the following.

    1. I included 127.0.0.1 localhost.localdomain in the windows host file.
    2. I dint create any wp-config.php file.

    then i followed the normal procedure like wordpress installation.

    http://localhost.localdomain/wordpress-mu/index.php when i give this, I get ERROR IN DATABASE CONNECTION.

    can anyone make the procedure clear for me?

  2. SteveAtty
    Member
    Posted 15 years ago #

    Did it create a database?

  3. Taradeiv
    Member
    Posted 15 years ago #

    hi steve!

    yes, database was created. n it exists now.

  4. MrBrian
    Member
    Posted 15 years ago #

    paste your config's database details

  5. Taradeiv
    Member
    Posted 15 years ago #

    Hi brian!
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'wordpress-mu');

    /** MySQL database username */
    define('DB_USER', 'wordpress');

    /** MySQL database password */
    define('DB_PASSWORD', '');

    /** MySQL hostname */
    define('DB_HOST', 'localhost.localdomain');

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');

    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
    define('VHOST', 'yes');
    $base = '/wordpress-mu/';
    define('DOMAIN_CURRENT_SITE', 'localhost.localdomain' );
    define('PATH_CURRENT_SITE', '/wordpress-mu/' );
    define('BLOGID_CURRENT_SITE', '1' );

    this is the DB details in the config file

  6. cafespain
    Member
    Posted 15 years ago #

    Hmmm... Not had much experience with XAMPP, but does it put the mysql database at a none standard port?

    Try changing the DB_HOST to 127.0.0.1 and see what happens?

  7. andrea_r
    Moderator
    Posted 15 years ago #

    "/** MySQL database password */
    define('DB_PASSWORD', '');"

    You DID set a password, right? And you just removed it for showing us, yes?

  8. pumpkinpatch
    Member
    Posted 15 years ago #

    I say ditch the old database, create a new one. Using xampp phpmyadmin, create a new database and user. This time with a proper password as Andrea mentions. Root with no pw is xampp default, and looks like you created user 'wordpress'- but did you set a pw? Put in those values into your wpconfig file and you should be good to go.
    define('DB_HOST', 'localhost');

  9. Taradeiv
    Member
    Posted 15 years ago #

    Hi all! I've changed the DB host to local host, set a password. still, it says ERROR in establishing DATABASE connection.

    and MySQL runs in a standard port 3306.

    can anyone pls put down the exact steps ?

  10. pumpkinpatch
    Member
    Posted 15 years ago #

    I suggest you start with a simple trial setting:

    define('DB_NAME', 'tara');
    define('DB_USER', 'tara');
    define('DB_PASSWORD', 'tara');
    define('DB_HOST', 'localhost');
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');
    define('VHOST', 'yes');
    $base = '/';
    $table_prefix = 'wp_';

    Then using phpmyadmin, check if the database had been populated with WP tables. Remember to put in the right locations in the hosts file, and set vhost. MySQL is running, right?
    If you still have problems, cut and post your entire config file here (please remove the comments and extra lines to keep it short and clear), and your hosts file.
    phpmyadmin:
    http://localhost/phpmyadmin/ or http://urwebsitename.tld/phpmyadmin

  11. Taradeiv
    Member
    Posted 15 years ago #

    define('DB_NAME', 'wordpress');

    define('DB_USER', 'wordpress');

    define('DB_PASSWORD', '');

    define('DB_HOST', 'localhost');

    define('DB_CHARSET', 'utf8');

    define('DB_COLLATE', '');
    define('VHOST', 'yes');
    $base = '/wordpress-mu/';
    define('DOMAIN_CURRENT_SITE', 'localhost.localdomain' );
    define('PATH_CURRENT_SITE', '/wordpress-mu/' );
    define('BLOGID_CURRENT_SITE', '1' );

    I want to make few things clear.Above is the automatically created config file in the process of installing.

    I tried to create new user,n database with password. like user-tara, database-tara,password-user1

    n then installed. finally,I got Error in establishing connection . After this, i deleted the config file.

    created new user:wordpress,new pwd:user1,database:wordpress in phpadmin.

    Then started installing.It automatically asked for config file details. I gave the same. It got installed. immediate step was to login, I got the same error again. :(

    pls,help me with this.

  12. pumpkinpatch
    Member
    Posted 15 years ago #

    I'm not sure I understand, but are you using the username/password combo that is displayed after WPmu gets installed and connected to the db?
    Username usually is admin, password is some random string. Do you get to that page?

  13. cafespain
    Member
    Posted 15 years ago #

    Can you log in to the database in phpmyadmin using the username and password that you are entering for the installation?

    Can you view the tables in there?

    Can you create a table?

    Can you run a select query to get the results from the query?

    If you can't do any of these then we can narrow down the problem. It may be permissions on the database.
    When you added the users, you did assign them permissions to the databases didn't you? And flush the privileges afterwards.

  14. Taradeiv
    Member
    Posted 15 years ago #

    @pumpkin patch

    yeah i get those default UN:admin and random password.After that when i log in , it says ERROR IN DATABASE CONNECTION.

  15. Taradeiv
    Member
    Posted 15 years ago #

    @cafespain

    Yeah i can access the database after that. view the table and all. and the user which was given al permissions

  16. pumpkinpatch
    Member
    Posted 15 years ago #

    You could try and do some SELECT and stuff. If not, why not just delete xampp and start over? Only takes a few minutes...
    You did remember to set vhosts and hosts (in Windows), right?

  17. conpeo
    Member
    Posted 15 years ago #

    if Windows, I suggest u try WAMPserver.

    I was using WAMP+WPMU, it works perfect in XP.

    Few weeks ago, I encounterd similar issue in XAMPP, but MAMP was Ok. so I suspect ...

  18. my-gude_org
    Member
    Posted 15 years ago #

    WPMU works perfect on XAMPP. On windows machine you have to edit the etc file. It's located at C:\windows\system32\drivers\etc

    Open it with notepad and ad a new line
    127.0.0.1 yoursite.loc

    then go to http://yoursite.loc and install wordpress mu. It works perfect for me.

  19. Taradeiv
    Member
    Posted 15 years ago #

    @pumpkin patch

    I tried reinstalling XAMPP n did everything again. result was the same error!

    before trying with WAMP. I would like to try again.

    can u just tell me the exact steps to install WPMU locally with XAMPP? can u just write down the exact steps?? htis would be useful n more clear for me.

    Thanks!

    @my_gude_org. that line doesnt make any difference.

    @conpeo

    I'll try with WAMP, if XAMPP doesnt work in my next trial.Thanku!

  20. pumpkinpatch
    Member
    Posted 15 years ago #

    The instructions are for Win/Vista:
    1) Download xampp and install in the default directory xampp.
    2) Some User account settings have to be changed for Vista, Google it. Don't remember what it is.
    3) Upack WPmu into c:xampp/htdocs
    4) Edit apache\conf\httpd.conf
    Make sure the following line is present/uncommented
    LoadModule rewrite_module modules/mod_rewrite.so
    5) Edit c:\xampp\apache\conf\extra\httpd-vhosts.conf, add:
    NameVirtualHost *:80
    <VirtualHost *:80>
    ServerAdmin something@localhost
    DocumentRoot "C:/xampp/htdocs"
    ServerName yourdomainname.tld
    ServerAlias *.yourdomainname.tld
    ErrorLog logs/error.log
    CustomLog logs/access.log common
    </VirtualHost>
    6) Edit c:\Windows\System32\drivers\etc\hosts, adding
    127.0.0.1 localhost
    127.0.0.1 localhost.localdomain
    127.0.0.1 subdomain1.yourmudomain.tld
    127.0.0.1 subdomain2.yourmudomain.tld
    127.0.0.1 subdomain3.yourmudomain.tld
    All MU subdomains have to be explicitly named
    7) Point your browser to http://localhost/localdomain/phpmyadmin. Using phpmyadmin, create a database, user/password (with all privileges).
    8) In your browser, go to http://localhost.localdomain
    9) WPmu installation page will load up. Put in all the database details and other stuff mentioned in earlier posts. In earlier posts, I made a mistake by implying that you manually add some lines in wpconfig. This is wrong (that applies only to plain WP).
    10) If everything works out, you will land on the login page of http://yourWPmudomain.tld

    This is all from memory, did this a long time back. Things might have changed since then. Your experience might vary. Batteries not included...Not suitable for children below 3... :))

  21. MrBrian
    Member
    Posted 15 years ago #

    Pretty detailed instructions for being from memory. Nice job!

  22. Taradeiv
    Member
    Posted 15 years ago #

    @ pumpkin patch.

    thanks alot for ur reply. I've missed some editing part of it before. I'm very new to al this. so please help me with these questions too.

    I'm gonna use MU locally only. n i dont ve a domain as of now.
    so what do i put for these two ?
    ServerName yourdomainname.tld
    ServerAlias *.yourdomainname.tld

    n
    127.0.0.1 subdomain1.yourmudomain.tld??
    what would be my subdomain ?? cant pls tell me abt these things?? It would be really helpful for me. Thanks!

  23. pumpkinpatch
    Member
    Posted 15 years ago #

    You don't need a domain name that has been registered (although I recommend you shutoff your internet connection while testing if you are using an already registered/existing domain name). You can use anything, like taradiev...

    ServerName taradiev.com
    ServerAlias *.taradiev.com

    127.0.0.1 taradiev.com
    127.0.0.1 alpha.taradiev.com
    127.0.0.1 beta.taradiev.com
    127.0.0.1 gamma.taradiev.com

    I missed the first line (127.0.0.1 taradiev.com, without any subdomain) in my previous (long) post.

  24. Taradeiv
    Member
    Posted 15 years ago #

    I did whatever u told. it gives me a login page. the minute i login , the next link the browser goes to is
    http://localhost.localdomain/wordpress-mu/wp-signup.php?new=localhost.localdomain. n i get a error,sayin

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
    The browser has stopped trying to retrieve the requested item. The site is redirecting the request in a way that will never complete.

    * Have you disabled or blocked cookies required by this site?
    * NOTE: If accepting the site's cookies does not resolve the problem, it is likely a server configuration issue and not your computer.

    TRY AGAIN!

    can u think of a solution for this?

  25. Taradeiv
    Member
    Posted 15 years ago #

    really thankful to u for guiding upto this level!

  26. pumpkinpatch
    Member
    Posted 15 years ago #

    1) Can you see the site? Is it only when you try to login to the Admin panel?
    2) Clear all cookies and cache. Or, use another browser that you have not used for this/previous installs.
    3) Are you using subdirectory or subdomain install?
    4) Show us your .htaccess file.
    5) Clear the Salt in your wpconfig and see if it helps.
    6) Show us just relevant (un-commented) parts of your wpconfig file. Could you please remove all line feeds and comments in it so it appears compact...

  27. Taradeiv
    Member
    Posted 15 years ago #

    1) no i cant see the site also.
    2) I cleared the cache and tried. It doesnt work
    3)yeah, subdomain install
    4)my.htaccess file.
    RewriteEngine On
    RewriteBase /wordpress-mu/

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ $1/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>
    5)my wp-config file

    define('DB_NAME', 'wordpressmu');
    define('DB_USER', 'root');/* changing the user name n password doesnt help */
    define('DB_PASSWORD', '');
    define('DB_HOST', 'localhost');
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');
    define('VHOST', 'yes');
    $base = '/';
    define('DOMAIN_CURRENT_SITE', 'localhost.localdomain' );
    define('PATH_CURRENT_SITE', '/wordpress-mu/');
    define('BLOGID_CURRENT_SITE', '1' );

About this Topic

  • Started 15 years ago by Taradeiv
  • Latest reply from Taradeiv