| | #1 |
| Long Time Warrior War Room Member Join Date: 2008 Location: United States
Posts: 582
Thanks: 15
Thanked 108 Times in 54 Posts
Blog Entries: 2 |
Is there any way to find/ replace the text within many php files at once? I want to make theme-wide changes to a wordpress theme. So, I need a program that will search through a the theme folder, through the internal folders to all the php files and preform the find and replace function. Any Help? |
| P.S. If you found my post useful, please click the "Thanks" button below... | |
| |
| | #2 |
| Peaceful Warrior War Room Member Join Date: 2009 Location: Calgary
Posts: 277
Thanks: 16
Thanked 106 Times in 63 Posts
|
Most software made for web programming will have this function. I use Netbeans IDE. Also Notepad++ is very popular. Both are free. -Ryan |
| FREE WSO: Protect and Automatically Deliver Your Digital Products Ask the Internet Marketing Geek <-- Happy to help with technical challenges MiniSiteMaker.org <-- Free software to make your mini-sites fast and easy | |
| |
| | #3 |
| VIP Warrior Join Date: 2005 Location: Potemkin Village
Posts: 1,724
Thanks: 745
Thanked 742 Times in 498 Posts
|
If you've got shell access, you can do this in the blink of an eye like this: Code: find ./ -type f | xargs sed -i 's/original_text/replacement_text/g' |
|
:)
| |
| |
| | #4 |
| Long Time Warrior War Room Member Join Date: 2008 Location: United States
Posts: 582
Thanks: 15
Thanked 108 Times in 54 Posts
Blog Entries: 2 |
Its primarily for wordpress templates and plugins. All the files are in a folder, and I want to do a find and replace for all the files in each folder without having to open each file manually. I could do it easily if I only had to do one file but you know most themes and plugins have 23, 30, 50+ files. @RJP will those programs work with what I'm trying to do? |
| P.S. If you found my post useful, please click the "Thanks" button below... | |
| |
| | #5 |
| Active Warrior Join Date: 2010 Location: Maryland
Posts: 32
Thanks: 0
Thanked 4 Times in 4 Posts
|
Yes, both responses will satisfy what you need. The second is the easier way if you're familiar with shell (and have access), but an IDE/Notepad++ is easier if you aren't familiar with SSH.
|
| |
| | #6 |
| Banned Join Date: 2009 Location: NE UK
Posts: 753
Thanks: 632
Thanked 261 Times in 230 Posts
| RJL Software - Software - Utility - Simple Search-Replace does what it says on the can!
|
| |
| | #7 |
| Active Warrior War Room Member Join Date: 2010 Location: Chicago
Posts: 49
Thanks: 2
Thanked 7 Times in 7 Posts
|
The obvious- Dreamweaver. Just add the folder in the 'My Sites' folder and search through all the files in your site.
|
| |
| | #8 |
| Active Warrior Join Date: 2010
Posts: 76
Thanks: 1
Thanked 4 Times in 4 Posts
|
Any decent text editor will do that. I use UltraEdit, but there of course are others.
|
| |
|
| Bookmarks |
| Tags |
| files, find or, php, replace |
| |