This will be due to an inconsistent SITE_URL and HOME setting in the database.
Take a dump of your database as a backup.
Then run the below query in phpMyAdmin.
UPDATE wp_options SET option_value = ‘http://localhost’ WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
If you’re still having problems, restore from the dump you took and paste the output of this query.
SELECT * FROM wp_options WHERE option_name =’siteurl’ OR option_name = ‘home’;
Cheers
After you imported the database, you have to edit the siteurl and home fields in the wp_options table with the local URL, which will depend upon where you placed your site files within drive_letter:\WAMP\www.
If you placed them in a folder within the above path, then enter for both:
http://localhost/folder_name
If you placed them directly in the root, i.e. drive_letter:\WAMP\www then enter:
http://localhost
That will let you log into the dashboard.
Once there, install and run this plugin:
http://wordpress.org/plugins/velvet-blues-update-urls/
— select all options EXCEPT the last one (GUID)
Once that is done, go to:
Settings > Permalinks and Save.
Thread Starter
James
(@petteri111)
Ok, thank you very much. Got it working by changing site url from php myadmin. I had already destroyed the database of this website.
So i guess next time i will export the real backup database instead of getting Dump. 🙂
Dump might be correct choice if moving website, with the same domain name to another host for example ?
Good to hear that you got it sorted 🙂
However, ‘dump’ and ‘export’ mean the same thing when it comes to the database. ‘Dump’ being more in the vernacular of DBAs (Database Administrators) whereas ‘export’ is generally used for us ‘unwashed masses’ 🙂 Doesn’t sound nearly as ‘important’ and ‘technical’ 😉