WordPress.org

Ready to get started?Download WordPress

Forums

how to install WP on localhost (16 posts)

  1. seweetee
    Member
    Posted 4 years ago #

    Hi,

    I would like to install WP on my localhost, have downloaded xampplite, which version of mySQL should i download? http://www.mysql.com/downloads/connector/

    is it the mySQL ODBC?

    is there a manual for how to install WP on localhost?

    btw, i'm running winXP.

  2. I have not tried in an long time, but give Podz's page a good read.

    http://www.tamba2.org.uk/wordpress/xampp/

    I believe the package xamp should come with everything you need without installing anything from the Mysql web page.

  3. seweetee
    Member
    Posted 4 years ago #

    thanks! will do~

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    I just did it with wampserver
    http://www.wampserver.com/en/

    and all the step by step guides on here...
    http://guides.jlbn.net/

    just another option

  5. DavePorter
    Member
    Posted 4 years ago #

    I've been using XAMPP for years on WIndows XP, and it works fine for me !
    Cheers Dave

  6. seweetee
    Member
    Posted 4 years ago #

    hi,

    i'm following the instructions from http://www.tamba2.org.uk/wordpress/xampp/

    after i've copied the following into details into wp-config file, and save it as wp-config.php

    ---------------
    define('DB_NAME', 'wordpress'); // The name of the database
    define('DB_USER', 'root'); // Your MySQL username
    define('DB_PASSWORD', ''); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
    -------------------

    it gives me an error page which says:

    Error establishing a database connection

    ---------
    This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.

    * Are you sure you have the correct username and password?
    * Are you sure that you have typed the correct hostname?
    * Are you sure that the database server is running?

    If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
    -----------

    my XAMPP is running, so is apache and mysql...
    when i go to http://localhost, it gives me the correct XAMPP page.

    can someone help?
    thanks!!!

  7. techdork
    Member
    Posted 4 years ago #

    The DB should be "mysql", not "wordpress".

    Log into phpmyadmin and you will see the db name. Make sure to add a user and password with all rights/privileges. Use that as your username instead of "root". Do not add a password to root, it will cause phpmyadmin to crash.

    Under WAMP, all files s/b here: C:\wamp\www\wordpress\ (wordpress optional & highly recommended so you don't overwrite the localhost index.php)

    XAMPP should have a similar named folder.

    Good luck...techdork

  8. seweetee
    Member
    Posted 4 years ago #

    thanks for your reply.

    i've done this step -

    "make sure to add a user and password with all rights/privileges. Use that as your username instead of "root". Do not add a password to root, it will cause phpmyadmin to crash."

    all files are in this directory - C:\xampplite\htdocs\wordpress

    but i'm still getting an error establishing database connection?

  9. threestyler
    Member
    Posted 4 years ago #

    If you followed the tamba2 tutorial then your database IS called wordpress and not mysql. You can call it whatever you want as long as it matches the details in wp-config. Make sure you changed the Collation to utf8_unicode_ci.

    go to http://localhost and then phpmyadmin make sure you created the database.

    Then delete your wp-config.php and go back to your wordpress location http://localhost/wordpress and let it generate a new config file for you entering the database information in the setup.

    db name: wordpress (or whatever you called it)
    db user: root
    db pass: (no pass)

    install

    p.s if you dont need a lite install download the xampp full package which contains all of the packages you need together.

  10. seweetee
    Member
    Posted 4 years ago #

    threestyler,

    i did as you instructed but when i clicked on "install", it gave me this error page. any advice?

    -----------
    Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.

    * Are you sure you have the correct username and password?
    * Are you sure that you have typed the correct hostname?
    * Are you sure that the database server is running?

    If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

  11. threestyler
    Member
    Posted 4 years ago #

    Open the xampp control panel and make sure apache and mysql are both running?

    Otherwise I would consider starting from the beginning downloading a fresh copy of xampp the complete version and going through the instructions again.

    This looks like a more complete guide:

    http://sixrevisions.com/tutorials/web-development-tutorials/using-xampp-for-local-wordpress-theme-development/

  12. sonyjunkie
    Member
    Posted 4 years ago #

    In a shameless plug!! I've just written a tutorial on how to create a MySql database using phpMyAdmin.

    http://webdesignrookie.wordpress.com/2010/06/05/creating-a-new-database-using-mysql/

    Then as threestyler suggested, go to http://localhost/wordpress and let it generate a new config file for you entering the database information in the setup.

    db name: wordpress (or whatever you called it)
    db user: wordpress (or whatever you called it)
    db pass: whatever you chose
    db host: localhost

    I create my databases in a slightly different way to the Six Revisions tutorial, hence why the db name & db user are the same.

    I hope this helps

    p.s. in another shameless plug, I'm going to be writing a WordPress install tutorial in the next day or so.

  13. seweetee
    Member
    Posted 4 years ago #

    threestyler,

    yes both apache and mysql are running. i've downloaded the complete version of xampp and will give it a try. thanks!

  14. nthali
    Member
    Posted 4 years ago #

    Being a "king of pain" i installed all components myself, so i'm not familiar with how the database and the user got created when you used xampplite, but here's what gave me the same error using phpMyAdmin:
    when i added the new user, i left the "Host" field at "any". this
    made me unable to login to the wordpress db using host "localhost".
    i deleted the user, then recreated it this time switching the value for "Host" to "local" at which point it correctly used localhost.
    hoping for a swift resolution to your issue.
    best,
    Nilesh

  15. seweetee
    Member
    Posted 4 years ago #

    Nilesh,

    neither local nor host is working it for me.

    question to all,
    in the http://www.tamba2.org.uk/wordpress/xampp/ tutorial,
    when it's asking me to copy the following codes into my wp-config-sample.php file, am i to copy/paste at the very bottom of all the / and // documentations? (still curious to what i did wasn't correct...)

    --------------
    define('DB_NAME', 'wordpress'); // The name of the database
    define('DB_USER', 'root'); // Your MySQL username
    define('DB_PASSWORD', ''); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

  16. seweetee
    Member
    Posted 4 years ago #

    update -

    hey guys, i think i've got it working. instead of copy/paste the above codes at the end of wp-config-sample.php, i just pasted it in the middle of all that / and // documentation. and now it's working. i wonder why?

Topic Closed

This topic has been closed to new replies.

About this Topic