Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
replace the URL in your posts
How to use MySQL to replace the URL in your posts?!
So you want a query that will replace all links in post with something else? Can you elaborate please.
yes a something like this:

UPDATE wp_posts SET POST_CONTENT = replace(POST_CONTENT, '', 'localhost/sandbox');

its for wordpres but this not work on mybb
I have never user a query like this.
Have you tried this?
UPDATE mybb_posts SET message = replace(message, '', 'localhost/sandbox')
Thank you
worked Big Grin
Your welcome, glad to be of help. Smile
This user has been denied support. This user has been denied support.
Make sure to have a backup before running any such queries on post messages. So you can undo in case anything goes wrong.
Yeah I would do that. The OP had already said that they had tried it and I guessed that if they had tried it and it hadn't worked and nothing had gone wrong, that trying one that should work wouldn't do any damage.
Slightly off topic, but perhaps it would be nice if MyBB could detect posted internal URLs and only store them as relative URLs. Would make domain movements a bit nicer.

Forum Jump:

Users browsing this thread: 1 Guest(s)