Did you copy down the database from the live site to your local copy? If you did, the database settings probably need to change in your wp-config.php site on the XAMPP install because you’d be connecting to a different database.
If you didn’t copy down the database and you’re using the same config settings as the live site, then there are two things you need to know on that.
1) If you leave that in place, your test WordPress site will be editing your live WordPress database (which I’m assuming is not what you want to do)
2) Your server probably won’t let your desktop computer connect to your live server database anyway. MySQL requires each IP (“host”) to be permitted to connect to it. It’s not strictly a username/password requirement. You’d have to be connecting from a permitted computer too.
Mel – suggestion? Start over doing this 🙂
If you are trying to copy a live site to XAMPP, this works first time, every time for me 🙂
Live Site:
– export the live db and download
– Compress (ZIP) the entire live site and download
XAMPP (assuming a default XAMPP installation):
– start XAMPP (both Apache and MySQL running)
– from the XAMPP control panel, start phpMyAdmin
– create a new, empty db (use the same name as live to make things easier) and import into it the live db
– edit the wp-options siteurl and home fields with the XAMPP url (http://localhost for a “root” install; add / plus the folder name if installed in a folder in the root, e.g. http://localhost/live_site)
– extract the live ZIP into the desired XAMPP location (root or folder)
– edit the wp-config.php for the XAMPP db credentials (user = root and password is empty, blank, don’t enter anything for a default XAMPP installation)
– login to the local WP dashboard, install and run this plugin:
http://wordpress.org/plugins/velvet-blues-update-urls/
– download and run this script:
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
– re-save your permalinks
– done 🙂 … works every time for me 🙂
Thanks vrazer and 2ninerniner2 for your suggestions and advise.
It did turn out to be a user/PW issue for some reason root and empty password worked, but not the admin/pw combination the db was originally created with.
I’ve since used “Duplicator” to backup the complete original site and restore it back to my local, test site and it’s all working.
Thanks to both of you again.