captured sparks

Moving to Wordpress

So, I’m back and have just moved my blog to Wordpress. I had been running on a custom system for a couple of years but never got round to developing it and it made sense to make the move.

I’ve set Wordpress up so that I can deploy with Capistrano following the instructions at Adam Hunter’s blog. I’ve set out below a few more recipes I added to the deploy code to take into account the plugins I am using. These were mainly to ensure I could continue running a development version on my Mac.

For those using a Sitemap generator, generate the Sitemap in the shared directory and use the following to symlink it:

desc "Make symlink for sitemap"
task :sitemap do
    run "ln -nfs #{shared_path}/sitemap.xml #{release_path}/public/sitemap.xml"
end

If you are using the Smart Archives plugin, the archives.txt file will be in different places on your dev machine. Make a duplicate file called smartarchives-online.php and set the archives.txt location to the appropriate place. Then use the following:

desc "Copy online smart archives file"
task :archives do
  run "cp #{release_path}/public/wp-content/plugins/smartarchives-online.php #{release_path}/public/wp-content/plugins/smartarchives.php"
  run "chmod 775 #{release_path}/public/wp-content/archives.txt"
end

Finally, to remove the wp-config.php file, use the following:

desc "Remove dev config file"
task :remove_dev_config do
  run "rm -rf #{release_path}/public/wp-config.php"
end

Thankfully, as I did not have too many entries on my blog, setting up 301 redirects has not been too much of a task. I’ll have to wait and see when Google next crawls the site, if I’ve picked all the changes up.

You can talk to me, or trackback from your own site. Or, if you're looking for more things to read? Why not check out the Archive.

Talk to me