Last active
August 29, 2015 13:55
-
-
Save hugocf/8707432 to your computer and use it in GitHub Desktop.
Dynamic local “.dev” site mapping for Apache & WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Use name-based virtual hosting. | |
# | |
NameVirtualHost *:80 | |
# | |
# Dynamic virtual hosting | |
# | |
# http://some.example.dev => /Users/username/Sites/example | |
<VirtualHost *:80> | |
VirtualDocumentRoot "/Users/username/Sites/%-2" | |
ServerName default.dev | |
ServerAlias *.dev | |
</VirtualHost> | |
# http://some.example.10.0.0.1.xip.io => /Users/username/Sites/example | |
<VirtualHost *:80> | |
VirtualDocumentRoot "/Users/username/Sites/%-7" | |
ServerName xip.io | |
ServerAlias *.xip.io | |
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://codex.wordpress.org/Editing_wp-config.php#Advanced_Options | |
define( 'WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] ); | |
define( 'WP_HOME', 'http://' . $_SERVER['SERVER_NAME'] ); | |
# http://andrewnacin.com/2010/04/23/5-ways-to-debug-wordpress/ | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_LOG', true ); # error_log("debug message"); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
define( 'SCRIPT_DEBUG', true ); | |
define( 'SAVEQUERIES', true ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment