這幾天完成wordpress網誌的備份、搬移與自動升級,做一下筆記:
wordpress 網誌的備份,分為兩個部分:資料庫與檔案
1. 資料庫的備份可以選用各種不同的工具,如:WP本身的外掛或phpmyadmin、webmin甚或直接下SQL指令來進行備份。
2. 檔案的備份,建議使用 dump 指令,將整個wp目錄(包含 upload…)完整備份起來,指令:
dump -0j -f 備份的檔名.dump.bz2 備份的目錄名稱
備份完成後進行搬移,將欲移轉的主機系統架設好(含 Apache, MySQL, PHP)

1. 首先復原資料庫,將備份的sql檔匯入新的MySQL資料庫(使用 phpMySQL或Webmin工具)。
2. 檔案搬移至新伺服器之web目錄,指令:
restore -rf 備份的檔名.dump.bz2
這樣應該就完成檔案的搬移,且檔案原來的屬性、權限都會完整複製過來。
到此,還要注意一些地方(Apache 的相關設定):
1. Apache 的 mod_rewrite 是否有啟動?
sudo a2enmod rewrite
service apache2 restart
2. wp 所在目錄的設定檔修改
<Directory “/var/www/ethan”>
Options FollowSymLinks
AllowOverride All
# AllowOverride controls what directives may be placed in .htaccess files.
Order allow,deny
Allow from all
</Directory>
否則將會發生路徑錯誤之error
最後,也藉此機會進行自動升級,包含核心程式(wordpress 3.0.1)、可升級外掛、可升級外觀(theme)都可藉由控制台一起升級!
目前已完成搬移與升級,正常運作中…
2012.02.02 update












[...] http://ethan.twbbs.org/2010/09/03/wp-backup-resdore 標籤: CMS, Drupal, 伺服器, 筆記 [...]
[...] http://ethan.twbbs.org/2010/09/03/wp-backup-resdore __spr_config = { pid: '4eebf87c396cef08960001a7', title: '[筆記]Gallery3、Drupal7網站完成搬移', ckw: 'CMS,Drupal,伺服器,筆記,自由軟體', chan: '', icon: "http://ethan.twbbs.org/wp-content/uploads/2011/10/drupal7-km-150×150.jpg", no_slide: '', slide_logo: true, pub: '2011-10-05 03:36:34', url: 'http%3A%2F%2Fethan.twbbs.org%2F2011%2F10%2F05%2Fgallery3-drupal7-move', header: '您也可以看看…' }; var content = document.getElementById('simplereach-slide-tag').parentNode, loc; if (content.className){ loc = '.' + content.className; } if (content.id){ loc = '#' + content.id; } __spr_config.loc = loc || content; (function(){ var s = document.createElement('script'); s.async = true; s.type = 'text/javascript'; s.src = document.location.protocol + '//d8rk54i4mohrb.cloudfront.net/js/slide.js'; __spr_config.css = 'document.location.protocol + '//d8rk54i4mohrb.cloudfront.net/css/p/4eebf87c396cef08960001a7.css'; var tg = document.getElementsByTagName('head')[0]; if (!tg) {tg = document.getElementsByTagName('body')[0];} if (tg) {tg.appendChild(s);} })(); 其他讀者也有興趣的文章分享:FacebookEmailPrint留言 留言Powered by Facebook Comments 標籤: CMS, Drupal, 伺服器, 筆記, 自由軟體 [...]