I’m starting to get crazy with this.
I have to do some modifications to a wordpress website that i didn’t create. I have access to the hosting so I downloaded all the files and a copy of the database.
After creating and importing in the local database I went to wp-config.php and change the hosting parametres (user, pass, server,…) for the local ones.
But here comes the troubles. When I change the online server dbXXXX.db.1and1.com
to localhost
it suddenly stops working and files called index.php
won’t ever work again
(I get “localhost server not found” error),
even if I change the source folder, or restart MAMP or restart the laptop… The only solution is to unistall MAMP, restart the system and install it again, but when changing the name of the server to localhost it happens again…
Well… If I copy the content of index.php
in another file (for example index2.php
) and set the parameters to the online server it works again until I change server to localhost
.
When I say “it works” means that at least I get “error database connection” from wordpress (due to the online hosting does not allow external requests to its databases).
Can somebody help? Do you need some extra information? Thanks!
MAMP did some crazy this on my PC to, so I decided to switch to WAMP –
http://www.wampserver.com/en/
You may give it a try ?!
Finally I found the error. It’s due to the file “.htaccess” that WordPress (or I don’t know who) creates for using permalink and MAC OS X.
When unzipping the web downloaded from the hosting the OS deleted that file because only system files can start with a dot (“.htaccess”).
I didn’t find the solution and just start to work in Windows with BootCamp and all was fine. I was in a hurry to finish this job so I didn’t have more time to try new solutions.
So I have not the solution but the source of the problem. Hope this helps someone at least finding the problem and save some time.