Home >
Computers >
Web Design
Dreamweaver Find and Replace Text
How do I Find and Replace text using Dreamweaver?
To find and replace text in Dreamweaver just follow these simple steps. Provided below are examples for how to find and replace multiple instances of text in just one page or for an entire website. Dreamweaver's tool is extremely efficient for making large-scale website changes in just a few seconds.
It's highly recommended that you make a backup of your files before doing a find and replace to save yourself any headaches in case you make a mistake. Making a backup is especially important if you are generating large-scale website changes to an entire directory. I always make a habit of backing up my files even if I think it's a simple change. As you will see from the example below, even the simplest change can cause issues if you aren't careful. The beauty to Find and Replace is that most
human created errors are very easy to correct if you spot them in time.
Find and Replace Text in one HTML document
1. Here is my HTML web page in Dreamweaver
Design View (Example 1). My goal is to remove the hyphens from all occurrences of text
Sun-Tzu so it just appears as
Sun Tzu without any hyphens.
Example 1

|
2. In example 2 below, still in Design View, I highlight the text I want to change.
Example 2
3. With the text still highlighted I switch to
Code View.
Example 3
 |
|
4. Now that I'm in Code View I right-click the highlighted text and choose
Find and Replace or keyboard
Ctrl + F to bring up Find and Replace Options.
Example 4
5. Inside Find and Replace Options
(a) I make sure that I am only making changes to this document (note that I have circled the file's title),
(b) I choose *
Search: Text, (by default Dreamweaver had
Source selected and I don't want this-- I will explain later),
(c) I check that the
Find text matches what I highlighted "Sun-Tzu",
(d) I manually type-in the
text change "Sun Tzu" without a hyphen inside the
Replace field,
(e) I leave only one option checked,
Ignore whitespace , and finally, (f) I choose
Replace All and saved my document.
Example 5
6. Success! I have successfully replaced all occurrences of the hyphenated Sun-Tzu as it occurs in TEXT. However, if I had chosen the Find and Replace option
Search: Source it would also find HTML TAGS such as hyperlinks containing the text I was replacing. This will cause an error since now the link will be broken when I upload my page to the server. Luckily this would be very easy to correct. Using the same steps I would simply Find
Sun Tzu.html and replace it with
Sun-Tzu.html.
Example 6
* To avoid the problem of accidentally changing hyperlinks or other necessary HTML tag attributes, scripts, or code, don't select
Search: Source.
Find and Replace Text In an Entire Website (Large-Scale Find and Replace Across Multiple Web Pages)
This is really very simple to use Find and Replace across multiple web pages. All you need to do is apply the same steps I showed you for changing one document. Only this time in Find and Replace options you simply need to select
Find In: Folder... instead of Current Document.