红帽提供了一个很稳定的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
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/119088.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...