Last active
December 20, 2015 05:19
-
-
Save dynamis/6077629 to your computer and use it in GitHub Desktop.
WordPress バージョンアップ用スクリプト (Apache に書き込み権限を与えず使ってる場合用)
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
#!/bin/sh | |
PATH=$PATH:/usr/local/sbin:/usr/local/bin | |
DOCROOT=data | |
WPFILES=wordpress | |
cp -R $DOCROOT $DOCROOT-backup-`date +"%Y%m%d"` | |
# admin files | |
rm -rf $DOCROOT/wp-admin | |
cp -R $WPFILES/wp-admin $DOCROOT/wp-admin | |
# language files | |
rm -rf $DOCROOT/wp-content/languages | |
cp -R $WPFILES/wp-content/languages $DOCROOT/wp-content/languages | |
# default plugin files | |
rm -rf $DOCROOT/wp-content/plugins/akismet | |
rm -rf $DOCROOT/wp-content/plugins/wp-multibyte-patch | |
cp -R $WPFILES/wp-content/plugins/akismet $DOCROOT/wp-content/plugins/akismet | |
cp -R $WPFILES/wp-content/plugins/wp-multibyte-patch $DOCROOT/wp-content/plugins/wp-multibyte-patch | |
# default theme files | |
rm -rf $DOCROOT/wp-content/themes/default | |
rm -rf $DOCROOT/wp-content/themes/classic | |
rm -rf $DOCROOT/wp-content/themes/twentyten | |
rm -rf $DOCROOT/wp-content/themes/twentyeleven | |
rm -rf $DOCROOT/wp-content/themes/twentytwelve | |
cp -R $WPFILES/wp-content/themes/twentyten $DOCROOT/wp-content/themes/twentyten | |
cp -R $WPFILES/wp-content/themes/twentyeleven $DOCROOT/wp-content/themes/twentyeleven | |
cp -R $WPFILES/wp-content/themes/twentytwelve $DOCROOT/wp-content/themes/twentytwelve | |
# includes files | |
rm -rf $DOCROOT/wp-includes | |
cp -R $WPFILES/wp-includes $DOCROOT/wp-includes | |
# top dir files | |
cp $WPFILES/*.php $DOCROOT | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment