红帽提供了一个很稳定的PAAS服务平台:openshift!此博客即作为wordpress建在里面。 这里记录怎样升级与备份wordpress。
预备: 安装 openshift command line tool rhc:
代码语言:javascript复制$gem install rhc
代码语言:javascript复制$rhc setup
代码语言:javascript复制$rhc apps 得到应用名称=>$APPS
升级wordpress:
代码语言:javascript复制$mkdir ~/website
代码语言:javascript复制$rhc git-clone $APPS
下载wordpress安装包,比如wordpress-3.9.zip。
代码语言:javascript复制$unzip wordpress-3.9.zip
代码语言:javascript复制$cd ~/website/$APPS/
代码语言:javascript复制$mv $APPS/ bk
代码语言:javascript复制$cp wordpress $APPS/
代码语言:javascript复制$cp bk/wp-config.php $APPS/
代码语言:javascript复制$rm -rfv bk
代码语言:javascript复制$git add .
代码语言:javascript复制$git commit -m "update to new wordpress3.9."
成功后显演示样例如以下信息:
remote: Stopping MySQL 5.1 cartridge
remote: Stopping PHP 5.3 cartridge (Apache mod_php)
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Stopping PHPMyAdmin cartridge
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Building git ref ‘master’, commit 8f52203
remote: The deplist.txt file was deprecated in favor of .openshift/pear.txt.
remote: Please consider running `git mv deplist.txt .openshift/pear.txt’ command.
remote: Checking deplist.txt for PEAR dependency…
remote: Preparing build for deployment
remote: Deployment id is 3528d784
remote: Activating deployment
remote: Starting MySQL 5.1 cartridge
remote: Starting PHPMyAdmin cartridge 。。。。。。。
备份wordpress(包含数据库和上传文件):
代码语言:javascript复制$rhc snapshot save -a $APPS
恢复wordpress:
代码语言:javascript复制$rhc snapshot restore $APPS
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/119088.html原文链接:https://javaforall.cn