I am trying something for the first time, without any experience working with databases at all, so please forgive my questions if I don't quite understand some of these concepts.
I have several live, hosted, Wordpress sites that I have been developing on the live servers (no development environment). I know this is pretty unrefined.
I would like to set up a development instance of each of these sites (retroactively) so that I can mirror the sites locally, and start developing "correctly", so to speak.
I have installed MAMP
and am running several instances of Wordpress from a local apache htdocs directory on my Mac. I'm using the Mac's default instance of apache running with Web Sharing on my default port of 80 for something else, so MAMP is running on it's default port of 8888, if that's relevant.
Where I've run into problems is the following. My assumption was that if I wanted to catch up my local instances of the live sites so that I had a semi-useful development version going forward, that all I would have to do is do a database backup from the live site, and import it to my local MySQL database for the local instance of Wordpress. PhpMyAdmin gave me a successful import confirmation message but when I refreshed the local instance of Wordpress at
it changes my URL to
giving me a 404. If I try to manually navigate to
It correctly gives me the login screen, BUT my login no longer works and it redirects me to the LIVE URL of www.sitename.com/wordpress/wp-login.php
. Do the databases (live and local) need to be named the same? Currently they're not.
I'm sure this has to do with my ignorance when it comes to MySQL. Probably something more complicated involved with resolving paths and whatnot. But I'm totally lost at this point. Help!