0

I'm setting up a PHP web server on OpenBSD. phpinfo() is up and running.

But, every time I try to install Wordpress, it's redirecting the client to the dummy hostname created on OS install (mycomputer.my.domain), which obviously doesn't load.

I've changed the hostname to localhost in /etc/myname and restarted the system. Typing in hostname gets me localhost.

phpinfo() shows:

System OpenBSD localhost 5.5 GENERIC#276 i386 
Hostname:Port localhost:80 
_SERVER["SERVER_PORT"]  80
_SERVER["SERVER_NAME"]  127.0.0.1
_SERVER["SERVER_PROTOCOL"]  HTTP/1.1
_SERVER["SERVER_SOFTWARE"]  Hiawatha v9.2
_SERVER["SERVER_ADDR"]  0.0.0.0
_SERVER["REDIRECT_STATUS"]  200
_SERVER["HTTP_HOST"]    192.168.1.102

I've tried on both Hiawatha and Apache with the same results.

Where is Wordpress still pulling mycomputer.my.domain from and how do I get it to stop?

3
  • Is this happening just for wordpress? Or does it redirect you for any html/php file?
    – DerekC
    Dec 23, 2014 at 20:07
  • Only Wordpress. I can load any html file fine and test.php with echo "hello world" also works fine. Wordpress must be calling some kind of function which is returning mycomputer.my.domain to it.
    – Vince Ying
    Dec 23, 2014 at 20:24

1 Answer 1

0

WordPress hard-codes the site URL within its code, so you will need to change it there.

From this link, you can add these lines in your site's wp-config.php file:

define('WP_HOME','http://mycomputer.my.domain');
define('WP_SITEURL','http://mycomputer.my.domain');
1
  • Thanks, but this is a fresh install of Wordpress so there is no existing wp-config. I have also already tried hardcoding my IP into wp-config. The installer still insists on trying to go to mycomputer.my.domain (and is ignoring my wp-config entries).
    – Vince Ying
    Dec 23, 2014 at 17:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .