Title: Search &amp; Replace
Author: WP Media
Published: <strong>2007 年 5 月 14 日</strong>
Last modified: 2024 年 8 月 26 日

---

搜尋外掛

![](https://ps.w.org/search-and-replace/assets/banner-772x250.png?rev=1776844)

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://ps.w.org/search-and-replace/assets/icon-256x256.png?rev=1776844)

# Search & Replace

 由 [WP Media](https://profiles.wordpress.org/wp_media/) 開發

[下載](https://downloads.wordpress.org/plugin/search-and-replace.3.2.3.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/search-and-replace/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/search-and-replace/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/search-and-replace/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/search-and-replace/#developers)

 [技術支援](https://wordpress.org/support/plugin/search-and-replace/)

## 外掛說明

透過 Search & Replace 外掛，具備管理者權限的站長便可以在網站中進行搜尋及取代作業。**
但在進行這項工作前**，請先為網站**建立**一份可供還原的**網站資料庫備份**。

為避免出現問題，請了解這個外掛會完全按照輸入資料進行搜尋，並將搜尋結果取代為 [取代
為] 欄位中指定的內容。
 一般常見錯誤： 搜尋字串：http://web.com/wordpress/ (字串
結尾包含正斜線 /) 取代為：http://neuweb.com/wordpress (字串結尾遺漏正斜線 /) 取代
後的網址會變成 http://neuweb.com/wordpresscontent/…

正確使用 [取代為] 功能的方式：
 搜尋字串：http://web.com/wordpress/ 取代為：http://
neuweb.com/wordpress/ 取代後的網址會變成 http://neuweb.com/wordpress/content/…

**我們實作了許多特殊功能！**

第一項便是 [取代網域名稱/網址]，這項功能可以對於快速簡單移轉 WordPress 網站至其他
主機相當有幫助，第二項則是完整支援序列化資料。還有更多功能等你一一挖掘出來。

我們的目標是讓這個外掛成為 WordPress 開發者及網站管理員的搜尋/取代解決方案。

> **請注意**，要啟用這個外掛，PHP 的最低版本需求為 5.6 或更新版本。

[**查看這個外掛的 GitHub 存放庫**](https://github.com/wp-media/search-and-replace)

#### 主要功能

 * 在 WordPress 網站資料庫中進行搜尋及取代
 * 變更 WordPress 安裝時設定的網域名稱及網址
 * 處理序列化資料
 * 可執行模擬作業或下載網站資料庫的 SQL 檔案
 * 變更資料庫前置詞
 * 備份及還原
 * 支援 WordPress 多站網路
 * 介面本地化已準備就緒，可將這個外掛本地化為任一語言

#### WP Media 團隊設計出品

**這個外掛由 [WP Media](https://wp-media.me) 開發維護**。

#### 捐款贊助

如果你想捐款贊助我們的開發工作，我們只需要[你給這個外掛正面的評價](https://wordpress.org/support/view/plugin-reviews/search-and-replace?rate=5#postform)，
無須捐款。

## 螢幕擷圖

 * [[
 * 搜尋及取代
 * [[
 * 取代網域名稱/網址
 * [[
 * 還原網站資料庫
 * [[
 * 備份網站資料庫
 * [[
 * 搜尋或搜尋後進行取代的結果頁
 * [[

## 安裝方式

#### 環境需求

 * WordPress 4.0 (多站網路亦同)
 * PHP 5.6，較新的 PHP 版本會帶來更快的執行效率

## 使用者評論

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

### 󠀁[It still works great](https://wordpress.org/support/topic/it-still-works-great-2/)󠁿

 [pmheart6](https://profiles.wordpress.org/pmheart6/) 2025 年 9 月 16 日

I changed my url, 12 tables with 58 entries . While not a big site, but it was nice.
it says not tested in the last 3 versions of WP. Welp, it works in php8.2x and WP
6.8.2

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

### 󠀁[Works fine when changing the domain](https://wordpress.org/support/topic/works-fine-when-changing-the-domain/)󠁿

 [Denny Müller](https://profiles.wordpress.org/redaquamedia/) 2025 年 3 月 6 日

I have used this plugin several times for different webpages. Especially when the
webpage was moved to other domain. It works fine. Before replace, it’s possible 
to test and check the results. Hats down and thanks!

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

### 󠀁[Bulk edits to the database](https://wordpress.org/support/topic/bulk-edits-to-the-database/)󠁿

 [Artneo](https://profiles.wordpress.org/artneo/) 2024 年 12 月 26 日

[Update 12/26/24] I tried using the bulk “CSV Format Search/Replace” feature, but
it seems only the latest replacement string is applied. I’ll now try another method,
such as using the WP-CLI.—This plugin is incredibly easy to use and the “CSV Format
Search/Replace” feature for bulk edits worked perfectly! Thank you to the developers
for creating such an awesome plugin! 😄

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

### 󠀁[Great and free](https://wordpress.org/support/topic/great-and-free-33/)󠁿

 [nspirov](https://profiles.wordpress.org/nspirov/) 2024 年 7 月 10 日

So useful and it is free – no “Pro” version to get the features. Thanks!

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

### 󠀁[does not work](https://wordpress.org/support/topic/does-not-work-1592/)󠁿

 [applicado](https://profiles.wordpress.org/applicado/) 2024 年 6 月 6 日

plugin searches and replaces character string and creates a new database, which 
you need to download, then import. The database that plugin created could not be
imported by plugin. Message says that the file is not a valid sql file. Kinda dumb
workflow, but not being able to import a sql file that was created by plugin is 
ridiculous

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

### 󠀁[Error prone](https://wordpress.org/support/topic/error-prone-2/)󠁿

 [skylabb](https://profiles.wordpress.org/skylabb/) 2024 年 5 月 26 日

When selecting many tables for the search, I often got errors. Another similar plugin
doing the exact job did not give me errors.

 [ 閱讀全部 282 則使用者評論 ](https://wordpress.org/support/plugin/search-and-replace/reviews/)

## 參與者及開發者

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

參與者

 *   [ WP Media ](https://profiles.wordpress.org/wp_media/)
 *   [ Simon Kraft ](https://profiles.wordpress.org/krafit/)
 *   [ Frank Bueltge ](https://profiles.wordpress.org/bueltge/)
 *   [ Rene Reimann ](https://profiles.wordpress.org/derpixler/)
 *   [ ChriCo ](https://profiles.wordpress.org/chrico/)
 *   [ s-hinse ](https://profiles.wordpress.org/s-hinse/)

〈Search & Replace〉外掛目前已有 17 個本地化語言版本。 感謝[全部譯者](https://translate.wordpress.org/projects/wp-plugins/search-and-replace/contributors)
為這個外掛做出的貢獻。

[將〈Search & Replace〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/search-and-replace)

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

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

## 變更記錄

#### 3.2.3 (2024-08-26)

 * Fix a vulnerability when deserializing objects from the database
 * Fix deprecation logs about optional parameters declared before required parameters

#### 3.2.2 (2024-05-16)

 * Now owned by WP Media
 * Fixed potential time based SQL injection

#### 3.2.1 (2019-06-06)

 * Update readme for tested up WP versions
 * Add check for replace function to get more solid replace for custom tables. [#132](https://github.com/wp-media/search-and-replace/pull/132/files)
 * Fix small typos
 * Fix Throwable because we set as minimum php 5.6

#### 3.2.0 (2019-01-17)

 * Added CSV format alternative for search/replace [#82](https://github.com/wp-media/search-and-replace/issues/82).
 * Improve code structure, preparation for more solid UnitTests.
 * Improve Modal Table UI.
 * Added Multiline searching [#119](https://github.com/wp-media/search-and-replace/issues/119).
 * Fix several issues to run always with php 5.6 to 7.2.

#### v3.1.2 (2016-12-31)

 * hotfix: prevent declaration error with Requisite

#### v3.1.1 (2016-12-24)

 * Refactor Plugin loading [#67](https://github.com/wp-media/search-and-replace/issues/67)
 * Display error notice is the search value the current domain and save changes 
   to Database selected

#### v3.1.0 (2016-02-07)

 * Improve codquality
 * Prepared for localization (GlotPress)
 * Prevent doing idle prozesses if search & replace pattern the same
 * Implement better BigData handling.
 * Implement better tab and adminpage handling [#33](https://github.com/wp-media/search-and-replace/issues/33)
 * Prepare the Plugin for localization, change Text-Domain.[#47](https://github.com/wp-media/search-and-replace/issues/47)
 * Remove difference in wordings for buttons between descriptions.[#46](https://github.com/wp-media/search-and-replace/issues/46)

#### v3.0.1 (2016-02-09)

 * Add support for Searchpattern with quotes. [#40](https://github.com/wp-media/search-and-replace/issues/40)
 * Basic travis support for travis was added. [#38](https://github.com/wp-media/search-and-replace/issues/38)
 * Fix Unittest [#37](https://github.com/wp-media/search-and-replace/issues/37)

#### v3.0.0 (2016-01-29)

 * Refactor the plugin, new requirements, goal and result.
 * _Thanks to [Sven Hinse](https://github.com/s-hinse/) for help to maintain the
   plugin_
 * Changeable table prefix on replace site URL tab enhancement
 * Implement database backup & import tab
 * Implement dry Run: Keep for search and replace
 * Prevent self destroy
 * Multisite basic support – show only tables of current site
 * Add special tab for replace the URL
 * Supports serialized data
 * Refactor the whole codebase

#### v2.7.1 (2015-05-28)

 * Fix for changes on database collate since WordPress version 4.2
 * Fix to reduce backslashes in search and replace string

#### v2.7.0 (2014-09-14)

 * Exclude serialized data from replace function (maybe we reduce the support)
 * Add hint, if is serialized data on the result table
 * Fix to see also the result case sensitive

#### v2.6.6 (09/05/2014)

 * _Thanks to [Ron Guerin](https://wordpress.org/support/profile/rong) for help 
   to maintain the plugin_
 * Fix to use $wpdb object for all database access
 * Fix inability to search and replace quoted strings
 * Output changes to clarify when searching vs. searching and replacing
 * Some changes to English strings and string identifiers

#### v2.6.5

 * Fix for change User-ID, add table `comments`

#### v2.6.4

 * Fix capability check, if the constant `DISALLOW_FILE_EDIT` is defined

#### v2.6.3 (10/10/2011)

 * filter for return values, html-filter
 * add belarussian language
 * add romanian language files

#### v2.6.2 (09/11/2011)

 * change right object for use the plugin also on WP smaller 3.0, include 2.9
 * add function search and replace in all tables of the database – special care!

#### v2.6.1 (01/25/2011)

 * Feature: Add Signups-Table for WP MU
 * Maintenance: check for tables, PHP Warning fix

#### v2.6.0 (01/03/2011)

 * Feature: add an new search for find strings (maybe a new way for search strings)
 * Maintenance: small changes on source

#### v2.5.1 (07/07/2010)

 * small changes for use in WP 3.0
    Status API Training Shop Blog About Pricing

## 中繼資料

 *  版本 **3.2.3**
 *  最後更新 **2 年前**
 *  啟用安裝數 **100,000+**
 *  WordPress 版本需求 ** 4.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.5.8**
 *  PHP 版本需求 ** 5.6 或更新版本 **
 *  語言
 * [Chinese (China)](https://cn.wordpress.org/plugins/search-and-replace/)、[Chinese (Taiwan)](https://tw.wordpress.org/plugins/search-and-replace/)、
   [Dutch](https://nl.wordpress.org/plugins/search-and-replace/)、[Dutch (Belgium)](https://nl-be.wordpress.org/plugins/search-and-replace/)、
   [English (Canada)](https://en-ca.wordpress.org/plugins/search-and-replace/)、
   [English (UK)](https://en-gb.wordpress.org/plugins/search-and-replace/)、[English (US)](https://wordpress.org/plugins/search-and-replace/)、
   [French (France)](https://fr.wordpress.org/plugins/search-and-replace/)、[Galician](https://gl.wordpress.org/plugins/search-and-replace/)、
   [German](https://de.wordpress.org/plugins/search-and-replace/)、[Polish](https://pl.wordpress.org/plugins/search-and-replace/)、
   [Russian](https://ru.wordpress.org/plugins/search-and-replace/)、[Spanish (Chile)](https://cl.wordpress.org/plugins/search-and-replace/)、
   [Spanish (Colombia)](https://es-co.wordpress.org/plugins/search-and-replace/)、
   [Spanish (Mexico)](https://es-mx.wordpress.org/plugins/search-and-replace/)、
   [Spanish (Spain)](https://es.wordpress.org/plugins/search-and-replace/)、[Spanish (Venezuela)](https://ve.wordpress.org/plugins/search-and-replace/)、
   及 [Swedish](https://sv.wordpress.org/plugins/search-and-replace/).
 *  [將這個外掛本地化為你的母語版本](https://translate.wordpress.org/projects/wp-plugins/search-and-replace)
 * 標籤
 * [import](https://tw.wordpress.org/plugins/tags/import/)[migrate](https://tw.wordpress.org/plugins/tags/migrate/)
   [replace](https://tw.wordpress.org/plugins/tags/replace/)[search](https://tw.wordpress.org/plugins/tags/search/)
   [sql](https://tw.wordpress.org/plugins/tags/sql/)
 *  [進階檢視](https://tw.wordpress.org/plugins/search-and-replace/advanced/)

## 評分

 4.3 星，滿分為 5 星

 *  [  212 個 5 星使用者評論     ](https://wordpress.org/support/plugin/search-and-replace/reviews/?filter=5)
 *  [  16 個 4 星使用者評論     ](https://wordpress.org/support/plugin/search-and-replace/reviews/?filter=4)
 *  [  13 個 3 星使用者評論     ](https://wordpress.org/support/plugin/search-and-replace/reviews/?filter=3)
 *  [  10 個 2 星使用者評論     ](https://wordpress.org/support/plugin/search-and-replace/reviews/?filter=2)
 *  [  31 個 1 星使用者評論     ](https://wordpress.org/support/plugin/search-and-replace/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/search-and-replace/reviews/#new-post)

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

## 參與者

 *   [ WP Media ](https://profiles.wordpress.org/wp_media/)
 *   [ Simon Kraft ](https://profiles.wordpress.org/krafit/)
 *   [ Frank Bueltge ](https://profiles.wordpress.org/bueltge/)
 *   [ Rene Reimann ](https://profiles.wordpress.org/derpixler/)
 *   [ ChriCo ](https://profiles.wordpress.org/chrico/)
 *   [ s-hinse ](https://profiles.wordpress.org/s-hinse/)

## 技術支援

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

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