If you use the Wordpress Google Sitemap plugin and you use my non-patented Capistrano deployment scripts for Wordpress, then you’ll need to make some changes for things to work well.
Here’s what to do:
1. Add to the before_symlink task in my deploy.rb file two symlinks for the sitemap files in the shared directory:
2. Set the Sitemap plugin to generate the files to the /path/to/your/domain/shared/sitemap.xml, instead of the default path. The default path will be the current release directory, and you want to have the sitemap files to persist across Wordpress deployments.
Interesting note: Linux allows a symlink to a file that doesn’t exist, so you don’t have to generate the sitemap.xml file in the shared directory before deploying this update.