Search & Replace

外掛說明

注意事項:這個外掛已不再維護。

如果有其他開發者願意接手開發,這個外掛的程式碼仍會保留在 SVN 及 GitHub 上。

透過 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 存放庫

主要功能

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

Inpsyde 團隊設計出品

Inpsyde 團隊組建於 2006 年,始終專注於網站及 WordPress 的工程開發工作。

捐款贊助

如果你想捐款贊助我們的開發工作,我們只需要你給這個外掛正面的評價,無須捐款。

螢幕擷圖

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

安裝方式

環境需求

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

使用者評論

2022 年 12 月 12 日
Overall a fast and reliable tool for getting the job done: + Fast (no fancy GUI or progress bar which slows it down) + Dry Run which gives you amount of changes + optionally a detail view of which changes occur - Abandoned (tested until 6.0.3) On Wordpress 6.1.1 with this plugin I ran a Search for: "://mydomain.com/wp-content/uploads/" Replace with: "://media.mydomain.com/" + It worked fast and reliably in regards to the replacement operation. - But a bit buggy in terms of the diff-preview of the dry run:   + The preview shows the tables where changes will get performed as section headlines, and below the changes in the table cells in a diff view: Highlighting in red the text that goes away and in green the text that gets inserted.   - Buggy: Strangely is shows "tables with changes" as section headlines which do not have any changes shown below.   + Nevertheless in the eventual results those remained untouched. Status of plugin in Wordpress 6.1.1: - The preview has some "empty false positives". + But the database operation itself worked as expected.
2022 年 10 月 31 日
Still useful for example to manually quickly update Slider Revolution image paths after a site migration (or simpliy make these paths absolute -> relative) searching in table "wp_revslider_slides"... Even though sometimes acts strange with escaping chars: e.g. can't find strings like " http://mysite.d.mydomain.com/wp-content/uploads/revslider " and you have to search for "http:\\/\\/mysite\.d\.mydomain\.com\\/wp-content\\/uploads\\/revslider" instead, some others correctly matches strings like "/wp-content/uploads/revslider" without escaping chars at all (!?).... When forced to use escaping chars in the search string, the "Details" link won't show the preview table correctly BTW. Hope someone will continue it one day.
2022 年 5 月 6 日
This is the best free Search & Replace plug-in. Allows you to do a dry-run before writing the changes to the database.
2021 年 12 月 30 日
I installed several other Plugins, but this one was definite my best hit i could use safely. Best is the sample-run before changing. ALso the appearing changes after use is outstanding. Everything within the free-version. Great!
閱讀全部 263 則使用者評論

參與者及開發者

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

參與者

〈Search & Replace〉外掛目前已有 13 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Search & Replace〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

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
  • 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.
  • Improve code structure, preparation for more solid UnitTests.
  • Improve Modal Table UI.
  • Added Multiline searching #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
  • 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
  • Prepare the Plugin for localization, change Text-Domain.#47
  • Remove difference in wordings for buttons between descriptions.#46

v3.0.1 (2016-02-09)

  • Add support for Searchpattern with quotes. #40
  • Basic travis support for travis was added. #38
  • Fix Unittest #37

v3.0.0 (2016-01-29)

  • Refactor the plugin, new requirements, goal and result.
  • Thanks to Sven 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 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