To give you an idea about my experience with Wordpress...its none. I've got a wordpress site from a client of mine to manage. I have years of experience with websites so I'm confident I can do this. Or.. I was. I want to run the site locally via MAMP to make changes and then push them via Git to the remote server. But...the site I got is mapped to the remote domain name. So everytime I want to go to the local domain I'm forwarded to the remote domain.

I can't get in to the admin, I tried replacing all absolute paths in the database (https://github.com/interconnectit/Search-Replace-DB). I checked all files...and now I'm out of ideas. What can I do to solve this problem?

Thanks in advance.

  • 2
    Search and replace was a good try - some WP sites also set URLs in the wp-config.php file at the root. Check and see if WP_HOME or WP_SITEURL are set there. wordpress.org/support/article/changing-the-site-url – WebElaine Jun 17 at 14:44
  • I agree check wp-config, but the URLs you did need to change in the database are 'siteurl' and 'home' in the wp_options table. They're usually the first two rows. You might want to check any .htaccess you've got too in case you've got a rewrite-to-HTTPS rule there that's sending you to the public site there. – Rup Jun 17 at 14:49
  • All of the above, not to mention if your install is multisite you will want to check the wp_blogs table for mappings as well. – Nathan Powell Jun 17 at 14:54
  • 1
    I started fresh and followed all the steps. It first didn't work but after a browser cache empty. It works perfectly! – Joost Jun 17 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.