Xampp/Wordpress, all links redirecting to localhost/xampp

I’m having a big issue at the moment, I’m hoping there’s a solution.

I’ve been working locally on my site which is in Wordpress and using Xampp. Everything was working fine then I decided to move my WP to a live site, I was following a tutorial online and the first step was to

Wordpress >>>>>General Settings and change the Site/WP URL to myurl.com

I wanted to continue developing in my local environment but I couldn’t even find my login page through my browser, it kept coming up with an error because of the general setting change I had made.

I went into myphpadmin and changed the wp_options sitename/url back to localhost/mysite like it was previously and was able to get my site back exactly like it was but the problem now is every link/menu I click on leads back to localhost/xampp, when I hover my mouse over the link it shows the right address but when clicked it goes back to localhost/xampp.

I tried other websites and the links work but just not the site that I edited the general setting, I read up online but this is the closest to what I’m experiencing excpet this is on Xampp and not Wamp

I had a similar problem. I worked locally on one computer, when I moved everything to a new computer and solved some database problems. All my drupal links kept linking to my wamp server homepage.

I then realised that I have enabled ‘clean url’ in admin panel when I worked on my old computer (administration → configuration → search and metadata → clean URLs). But I didn’t switch on rewrite_module in my new wamp server in my new computer. That caused the problem because the server was not able to find all the ‘clean url’ the drupal is keep leading to.

So here is what I did: I clicked the green wamp icon, and then went to 'Apache → Apache Modules and ticked the rewrite_module. and then refreshed the page. It worked nicely for me!

One more question: every time after you click a link in your drupal site, what are the url look like? are they end up with something like “/#overlay=admin/appearance” or something like “q?=node” ?

Have you tried making a backup of your database, then doing a search and replace there for all instances of localhost/xampp?

By the way, next time you go to move a site, try making a backup on your desktop of the database, and changing the URLs in it to the URL of your live site using search and replace, then install that database on your live server. Don’t change the settings of your development site, or you won’t be able to use that site on your local environment in the future. That way, also, if anything goes wrong you still have the untouched original database to fall back on.

1 Like

Hmmmm no I haven’t, I’ll do that now and thanks for the tip, I’ll never make that mistake again. Hopefully your solution works, I’ll be back. Thanks for your time

Finally found a solution, hopefully this helps someone in the future, it was my permalinks that was messed up, I changed it back to the default (plain) one and then changed it to the my preference (post name)…everything’s working now!

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.