Migrage from www.hang321.net/blog to www.hang321.net 1. backup tar zcvf blog.\bin\date +%Y%m%d.tar.gz blog/ 2. Move mv * ../ 3. edit wp_options table LIKE %hang321.net/blog% manually replace to hang321.net/ (could be done by sql too, but only couples of entries to modify) 4. change permalinks change from ‘Numeric’ to ‘Day and name’, all links broken, especially from Google. find a plugin, called permalinks-moved-permanently, generate a “301 Moved Permanently” to keep its pageRank Not work because it look for postname, manually edit the query from post_name to ID
1 |
if( $ID = $wpdb->get_var( 'SELECT ID FROM '.$wpdb->posts.' WHERE ID = "'.$slug.'" AND post_status = "publish" ' ) ) { |
Done! Further Reading: Moving a WordPress blog from a sub-directory to the root directory http://www.rentablogger.com/blog/2009/01/23/moving-a-wordpress-blog-from-a-sub-directory-to-the-root-directory/ Permalinks Moved Permanently http://wordpress.org/extend/plugins/permalinks-moved-permanently/
有位同事講野開頭成日會講 “I told you XXX”, “I told you YYY” 雖然唔係好明, 不過都冇問點解 直到今日出去食lunch, 隔離枱一位國內黎既留學生不停講… “我跟你講…”, “我講你聽….” well, 唔使仙枕都可以解開呢個謎啦…… p.s. 我帶住headphone 都聽到佢地既對話…. 所以我知道佢地係學生….
reading: http://www.dd-wrt.com/wiki/index.php/Optware%2C_the_Right_Way http://www.dd-wrt.com/wiki/index.php/Samba3 $ vi /opt/etc/init.d/S08samba NAME=samba samba_active=1 [ 1 = $samba_active ] || exit 0 ## add user: steve grep -q steve /etc/passwd || echo “steve:*:992:992:steve:/var:/bin/false” >> /etc/passwd # add group grep -q steve /etc/group || echo “steve:x:992:” >> /etc/group # display chinese text in ssh shll grep -q LANG /tmp/root/.profile || echo “export LANG=zh_TW.UTF-8” >> /tmp/root/.profile $ smbpasswd -a steve $ vi /opt/etc/samba/smb.conf Fix some permission issue $ find /somefolder -type d -exec chmod 775 {} \; $ find /somefile -type f -exec chmod 664 {} \; @MacBook after mount, System Preferences > Account > login mount sabma after you logged in ref: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=334644#334644 http://dd-wrt.com/phpBB2/viewtopic.php?t=56439 http://hi.baidu.com/myeyre/blog/item/2b873d6d2198ebf1431694b3.html