Title: Local Development
Author: Andy Fragen
Published: <strong>2016 年 1 月 14 日</strong>
Last modified: 2025 年 10 月 8 日

---

搜尋外掛

![](https://ps.w.org/local-development/assets/banner-772x250.png?rev=2560201)

![](https://s.w.org/plugins/geopattern-icon/local-development_d6d9db.svg)

# Local Development

 由 [Andy Fragen](https://profiles.wordpress.org/afragen/) 開發

[下載](https://downloads.wordpress.org/plugin/local-development.2.11.0.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/local-development/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/local-development/#reviews)
 * [開發資訊](https://tw.wordpress.org/plugins/local-development/#developers)

 [技術支援](https://wordpress.org/support/plugin/local-development/)

## 外掛說明

這個外掛會為仍在本機開發階段的外掛或佈景主題加上開發通知，通知會顯示於外掛頁面及
佈景主題頁面，並能防止已選取的外掛及佈景主題進行更新。

 * 自動將外掛及佈景主題納入版本控制。
 * 自動允許使用本機檔案伺服器。
 * 允許略過 WordPress 5.2 白色當機畫面 (WSoD，White Screen of Death) 關機處理常式。
 * 執行於 localhost 時，為工具列加入警示色彩。預設值為啟用。
 * 在外掛頁面加入 Git 代管圖示。預設值為關閉圖示。如果安裝並啟用 GitHub Updater，
   不會出現這項設定。
 * 允許在 `wp-config.php` 設定 `WP_ENVIRONMENT_TYPE`。

歡迎在 [GitHub 上對 develop 分支](https://github.com/afragen/local-development)提出
提取要求。

需要 PHP 7.4 或更新版本。

## 螢幕擷圖

[⌊外掛設定⌉⌊外掛設定⌉[

外掛設定

[⌊[外掛] 頁面⌉⌊[外掛] 頁面⌉[

[外掛] 頁面

[⌊[佈景主題] 頁面⌉⌊[佈景主題] 頁面⌉[

[佈景主題] 頁面

[⌊多站網路的 [佈景主題] 頁面⌉⌊多站網路的 [佈景主題] 頁面⌉[

多站網路的 [佈景主題] 頁面

## 使用者評論

![](https://secure.gravatar.com/avatar/0dea124c3961a052ef3363287f015e4b931c6caa483e727cc821e40b3ee0bccc?
s=60&d=retro&r=g)

### 󠀁[Just what I was looking for!](https://wordpress.org/support/topic/just-what-i-was-looking-for-473/)󠁿

 [claygriffiths](https://profiles.wordpress.org/claygriffiths/) 2021 年 1 月 28 
日 1 則留言

I expect no less from Andy 😃

![](https://secure.gravatar.com/avatar/ed52bbd3a41c6acde5e40a68bc7057b4d62caab11f037557555f6c4d2297c6da?
s=60&d=retro&r=g)

### 󠀁[Great for displaying “localhost” status during MAMP development](https://wordpress.org/support/topic/great-for-displaying-localhost-status-during-mamp-development/)󠁿

 [Larry Daniele](https://profiles.wordpress.org/larrydaniele/) 2020 年 9 月 21 日

I’m using MAMP to develop a plugin locally. When MAMP is properly set up and running,
it’s easy not realize if the website in the browser is running locally or remotely.
Installing the “Local Development” plugin makes it easy to see via the green highlight
in the admin bar along with the word “local” in it. Simple, visual and effective.
Thanks!

![](https://secure.gravatar.com/avatar/da792acdeb2527434eaa1bac195bc142d3b5e885a7488388f14429d633dfc17d?
s=60&d=retro&r=g)

### 󠀁[A Life Saver…](https://wordpress.org/support/topic/a-life-saver-58/)󠁿

 [wpadvocate](https://profiles.wordpress.org/wpadvocate/) 2020 年 7 月 21 日

This can prevent a potential disaster if you work locally. In my past I have made
changes to live site by mistake. NO MORE!!! Thanks to this plugin.

![](https://secure.gravatar.com/avatar/2b851d094dfa6b2157bc706a95f5b3d27a1d09336ea787f8d525917928ce7017?
s=60&d=retro&r=g)

### 󠀁[Works well, easy to use, customizable](https://wordpress.org/support/topic/works-well-easy-to-use-customizable/)󠁿

 [Clifford Paulick](https://profiles.wordpress.org/cliffpaulick/) 2020 年 6 月 24
日 1 則留言

Plus, Andy is great!

![](https://secure.gravatar.com/avatar/029af49448f4e850f4e2bd61e0f31f2cee66e9a1e981359835a05761260ced7f?
s=60&d=retro&r=g)

### 󠀁[Great plugin](https://wordpress.org/support/topic/great-plugin-8637/)󠁿

 [Kevin Pryce](https://profiles.wordpress.org/kpry44/) 2016 年 9 月 3 日 1 則留言

Did everything it said it would. Will be a good tool.

 [ 閱讀全部 5 則使用者評論 ](https://wordpress.org/support/plugin/local-development/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈Local Development〉的開發相關工作。

參與者

 *   [ Andy Fragen ](https://profiles.wordpress.org/afragen/)
 *   [ Raruto ](https://profiles.wordpress.org/raruto/)

〈Local Development〉外掛目前已有 3 個本地化語言版本。 感謝[全部譯者](https://translate.wordpress.org/projects/wp-plugins/local-development/contributors)
為這個外掛做出的貢獻。

[將〈Local Development〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/local-development)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/local-development/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/local-development/)，或透過 
[RSS](https://plugins.trac.wordpress.org/log/local-development/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/local-development/)。

## 變更記錄

#### 2.11.0 / 2025-09-08

 * update for Git Updater Additions tab/rebrand
 * use `init` hook in startup to avoid local_textdomain error
 * update requirements

#### 2.10.1 / 2024-12-15

 * update for Git Updater rebrand to not duplicate git icons

#### 2.10.0 / 2024-12-11

 * some reorganization to fix `_load_textdomain_just_in_time`
 * set `WP_ENVIRONMENT_TYPE` variable

#### 2.9.2 / 2024-12-05

 * don’t use `init` hook to in startup

#### 2.9.1 / 2024-12-02

 * add GA to generate POT
 * linting
 * more fixing for `_load_textdomain_just_in_time`

#### 2.9.0 / 2024-11-01

 * remove `load_plugin_textdomain()`
 * fix setting to show/hide git host icon
 * composer update

#### 2.8.4 / 2024-07-11

 * composer update
 * update GitHub Actions
 * update tested to
 * linting

#### 2.8.3

 * add nonce check for `update_settings()`, bad Andy

#### 2.8.2 / 2023-03-20

 * PHP 8.1 compatibilty updates

#### 2.8.1 / 2022-05-10

 * only use `esc_attr_e` for translating strings
 * use `sanitize_title_with_dashes()` as `sanitize_file_name()` maybe have attached
   filter that changes output
 * update for Local.app adding `WP_ENVIRONMENT_TYPE` constant in `local-bootstrap.
   php` file

#### 2.8.0 / 2021-07-07

 * update WPConfigTransformer to use alternate anchor if default not present
 * add @10up GitHub Actions for WordPress SVN

#### 2.7.3 / 2021-03-05

 * update docblocks
 * update tested to 5.7

#### 2.7.2 / 2020-11-21

 * remove ‘Edit’ action link
 * fix PHP warning when some settings not yet saved

#### 2.7.1 / 2020-10-05

 * try to correcty display defined `WP_ENVIRONMENT_TYPE` in Settings
 * remove branch switch list from GitHub Updater plugins/themes and add _In Local
   Development_ item

#### 2.7.0 / 2020-099-15

 * set custom admin bar to display environment type
 * remove `WP_ENVIRONMENT_TYPE` on deactivation
 * remove a line of jQuery for removing `update` row class as unnecessary and now
   [conflicting with GHU](https://github.com/afragen/github-updater/pull/898)
 * disable the auto-update link from WP 5.5

#### 2.6.2 / 2020-09-01

 * only set `WP_ENVIRONMENT_TYPE` when changed

#### 2.6.1 / 2020-09-01

 * fix for saving `WP_ENVIRONMENT_TYPE`

#### 2.6.0 / 2020-09-01

 * add setting for `WP_ENVIRONMENT_TYPE` in WP 5.5+
 * refactor plugin startup a bit

#### 2.5.7 / 2020-07-20

 * set disabled checked option if `WP_DISABLE_FATAL_ERROR_HANDLER` is true

#### 2.5.6 / 2020-07-10

 * fix logic for no setting

#### 2.5.5 / 2020-07-09

 * skip mu-plugins and drop-ins
 * filter options to save to remove unchecked and VCS repos
 * add git host icon for Gists
 * defer to GitHub Updater to show git host icons

#### 2.5.4 / 2020-06-01

 * sanitizing, escaping & ignoring

#### 2.5.3 / 2020-03-28

 * move `Settings` action link to front

#### 2.5.2 / 2020-02-03

 * use `is_localhost()` for local git server setting and make automatic

#### 2.5.1 / 2020-01-24

 * run if no settings yet saved

#### 2.5.0 / 2020-01-23

 * update `Requires at least` in plugin file
 * add VCS checkouts automatically, thanks @Raruto
 * add Git Host icons as default setting for plugins and themes
 * add localhost admin bar coloring when on localhost, default is on
 * some now settings only display when running in localhost
 * add repositories that are added from [GitHub Updater Additions](https://github.com/afragen/github-updater-additions)

#### 2.4.1 / 2019-05-09

 * a11y updates for settings tabs

#### 2.4.0 / 2019-01-30

 * remove language pack updates for selected plugins/themes
 * only add WSOD bypass when appropriate

#### 2.3.0 / 2019-01-22

 * add bypass for WordPress 5.2 WSOD Shutdown Handler
 * move loading hooks out of constructors
 * pass saved options to class constructors

#### 2.2.0 / 2018-11-25

 * use composer for dependencies and autoloader

#### 2.1.0 / 2018-10-01

 * updated error handling in Singleton factory
 * added `class Bootstrap` to allow for easier time with main plugin file

#### 2.0.0

 * refactored to have each group in its own class, much more OOPy 😉
 * use wpcs codesniffer
 * removed checkboxes and delete links for checked plugins/themes

#### 1.6.0 / 2018-05-26

 * added ability to use local file server on LAN during development
 * refactored hiding of update row to use jQuery and remove row, not CSS dislay 
   none
 * update to PSR-2

#### 1.5.0

 * stopped creation of generic global variables

#### 1.4.0 / 2017-04-16

 * redesigned Settings to put checkbox in front of plugin/theme name
 * updated screenshots

#### 1.3.1 / 2017-04-13

 * move Autoloader to new location
 * cleanup

#### 1.3.0 / 2016-11-06

 * fixed PHP notice on settings page
 * correctly load translations
 * added our own PHP version check

#### 1.2.4

 * cast `self::$themes` as array when empty, fixes PHP notice

#### 1.2.3

 * fixed saving on single install when nothing selected

#### 1.2.2

 * fix PHP notices on initial install and no saved settings

#### 1.2.1

 * fix PHP notice

#### 1.2

 * add hiding of update messages for GitHub Updater

#### 1.1

 * specify `admin_head-settings_page_local-development` to add styles

#### 1.0

 * rebrand as **Local Development**

#### 0.2

 * hide update nag for selected repositories to prevent updating

#### 0.1

 * initial release

## 中繼資料

 *  版本 **2.11.0**
 *  最後更新 **8 個月前**
 *  啟用安裝數 **100+**
 *  WordPress 版本需求 ** 5.4 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.9.4**
 *  PHP 版本需求 ** 7.4 或更新版本 **
 *  語言
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/local-development/)、[Dutch](https://nl.wordpress.org/plugins/local-development/)、
   [English (US)](https://wordpress.org/plugins/local-development/)、及 [Portuguese (Portugal)](https://pt.wordpress.org/plugins/local-development/).
 *  [將這個外掛本地化為你的母語版本](https://translate.wordpress.org/projects/wp-plugins/local-development)
 * 標籤:
 * [development](https://tw.wordpress.org/plugins/tags/development/)[localhost](https://tw.wordpress.org/plugins/tags/localhost/)
   [theme](https://tw.wordpress.org/plugins/tags/theme/)[upgrade](https://tw.wordpress.org/plugins/tags/upgrade/)
 *  [進階檢視](https://tw.wordpress.org/plugins/local-development/advanced/)

## 評分

 5 星，滿分為 5 星

 *  [  5 個 5 星使用者評論     ](https://wordpress.org/support/plugin/local-development/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/local-development/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/local-development/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/local-development/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/local-development/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/local-development/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/local-development/reviews/)

## 參與者

 *   [ Andy Fragen ](https://profiles.wordpress.org/afragen/)
 *   [ Raruto ](https://profiles.wordpress.org/raruto/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/local-development/)