WordPress on 2 IP addresses

wordpress

I needed to access an intranet wordpress hosted on a server with 2 networks and to be accessible from any of them (no DNS server available). WordPress wants on Settings – General to have an address.

Long story short, open wp-config.php and add the following lines:

$current_host = $_SERVER['HTTP_HOST'];
define('WP_HOME', 'http://' . $current_host);
define('WP_SITEURL', 'http://' . $current_host);

Comments

comments

Author: ionut_d

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.