跳至主要内容

Windows 系統安裝 WordPress

Installation of Xampp on Windows

  • 安裝 Xampp 後,執行 XAMPP Control Panel
  • 啟用 Apache 及 MySQL 的 Server
  • 瀏覽器連上 localhost
  • 檔案總管開啟以下路徑,並刪除所有檔案。
  • C:\xampp\htdocs
  • 瀏覽器重新連上 localhost

PHP 簡介(以下步驟非必要)

  • htdocs 資料夾內新增 file.php
  • file.php 加入以下代碼
file.php
<?php
print("Its Working!");
?>

How to change Apache port

使用 XAMPP Control Panel 啟用 Apache Server 時,預設埠號為 80。如需變更預設埠號,可依下列步驟操作。

變更 Apache 埠號

  • XAMPP Control Panel 停用所有伺服器
  • Apache -> Config -> Apache (httpd.conf)
  • 找到註解 #Listen 12.34.56.78:80,更改其下一行內容。
  • 承上一步驟,將內容改為「Listen 新埠號」
  • 找到「ServerName localhost:舊埠號」
  • 將上一步驟找到的內容改為「ServerName localhost:新埠號」

Installation of WordPress on Windows

下載 WordPress 後,將檔案解壓縮,
然後將 wordpress 資料夾內所有檔案移至 C:\xampp\htdocs

瀏覽器連上 localhost。若以上步驟正確執行,瀏覽器將重新導向http://localhost/wp-admin/setup-config.php

指定語言,點擊 Continue 安裝 WordPress。

點擊 Let's go!

瀏覽器連上 http://localhost/phpmyadmin/

點擊 User accounts 頁籤

點擊 Add user account

填寫 User name、Host name、Password、Re-type

Global privileges 勾選全選

其他欄位維持預設值,點擊 Go,成功執行後會看見提示:You have added a new user.

新增 Database

返回安裝 WordPress 的瀏覽器頁籤,點擊 Submit,然後點擊 Run the installation

輸入 Site Title、Username、Password、Your Email,點擊 Install WordPress

瀏覽器連上 localhost 可看見初始化的個人頁面。

連上 http://localhost/wp-admin 可登入後台