webmachine — 2012-01-04T16:39:12-05:00 — #1
I converted an existing site into a cms using WP locally, tested it and it worked fine. Then I published a version of this site on the internet. I was having problems with the permalinks, and trying things with .htaccess. I think in the process, I deleted my .htaccess file from my local site. Now when I try to login in to my local admin area, I get redirected to the live site! and my local site pages link to the live site (with pages not found). How do I fix this mess?
aussiejohn — 2012-01-04T20:27:25-05:00 — #2
There is a setting in Wordpress under Settings > General called "Wordpress address (URL)" and "Website address (URL)" - They should match the server that you're running that instance of Wordpress off.
If you migrated the site by importing your local DB into the live DB (or vice versa) you'll need to change that setting.
From memory it's a setting in the wp_options table (if you used the default prefix on your tables).
Changing that setting won't change links in your content though that are linked with a fully qualified URL.
Normally when I migrate from Local to Live (or vice versa) I simply run a Search and Replace on the SQL file.
webmachine — 2012-01-04T21:37:33-05:00 — #3
Thanks, I will try that tomorrow morning. But my problem is that I can't get into my local WP dashboard to change those settings ... can I do it through the database instead maybe? It redirects me as soon as I try to log in.
aussiejohn — 2012-01-05T00:34:53-05:00 — #4
Yeah, it should be possible to do this directly in the DB
webmachine — 2012-01-05T17:09:50-05:00 — #5
That did the trick. Thanks for all your help.