如何在 Windows Server 2016 上安裝 Hyper-V

參考網址:yowko

確認 Hyper-V 硬體需求

  1. 使用第二層位址轉譯 (SLAT) 的 64 位元處理器。
  2. CPU 對 VM 監視模式延伸模組的支援 (Intel CPU 上的 VT-c)。
  3. 至少 4 GB 記憶體
  4. BIOS 需啟用

    • 虛擬化技術
    • 防止硬體強制的資料執行
  • 可以透過在 powershell 或是 command prompt 中執行 Systeminfo.exe 來確認是否符合
     

使用 PowerShell

  1. 以管理員身份開啟 Windows PowerShell

  2. 安裝 Hyper-V

    Install-WindowsFeature -Name Hyper-V -ComputerName <computer_name> -IncludeManagementTools -Restart

    • 如果是安裝在本機,可以忽略 -ComputerName <computer_name>
  3. 確認安裝狀況

    Get-WindowsFeature -Name Hyper-V -ComputerName <computer_name>

    • 如果是安裝在本機,可以忽略 -ComputerName <computer_name>
發表於 Windows系統 | 發表迴響

SORBO USB充電鋰電池

參考網址:碩而博

是鋰電池,可重覆充電使用,透過USB充電,非常實用的產品。
3號/AA電池充電僅約1小時就可充飽。每顆約新台幣100元。

發表於 生活資訊 | 發表迴響

WordPress 多人版WordPress架設教學

參考網址:小樽

編輯wp-config.php
[php]//define(‘WP_ALLOW_MULTISITE’, false);[/php]
把前面著的註解//拿掉,並且把false改成true
[php]define(‘WP_ALLOW_MULTISITE’, true);[/php]

還要到 工具>網誌網路安裝 做初始設定

完成上述步驟後再次登入WP你就發現介面有了點改變,話面最上方變成”我的網站”和”網誌網路管理員”,左側Menu多了控制台和網站,恭喜你成功建立了Wordpress多人版

發表於 wordpress | 發表迴響

WordPress 一鍵搬家外掛 All in One WP Migration 使用教學與解除匯入檔案大小限制

參考網址:妖精的號角
這個外掛在「匯出」檔案時並沒有檔案大小的限制,卻在「匯入」時設立了512M的限制,必須購買授權才能解鎖。
所幸WordPress是個開源的CMS,安裝的任何外掛通常也能夠很方便地看到原始碼,而且該外掛對檔案大小的限制驗證並不嚴謹。

修改wp-content/plugins/all-in-one-wp-migration/constants.php 搜尋「MAX_FILE_SIZE」
大約在284行會發現
 

define( 'AI1WM_MAX_FILE_SIZE', 2 << 28 );

把「2<<28」改大一點就可以了

發表於 wordpress | 發表迴響

WordPress 文本編輯器預設文字修改

在WordPress發表新文章時,常會需要加入參考網址,每次都打這串字覺得有些麻煩。如果新增文章時可以預設有這些字不是很好嗎?
查看了網頁原始碼
 

<div id="wp-content-editor-container" class="wp-editor-container">
<textarea class="wp-editor-area theEditor" rows="10" cols="40" name="content" id="content">
</textarea>
</div>

用系統預設文本編輯器時要修改wp-include/class-wp-editor.php 291行
在printf( $the_editor, $content );這行之前加入
 

//by sairwolf set default
if($content == "")
    $content = "參考網址:".$content;

 

如果是使用CKEditor外掛則要修改wp-content/plugins/ckeditor-for-wordpress/ckeditor_class.php 1171行

發表於 wordpress | 發表迴響

WordPress 安裝CKEditor後打不開wordpress小工具的解決方法

參考網址:傑糯米理財

如果你在安裝CKEditor for WordPress之後,登入WordPress點開小工具(外觀 / 小工具)卻顯示以下問題:

Fatal error: Call to undefined method
_WP_Editors::enqueue_default_editor() in ~~~

找到CKEditor這個外掛的資料夾
(通常路徑為 /public_html/wp-content/plugins/ckeditor-for-wordpress )

編輯ckeditor_class.php拉至最下方新增程式碼:
public static function enqueue_default_editor() {}

發表於 wordpress | 發表迴響

WordPress 恢復WordPress 3.5被隱藏的「鏈結」功能

參考網址:免費的喘息

許多部落客都用「鏈結」功能來交換連結,只要在後台加入站名、網址,然後在分頁中調用link.php就可輕鬆、方便的製作出交換連結的頁面。只是在全新安裝的 WordPress 3.5 中,官方已經把原本的「鏈結」功能隱藏起來(從舊版本升級者則繼續保留)。未真正刪除的原因可能怕影響到之前有用這「鏈結」功能的使用者。

如果你有需要這「鏈結」功能,當然官方有推薦安裝「Link Manager」外掛來解決這問題。但事實上只要一句短代碼就能幫你解除官方隱藏起來的「鏈結」功能。

利用短代碼 恢復被隱藏的「鏈結」

修改佈景主題functuons.php檔案加入以下代碼:

1
add_filter( 'pre_option_link_manager_enabled', '__return_true' );

不用懷疑,就這麼簡單。其實這段語法是從「Link Manager」裡提取出來的,也是這外掛唯一一段語法。

發表於 wordpress | 發表迴響

WordPress CKEditor文章編輯器中插入程式碼

參考網址:資訊人生

這三個外掛皆需安裝

  • SyntaxHighlighter CKEditor Button
  • CKEditor for WordPress
  • Auto SyntaxHighlighter
發表於 wordpress | 發表迴響

WordPress一鍵備份全站 WordPress 佈景、MySql資料庫、文章、外掛,All-in-One WP Migration 只要10分鐘!

參考網站:電腦王阿達

很好用的wordpress備份外掛,只是備份後的檔案不知如何打開。

發表於 wordpress | 發表迴響

WordPress 10個WordPress增強型編輯器

參考網站:可能吧

基於以往網路的使用習慣,我選用CKEditor。

發表於 wordpress | 發表迴響