Setting up WordPress to work at a service address (no domain)

To check the operation of the site without a domain (or redirect it), you can use a free service address:

  1. Turnon service address in the site settings.
  2. At the beginning config file WordPress (right after <?php) add lines like this:
    define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
    define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);