Forum

Thread tagged as: Question, Suggestions, Discussion

Find and Replace the CMS content - possible?

My site has a phrase "XYZ-ABC" and I want to change it across all content in the database to "XYZABC", just removing the hyphen. I haven't seen a way to do this in the system. I'd like to avoid manually doing a find-and-replace in the database tables....feel like that could get hairy.

Do you have a solution for finding and replacing something across all content?

Leigh C

Leigh C 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

There's nothing like that in Perch, no.

Simon Clay

Simon Clay 127 points

Hi Leigh, I think I would export the database as a .sql file and then open the file in a code editor and do a find and replace. Then save as a new file. Then re-load up to the database, keeping a copy of the original just incase.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Please don't do that. Nothing good is likely to come of messing around in the database export and we can't support installations where people are doing that as the chance of your data ending up in a mess is reasonably high.

Leigh C

Leigh C 0 points

Thanks @simon - as I suspected, Rachel has confirmed what I thought....too risky to edit the SQL file. Manual content editing will be safer. Thanks everyone!