

Note to self as a reminder on how to move a Wordpress installation to another url… in this case to a localhost site so that I can develop locally.
First backup your current wordpress database. Follow instructions here to do that: How to Backup your Wordpress Database
Here you have a choice: You can save all your Wordpress files (including the core files) or just save the stuff you changed. This will probably only be the directories in wp-content, with themes and uploads being the most important. Saving the plugins is mostly for convenience sake, because you can always download them again. If you did change some core wordpress files you will want to save that stuff too. If you go with the second option, you will need to download the core Wordpress files again so that you can reinstall it.
If your local site is not already set up, then set it up. If you want to set up a new VirtualHost, here are the instructions on how to set it up using MAMP. Import all your Wordpress files into the directory for this site, making sure that you put all the directories where they belong (i.e. put themes in wp-content).
Create your local database and import your old database. You will also have to do some find and replace on the SQL tables. See example SQL query below. For more instructions go here Changing the site url
UPDATE wp_posts SET guid = REPLACE ( guid, ‘http://exampleoldsiteurl.com’, ‘http://examplenewsiteurl.com’);
Edit your wp-config file and point it to the new database. Fill in the user and password info if necessary.
At this point, start your local server if it is not already started and point your browser to the new site url. Your site should be live, but there will still be a link problem.
Log into your wordpress admin page (yoursite/wp-admin) and go to Settings –> Permalinks. You need to reset your permalinks so change the permalink structure to one of the unselected options, hit save, and then change it back to the one you want, and hit save.
Everything should work great now.
Posted via email from adlatitude | Comment »