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

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

its for wordpres but this not work on mybb
#4
I have never user a query like this.
Have you tried this?
UPDATE mybb_posts SET message = replace(message, 'myolddomain.com', 'localhost/sandbox')
#5
Thank you
worked Big Grin
#6
Your welcome, glad to be of help. Smile
#7
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.
#8
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.
#9
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)