Skip to content

Instantly share code, notes, and snippets.

@WPsites
WPsites / gist:2820551
Created May 28, 2012 18:35
If you use the _s starter theme from automattic you can enter these commands to replace _s with your theme name
# Search for:'_s', Replace with:'yourthemename' (text domain)
find . -type f \( -iname "*.php" -o -iname "*.css" -o -iname "*.txt" \) -exec sed -i "" "s/\'_s\'/\'yourthemename\'/g" '{}' \;
# Search for:_s_, Replace with:yourthemename_ (function names)
find . -type f \( -iname "*.php" -o -iname "*.css" -o -iname "*.txt" \) -exec sed -i "" "s/_s_/yourthemename_/g" '{}' \;
# Search for: _s, Replace with: Yourthemename (in comments)
find . -type f \( -iname "*.php" -o -iname "*.css" -o -iname "*.txt" \) -exec sed -i "" "s/ _s/ Yourthemename/g" '{}' \;
# Don't remove the space in ' Yourthemename'
@WPsites
WPsites / gist:2819623
Created May 28, 2012 15:03
Recursive download of a web page (clone) useful if converting a site to WordPress.
$ wget -nH --no-clobber --page-requisites --html-extension --restrict-file-names=windows --domains www.website-address.co.uk http://www.website-address.co.uk/