Wordpress with Capistrano and Google Sitemaps plugin

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:

  run "ln -nfs #{deploy_to}/#{shared_dir}/sitemap.xml" \
    " #{current_release}/public/sitemap.xml"
  run "ln -nfs #{deploy_to}/#{shared_dir}/sitemap.xml.gz" \
    " #{current_release}/public/sitemap.xml.gz"

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.

This entry was posted on Sun, 10 Sep 2006 06:06:34 GMT . You can follow any any response to this entry through the Atom feed. You can leave a comment or a trackback from your own site.
Tags


Trackbacks

Use the following link to trackback from your own site:
http://blog.craz8.com/trackbacks?article_id=wordpress-with-capistrano-and-google-sitemaps-plugin&day=09&month=09&year=2006

Comments

Leave a response

Leave a comment