Sorry in advance for the long post.
Goal:
Local Development of Wordpress 3.0 with:
1. Easy subversion updating of core Wordpress files, themes and plugins
2. Using mysite.com instead of localhost for easier deployment
I had number 2 working using the advice from http://devpress.com/blog/a-really-sweet ... vironment/ and the httpd.conf and hosts file changes listed below. Then, I moved core Wordpress files into a subdirectory based on the directory structure below and item 1 worked, but item 2 is now broken. See http://ottopress.com/2011/creating-a-wo ... using-svn/ re: item 1. I’m sure it has something to do with the Virtual Host setup I have, but I don’t know how to fix it.
Environment:
Windows XP
XAMPP 1.7.4
Wordpress 3.2.1
Directory Structure:
In my xampp folder, I have
/htdocs/mysite/
Under this directory, I have:
/wp_core (all wordpress files from svn with my modified .htaccess)
/wp_content (exported from /wp_core with my added plugins/themes)
wpconfig.php
.htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /mysite/wp_core/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /mysite/wp_core/index.php [L]
</IfModule>
# END WordPress
httpd.conf
<VirtualHost 127.0.0.1>
ServerName mysite.com
DocumentRoot "C:/xampp/htdocs/mysite/wp_core"
ServerAdmin me@mysite.com
<Directory C:/xampp/htdocs/mysite/wp_core>
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
wp-config.php
/* Added definitions to move content location to subfolder */
define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/mysite/wp_content’ );
define( 'WP_CONTENT_URL', 'http://localhost/mysite/wp_content’);
Hosts file
127.0.0.1 localhost
127.0.0.1 mysite.com #local
# 123.4.5.6 example.com #production
Results I’m getting:
With the setup above, I get a blank screen at mysite.com. I assume this is because for some reason it’s pointing to /htdocs/mysite where there is now no index.php.
If I remove the Virtual Host code from the httpd.conf file, I get XAMPP setup by going to mysite.com which I assume is pointing to xampp/htdocs which has index.php for XAMPP. I can get to my Wordpress site either by using mysite/wp_core or localhost/mysite/wp_core, but I can’t seem to get Virtual Host to resolve to mysite.com and see the site.