舊年係GCP用”WordPress Certified by Bitnami”,原來佢地個個Base Image 係Debian 8. 上兩個月收到通知要更新,今個weekend趁住有時間順便一次過upgrade。今次會試下”Nginx WordPress with NGINX and SSL Certified by Bitnami“,睇下用Nginx會唔會快過Apache。 1. New VM 首先登入GCP,左上角Menu > MarketPlace,然後搜尋 WordPress,再揀Nginx WordPress with NGINX and SSL Certified by Bitnami,按Launch on Compute Engine button。 因為Free Tier 嘅關係,記住要揀係美國嘅region,同 f1-micro instance. Disk size 30GB 以下就得, 我自己用15GB. info: https://cloud.google.com/compute/pricing#freeusage 2. Backup 等緊個VM create嘅時候,可以就係用緊嘅WordPress 做 Backup。Install “All-in-One WP Migration” plugin, …
原本諗住加個WordPress Plugin 呃吓like coin,等將來可以用黎派like。點知原來個website係會俾人登出嚟 😛 咁唯有整番個website靚仔小小啦。 呢個site 係GCP free tier (每個月$0.x egress only, 爽啊),原本個Base image 係 Debian 8,上個月discontinue support, 所以要更新到 Debian 9. 今次就試下由Apache轉去Nginx,睇下Performance 會唔會有改善。技術文下次再寫。 更新完 Compute Engine VM, WordPress, Themes, Plugin … etc, 奇怪個主頁顯示唔到LikeCoin Widget, 最後發現原來係個Theme Home Page setting 嘅問題,唔係page又唔係post type。然後就去睇下個widget 其實係 iframe, 咁我自己加返條Link就會出到。 https://button.like.co/in/embed/<YOUR_USERNAME>/button?referrer=https%3A%2F%2F<YOUR_DOMAINNAME>
1 2 3 |
[blog count="3" imageType="left" full="true" nopaging="false"] [iframe src="https://button.like.co/in/embed/hang321/button?referrer=https%3A%2F%2Fwww.hang321.net" width="100%" height="212"] |
recently migrated wordpress to GCP, using cloud launcher – wordpress by bitnami. That pretty easy, google other tutorials and follow it. e.g. https://console.cloud.google.com/launcher/details/bitnami-launchpad/wordpress http://www.compoundtheory.com/migrating-my-blog-to-google-cloud-platform/ Set up here is some highlighted procedures 1. create compute engine via clound launcher 2. create cloud SQL – db username and password 3. mysqldump old wordpress database 4. load …
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 …
宜家唔會星期一至五都係廣州, 當有需要先返上去. 不過home-office 既第一個星期都幾唔習慣… 超低效率, 有時唔知遊左去邊度 好既就係日日都有住家飯食, 唔使成日食埋d KFC / 木桶飯 / 飯堂 / 客家菜 人地廣告係”2 個禮拜減14磅”… 我估我就係加了….. 這3天假期搞了3樣野, 之前買左隻 asus wl-500w 既router, 打算 flash 就 DD-WRT 過程一波三折… 先係flash 死左 (係因為自己等左好耐好似冇反應, unplug power cord….stupid) 插lan 線有led, lan card 冇IP, ping router 就reboot. 上個月羅去代理度整, 好彩佢換過部俾我 🙂 唔知佢地check 唔check 到firmware 有問題? 跟足wiki 既tutorial , step by step …
很久沒有blog, 今日中秋節補假進行一次”搬家” 其實都不是搬家, 只係將幾年前blogspot 的entry import 到 wordpress, 再將LifeType 既entry?SQL copy 到?wordpress 雖然呢個default template 有點簡單 (都唔只有點…), 過幾日有時間再搵d template Reference: 從 Blogger 轉移到 WordPress 的技巧 http://www.vixual.net/blog/archives/242 到 WordPress 的 [後台管理] -> [管理] -> [匯入] -> [部落客]。 終於把lifetype 轉成 WordPress http://blog.mypage.idv.tw/?p=36 透過sql語法將 資料 新增到 WordPress 資料庫中
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# comment INSERT INTO wp_comments (comment_ID, comment_post_ID, comment_content, comment_date, comment_date_gmt, comment_author_email, comment_author_url, comment_author, comment_author_IP) SELECT XXX+id, YYY+article_id, normalized_text, DATE, DATE + INTERVAL - 16 HOUR, user_email, user_url, user_name, client_ip FROM plog_articles_comments # post INTO wp_posts (ID, post_author, post_date, post_date_gmt, post_modified, post_modified_gmt, comment_count) SELECT YYY+id, 2, DATE, DATE + INTERVAL - 16 HOUR, DATE, DATE + INTERVAL - 16 HOUR, num_comments FROM plog_articles UPDATE wp_posts, plog_articles_text SET wp_posts.post_title = plog_articles_text.topic WHERE wp_posts.ID = plog_articles_text.id + YYY UPDATE wp_posts, plog_articles_text SET wp_posts.post_content = plog_articles_text.TEXT WHERE wp_posts.ID = plog_articles_text.id + YYY # fill out guid UPDATE wp_posts SET wp_posts.guid = CONCAT("<a href="http://www.YourDomain.com/blog/archives/" data-mce-href="http://www.YourDomain.com/blog/archives/">http://www.YourDomain.com/blog/archives/</a>", wp_posts.ID) WHERE wp_posts.guid = "" # clean out [@more@] update wp_posts set post_content=replace(post_content,'[@more@]',""); |