News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Moving SMF to a different folder error

Started by TrentT, July 23, 2014, 05:45:23 PM

Previous topic - Next topic

Yazar8

Quote from: Justyne on July 24, 2014, 05:34:25 AM
Yazar, I don't recall the table names off the top of my head but somewhat like this

UPDATE messages
SET posts = REPLACE(posts, 'string1', 'string2')
WHERE posts LIKE '%string1%'

UPDATE avttdmc2_forummessages
SET body = REPLACE(body, 'avttdm.com/index.php', 'avttdm.com/community/index.php')
WHERE body LIKE '%avttdm.com/index.php%'

Is this correct?

Edit: Question mark answered me, meh. Lemme try this.

Arantor

That's 'interrobang' ;)

But yes, that's the way to do it :)

Yazar8

 O:)
Quote from: ‽ on July 24, 2014, 05:46:45 AM
That's 'interrobang' ;)

But yes, that's the way to do it :)

Ah sorry. I learned something new :P

Anyway I executed this query it did its job in 1-2 seconds. Didn't take that long. There were only 479 posts like that.

Though I also need to change them on the topics, because this query only changes replies.

Bob Perry of Web Presence Consulting

might be a good idea to put your forum into maintenance mode first, should something go awry

Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

Arantor

QuoteThough I also need to change them on the topics, because this query only changes replies.

No. The smf_messages table contains every post in the forum, including the first post in topics.

Yazar8

Quote from: ‽ on July 24, 2014, 05:51:10 AM
QuoteThough I also need to change them on the topics, because this query only changes replies.

No. The smf_messages table contains every post in the forum, including the first post in topics.

Oh alright. Then


Yeah my forum is still on maintenance mode and I'm going to keep it on it for a few more minutes just incase the query didnt finish.

Arantor

If it came back to you, it finished already.

Yazar8

Quote from: ‽ on July 24, 2014, 05:53:21 AM
If it came back to you, it finished already.

Yeah I got the response, its completed. Good job : D

Thanks to everyone for their help.

Trent mark this as solved pls.

Arantor

Sub 500 posts shouldn't take a long time. It gets slower the more/longer posts you have, roughly proportional to the total amount of content it has to wade through.

TrentT

Alright, everything seems to work fine now.

Thanks again for your time and quick responses ;)

Justyne

Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Kindred

also... form your urls, it looks like you have that silly "SEF" checkbox checked...      I recommend unchecking that. it is pointless, serves no real purpose, and often confuses things later on.  (it's left over from years ago when search engines had to have an .html marked page to understand how to catalog it)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

You should see how much effort I had to go to in this current mod project to specifically work around that nonsense.

kat


Advertisement: