Last active
August 29, 2015 14:23
-
-
Save bookwyrm/2b8b123f1a7079c250cc to your computer and use it in GitHub Desktop.
Walkthrough: Setting up a Secure WordPress Site with Git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd wp-content/plugins/ | |
rm hello.php | |
cd ../themes/ | |
rm -fR twentyten twentyeleven twentytwelve twentythirteen twentyfourteen | |
cd ../../ | |
git commit -am 'Deleting unused themes and plugins' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp wordpress/wp-config-sample.php wp-config.php | |
cp wordpress/index.php . | |
touch environment.php | |
touch .gitignore | |
git add index.php wp-config.php .gitignore | |
git commit -m 'Placeholder configuration' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp -R wordpress/wp-content . | |
git add wp-content | |
git commit -m 'Manage themes and plugins outside of submodule' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir secure-wordpress-walkthrough | |
cd secure-wordpress-walkthrough | |
git init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git submodule add git://github.com/WordPress/WordPress.git wordpress | |
git commit -m 'Add WordPress submodule' | |
cd wordpress | |
git tag # list tags | |
git checkout 4.2.2 # checkout latest version | |
cd .. | |
git add wordpress # stage updates | |
git commit -m 'Checkout latest WordPress version' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment