I have followed the second procedure described in this article to move the wordpress installation from the server to localhost, so as to start using Git. As soon as I browsed to localhost I got lots of errors, started fixing them and right now whenever I visit the local site url it redirects me to localhost/wordpress-website-bouwen giving me an Object not found page. Have you got any idea why this happens? Where should I look for the error?
Hey I remember running into this. Check out this link, it should solve your problems - Search and Replace 2
Basically, wordpress saves many of your references to images, links etc in the db. As a result, when you migrate the database over to a new host (be it locally or otherwise), wordpress is going to reference the web url stored in the database.
What Search and Replace does is asks you for the current standard url and asks you to also put in the new one. So for example if you are on site gimmemychicken.com
and you move it locally then you will want to put gimmemychicken.com
in the current url and in the new url input, you would put localhost
.
All you have to do is take the Search and Replace file -> place it somewhere in your directory -> navigate to it in a browser -> and fill out all the required info.
As a side note: Sometimes after sr2 runs you need to go back to your permalinks settings and resave them (don't worry about changing them, just click on save/update)