Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not connect to wordpress in localhost (GET http://localhost/ net::ERR_CONNECTION_REFUSED)

Tags:

php

wordpress

I just backup wordpress DB and public_html folder in virtual-web-hosting.

And I move them to my local MAMP.

But when I enter http://localhost:8888/, it just transfer to http://localhost.

And the error message (GET http://localhost/ net::ERR_CONNECTION_REFUSED) shows in chrome.

Could some one give me some hint?

I had tried to put a dummy index.php with echo "debug" in /htdoc/test

and then connected to http://localhost:8888/test, it shows "debug" just as expected.

Thanks.

like image 499
wilson Liu Avatar asked Jan 15 '15 15:01

wilson Liu


1 Answers

Change the site url and home url on your Wordpress database.

On your phpMyAdmin (should be http://localhost/phpmyadmin)

Go to your options table, search the option_value for your previous site url and change to localhost (e.g. www.domain.com to localhost)

Its best to run of port 80 though instead of 8888.

like image 91
Danny Broadbent Avatar answered Oct 20 '22 07:10

Danny Broadbent