熱門文章

顯示具有 website 標籤的文章。 顯示所有文章
顯示具有 website 標籤的文章。 顯示所有文章

2016年11月11日 星期五

[WP]Lionfree免費空間建立Wordpress網站 - 01 安裝wordpress


Lionfree不是營利服務,我們是公眾化的免費服務,提供真正優質且自由的免費主機。Lionfree仰賴大眾的贊助營運,並且由 Lionfree 社群與 Lionfree Team 志工團隊進行管理與維護
提供您完整、親切的繁體中文主機管理介面,即使發生任何問題,您即可使用中文與我們的客服團隊交談,使您的問題能以最快的速度獲得解答!

註冊完lionfree 免費空間之後
接下來就是安裝wordpress了


2015年8月14日 星期五

Easyengine – 自架 WordPress 的最佳拍檔

前言

自行架 WordPress 站的朋友多數使用 Sharing web hosting 服務,主要是因為平價、簡單,幾乎即買即用。不過這類服務仲使不限流量與容量,但都會有公平條款和嚴格的 CPU 使用量限制,所以瀏覽人次一多,就會被 suspend。就算平時人數不多,只是有一篇文章受歡迎而爆紅,都會立即被停用。
其實使用 VPS 所需的金錢和技巧並非想像般多,DigitalOcean 最平亦只需 US$5 一個月,比不少 web hosting 更平,而所需要的技巧,網上都有大量教學,大部人都能輕鬆應付,因為只要 copy and paste 就可以了。
現在使用 VPS 不用逐個元件安裝,有 package 輸入一句就可以了,之前企企使用 serverpilot,是一個不錯,非常推薦的 control panel。
Nginx + Apache 這個兼顧速度和兼容性的組合,serverpilot 本身佔用資源亦很低,所以之前企企都以為會一直使用 serverpilot.
不過企企鐘意試東試西,看到更好又會想試,所以並不滿足,始終 LNMP,純 Nginx + PHP-FPM 的環境才能完全揸盡伺服器的效能。
但 Nginx 的 rewrite rule 和 Apache 不同,尤其使用 W3 Total Cache 後就更複雜,所以對初學者有一定難度。
Easyengine 這個 command line 的安裝工具正好令所有設定簡化,非常容易就架好伺服器。
另外 Easyengine 最大好處就是已經預先 compline 了 mod_pagespeed 和 nginx cache,不用自行 compile,所以方便得多。
(下面以 ubuntu 14.04 作例子)

Pre-Install

這個步驟並非必要,在 Linode、Digital Ocean、自行安裝的 Ubuntu 等等都沒有需要。但如果是 OpenVZ 的 VPS 如 Servermania 則有機會要安裝這個。
sudo apt-get install software-properties-common

安裝 Easyengine

首先 update 所有已安裝的 package
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade
另外要設定時區,因為 easyengine 內的 php.ini 會跟系統的時區一樣。
dpkg-reconfigure tzdata
選擇 Asia –> Hong Kong 就可以了。
之後安裝easyengine
wget -qO ee rt.cx/ee && sudo bash ee
easyengine name password
安裝途中會問你拿名和 email,不過只是作通知用途,可亂填
easyengine finished installation
完成安裝 easyengine 了
安裝後可以輸入以下 command 來令 easyenine 可以 auto complete (按 tab 鍵可以自動完成指令)指令
source /etc/bash_completion.d/ee_auto.rc
之後就可以安裝 WordPress,雖然 easyengine 可以支援不同 plugin,但暫時以最高效能的設定為例子,將 example.com 改為你的 domain 就可以了。
ee site create example.com --wpredis --hhvm --pagespeed
按 3 次 y 和填了名字和 email 之後,恭喜,你旳 wordpress 已設定完成可以使用了。
是否很簡單呢?其實現在使用 VPS 就是如此簡單。
Happy Blogging.
如果忘了 Easyengine 的 username 和 password 可以打
sudo ee secure --auth
如困忘了 wordpress 的 password 可以打
sudo ee site update example.com --password
(企企按:sitemap 方面建議使用 WPSEO / YOAST SEO,因為 easyengine 已內置了有關的 rewrite rules)
easyengine site created
已經安裝了 WordPress,大家可以看到 WordPress 和 easyengine 的 admin 名稱密碼。
記得抄下呀
當然 easyengine 還有很多 option,現在約略為大家解釋一下,詳細可以看看 Easyengine 的 document,如果初學者的話可以忽略不理。
除 redis 外,easyengine 還支援 nginx fast-cgi cache, w3 total cache, wp supercache 三種,大家只需要制作網站時將上面 –wpredis 替換為以下 command 就可以了。
–w3tc 指 W3 total cache
–wpsc 指 wordpress super cache
–wpfc 指 nginx fast-cgi cache
–wp 指不使用任何 cache
如果之後想更新另一種 cache,如想轉回 w3tc 的話,輸入以下 command 就可以了。
ee site update example.com --wp --w3tc
而 –hhvm 亦是 optimal,HHVM 是 Facebook 為改善速度而制作,並開源的 PHP 引擎,比 PHP-FPM 更快,但只能兼容 90% 的 PHP code,而 WordPress 本身已經 100% 支援 HHVM,不過可能有少量 plugin 未能支援 HHVM,但 easyengine 會用 PHP-FPM 作為 fall-back,所以不會有不能執行的情況。
–pagespeed 則是由 Google 開發令網頁加速的技術,一般都會建議開啓,不會有甚麽問題的。
在管理 WordPress 很多時都需要使用 phpmyadmin 等工具,其實 easyengine 亦已內置,企企會建議安裝以下數個工具:Adminer, phpMyAdmin, phpMemcachedAdmin, FastCGI cleanup script, OPcache, Webgrind, Anemometer.
不過其實一句 command 就可以了
ee stack install --admin
安裝後就可以使用 phpmyadmin 等工具了。
easyengine admin site
Easyengine 的 default port 是 22222,不過可以任轉的
還有這個恐嚇字句不需理會,純因為你沒有買 SSL cert 的警告而已
phpmyadmin 所需要用的 mysql username 和 password 可以在 wp-config.php 找到
easyengine wp-config.php
可以在 wp-config.php 找到 mysql 的 username 和 password
另外,如果需要 mysql 的 root password,可以以 root 身份打 cat /root/.my.cnf
就可以看到 mysql 的 root password.

