Skip to content

Instantly share code, notes, and snippets.

@felixmc
Last active December 18, 2015 00:59
Show Gist options
  • Save felixmc/5700937 to your computer and use it in GitHub Desktop.
Save felixmc/5700937 to your computer and use it in GitHub Desktop.
<?php
$host = $_SERVER["HTTP_HOST"];
$uri = ($host === $_SERVER["SERVER_NAME"] || $_SERVER["SERVER_NAME"] !== "localhost" ? "/wamp" : "") . "/wordpress";
$base_url = "http://" . $host . $uri;
define('WP_HOME', $base_url);
define('WP_SITEURL', $base_url);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment