Skip to content

Instantly share code, notes, and snippets.

@doolin
Created June 15, 2011 15:19
Show Gist options
  • Save doolin/1027321 to your computer and use it in GitHub Desktop.
Save doolin/1027321 to your computer and use it in GitHub Desktop.
svn overwriting a WordPress installation
#!/usr/bin/sh
# This script will overwrite an existing
# WordPress installation with the current
# head of trunk. Once it has been reverted,
# you may need to update the database, and
# WP will prompt you for that automatically.
# This is untested with these options!
# The script commands work from the command
# line; make sure and do a practice test
# before attempting to run this as a script.
export repo="http://core.svn.wordpress.org/trunk"
export target="./heyday"
svn checkout --force $repo $target
svn revert -R $target
@ammist
Copy link

ammist commented Jun 15, 2011

Nice! Usually I put things like this in the ~/install directory, though that's pretty arbitrary. What directory do I have to be in to run this?

@doolin
Copy link
Author

doolin commented Jun 15, 2011 via email

@ammist
Copy link

ammist commented Jun 29, 2011

Just tried this on my dev environment - worked like a charm!!

@ammist
Copy link

ammist commented Aug 16, 2011

Actually, this works better:

svn checkout "http://core.svn.wordpress.org/trunk" ~/public_html

This puts WP in the web root directory. Also, for some reason --force doesn't work in my environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment