A+ A A-

How to Find and Replace Text Using MySQL Query

After changing website templates I found that all instances of the <ul> html tag (used for bullets) no longer worked because the new template requires a class tag for its typography (e.g. <ul class="gkBullet2">).  Apparently this is common when using templates by Gavick.

So I wanted to find a quick way to replace all instances of <ul> with <ul class="gkBullet2">.  Here's what worked for me.  Go into PHPMyAdmin and execute these 2 queries:

update joomla_content set `introtext` = replace(`introtext`, '<ul>', '<ul class="gkBullet2">')

update joomla_content set `fulltext` = replace(`fulltext`, '<ul>', '<ul class="gkBullet2">')

Change "joomla" to whatever DB prefix you use.

Post comment as a guest

0 Character restriction
Your text should be more than 10 characters
  • No comments found