Skip to content

Instantly share code, notes, and snippets.

@snapeuh
Created October 11, 2016 14:00
Show Gist options
  • Save snapeuh/9ce9d8be17988cbaa6eaf1cea886b895 to your computer and use it in GitHub Desktop.
Save snapeuh/9ce9d8be17988cbaa6eaf1cea886b895 to your computer and use it in GitHub Desktop.
Use WordPress with a dynamic domain
<?php
define('SP_REQUEST_URL', ($_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['HTTP_HOST']);
define('WP_SITEURL', SP_REQUEST_URL);
define('WP_HOME', SP_REQUEST_URL);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment