• I have a WordPress website that contains around 200 Posts of varying lengths (700-1200 words each). Due to the technical nature of my site, there are various terms and acronyms used throughout the site (approximately 45 terms/acronyms). Recently I decided I would write a Glossary section for my website, wherein each of these 45 terms would get a short dedicated article explaining exactly what the term means, after which I want to link each of the respective terms/acronyms throughout my website to its appropriate explanation page, so that when in doubt, my reader can click on the term and be redirected to the page that explains the meaning of that term.

    Now, obviously I don’t want to go through each of my 200 posts manually, check which of the ~45 terms are mentioned in it, and then link that term to its respective page – this would take me weeks or even months. Is there a way that I could automate this process by doing a database search&replace?

    So for example, let’s say we have the term: Nitrogen-purged. This term appears as regular text in various places throughout the website (maybe in 100 of the posts, maybe in 70 or maybe in 150 of them – no clue, all I know is that it appears multiple times). What I’d like to do is a search&replace that would turn every instance of:

    Nitrogen-Purged

    to:

    <a href="http://www.example.com/glossary/nitrogen-purged/">Nitrogen-Purged</a>

    Does anyone have an idea on how to go about this?

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Search & Replace Text with HTML in database?’ is closed to new replies.