將 WordPress 轉去 Multisite

Easyengine 亦支援 multisite,制作 multisite 只要輸入以下 command
ee site create example.com --wpsubdir --wpredis --hhvm --pagespeed
如果想由現在網站由 single site 轉去 multisite 的話只需要
ee site update example.com --wpsubdir

Update Easyengine

如果更新 php / nginx 等元件的話,只需要打以下 command 就可以。
sudo ee stack upgrade
更新 easyengine 亦很簡單,以下一句就可以了
wget -qO eeup http://rt.cx/eeup && sudo bash eeup
P.S. 上面 username 和密碼那麽大方任看,當然是因為那個只是暫時起出來截圖用的 WordPress,本文刊出之日早已 delete 了。

2015年8月5日 星期三

[Website]8 Basic Design Tips for New Websites


addthis-designstrategiesThinking about designing a new website, or even redesigning a site you already have? Here are some basic design strategies to keep in mind for higher engagement and usability. 

1. Keep it Simple

Whether you’re thinking about your home page, navigation, or content, keep it simple. Don’t make it hard to your visitors to find what they’re looking for. If you want visitors to press a button or fill out a form, don’t make them scroll to find it. Make it easy to find, and use your site’s navigation.
If you have a particular goal in mind, you can even invite visitors to do something, right when they arrive at your site. Now that’s simple!

2. Keep it Concise

Shorter content is easier to read, and will get your point across more quickly. See?

3. Header Hierarchy

Be sure to use a consistent hierarchy of headers. In HTML, these look like H1, H2, H3, and so forth. These headers convey the structure of your content, helping readers understand how your content is organized. Think about this structure when choosing font sizes and weights, so that an H3 doesn’t look more visually prominent than its parent H2.

4. White Space is Your Friend

Provide some room between lines of text and set up borders on the sides of your pages to keep content from becoming too wide and hard to read. Allow some space around pictures. These strategies allow visitors’ eyes to visually organize and scan your content more easily.

5. Speaking of Colors . . .

Use restraint—your visitors will thank you. Pick a primary color that will provide the foundation of your design, then pick a contrasting accent color for important buttons and other interface elements. Use tools like Adobe Color to explore different combinations of colors that look great together.

6. Make it Easy to Stay

Sometimes visitors arrive at your home page, but often search results or other links bring them to some other page in your site. Be sure to provide links in your content, and offer content recommendations to suggest other pages to read next. This invites visitors to stay longer and view more of what your site has to offer.

7. Make it Easy to Share

While content recommendations keep your current visitors around longer, sharing will invite new visitors to come to your site. Think about how sharing tools fit into your new design. They can float on the side your pages (remember those borders you created?) or can appear within your content, at the beginning or end of an article. Check out these best practices for more suggestions.

8. Make it Easy to Follow

Don’t forget to invite visitors to follow you on Facebook, Twitter and other social networks. This helps bring visitors back, and is a great way to know who your most loyal audience is—which, as our data shows, is very valuable.
There are many resources available online to help you with your new design. Visit sites you enjoy, think about how their designs help you use them more easily, and experiment with those ideas on your own site.
We’d love to hear how your design turned out, and how you used AddThis tools with your new creation. Good luck!


:http://www.addthis.com/blog/2014/10/24/8-basic-design-tips-for-new-websites/#.VcGxUXgkP40