红帽提供了一个很稳定的PAAS服务平台:openshift!此博客即作为wordpress建在里面。 这里记录怎样升级与备份wordpress。
预备: 安装 openshift command line tool rhc:
$gem install rhc
复制
$rhc setup
复制
$rhc apps 得到应用名称=>$APPS
复制
升级wordpress:
$mkdir ~/website
复制
$rhc git-clone $APPS
复制
下载wordpress安装包,比如wordpress-3.9.zip。
$unzip wordpress-3.9.zip
复制
$cd ~/website/$APPS/
复制
$mv $APPS/ bk
复制
$cp wordpress $APPS/
复制
$cp bk/wp-config.php $APPS/
复制
$rm -rfv bk
复制
$git add .
复制
$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(包含数据库和上传文件):
$rhc snapshot save -a $APPS
复制
恢复wordpress:
$rhc snapshot restore $APPS
复制
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/119088.html原文链接:https://javaforall.cn