Skip to content

Instantly share code, notes, and snippets.

@ambercouch
Last active February 2, 2020 04:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ambercouch/9639185 to your computer and use it in GitHub Desktop.
Save ambercouch/9639185 to your computer and use it in GitHub Desktop.
Define your site url in wp-config.php
/**
* When developing locally define these constants in your wp-config.php instead to your database.
* This saves time when moving your database.
*/
if (!defined('WP_SITEURL')) {
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME']);
}
if (!defined('WP_HOME')) {
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME']);
}
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment