how to install WP on localhost
-
Hi,
I would like to install WP on my localhost, have downloaded xampplite, which version of mySQL should i download? https://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.
-
I have not tried in an long time, but give Podz’s page a good read.
https://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.
thanks! will do~
I just did it with wampserver
https://www.wampserver.com/en/and all the step by step guides on here…
https://guides.jlbn.net/just another option
I’ve been using XAMPP for years on WIndows XP, and it works fine for me !
Cheers Davehi,
i’m following the instructions from https://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 https://localhost, it gives me the correct XAMPP page.can someone help?
thanks!!!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
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?
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 https://localhost and then phpmyadmin make sure you created the database.
Then delete your wp-config.php and go back to your wordpress location https://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.
threestyler,
i did as you instructed but when i clicked on “install”, it gave me this error page. any advice?
———–
Error establishing a database connectionThis 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.
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:
In a shameless plug!! I’ve just written a tutorial on how to create a MySql database using phpMyAdmin.
https://webdesignrookie.wordpress.com/2010/06/05/creating-a-new-database-using-mysql/
Then as threestyler suggested, go to https://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: localhostI 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.
threestyler,
yes both apache and mysql are running. i’ve downloaded the complete version of xampp and will give it a try. thanks!
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,
NileshNilesh,
neither local nor host is working it for me.
question to all,
in the https://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 valueupdate –
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?
- The topic ‘how to install WP on localhost’ is closed to new replies.