I’m pretty sure many folks have ways of doing this, but this is how I test my work locally against current and beta/RC versions of WordPress:
[Note: I'm doing this on OS X. I'm pretty sure you can mimic this on Linux and maybe Windows with cygwin]
- I create a parent folder called “wordpress-dev”
- In there I put in both versions of WordPress, I name the current stable one “wordpress-stable”, the other “wordpress-beta”
- I edit my wp-config.php to grab settings based on the local url:
$location = getenv('SERVER_NAME');
include $location.'.php'; - In each file, I add all the domain & database settings that normally goes into the regular wp-config.php
- In the wordpress-beta folder, create a symlink to the wp-config.php file in the wordpress stable folder.
ln -s /path/to/stable/wordpress/folder/wp-config.php wp-config.php - Next, I symlink to my stable folder’s themes & plugins
ln -s /path/to/stable/wordpress/folder/wp-content/themes/ wp-content/themes
ln -s /path/to/stable/wordpress/folder/wp-content/plugins/ wp-content/plugin - Now, I can browse to each local domain I’ve set up in Apache (and my /etc/hosts file) and voila! – I’m seeing what needs changing from my current production code to be compatible with the latest WordPress beta or RC release.
The added benefit here is that I can make my work future proof on the production code so that I can actually support the next version of WordPress by the time it reaches RC without breaking anything. I can update beta versions of WordPress easily by just overwriting everything except the wp-config.php file and the wp-content folder. I can also adapt much quicker to changing/added APIs and do so from one code base.
Have any tips to share on how you stay up-to-date with WordPress versions? How do you test current releases alongside pre-release versions? Feel free to share in the comments.
Cheers!