- b2evolution CMS Support Forums
- b2evolution Support
- General Support
- [2.x] Moved Blog to new server and new URL
1 hattrick96 Oct 19, 2009 16:10
My b2evolution Version: 2.x
Ok, the problem is simple so I hope the solution is, too.
I just moved my blog to a new server and decided to use a different URL.
OLD URL: www.domain.com/blogs
NEW URL: blogs.domain.com/
The migration went fine and 99% is working flawlessly. The 1% that is causing me headaches deals with the URLS and embedded graphics. The graphics don't show up. The problem is with the path on the graphics files in the posts. When you right-click on the pic and choose properties, it shows something like
http://www.domain.com/Blogs/media/blogs/b/october2009/new-school-year/100_3135.jpg
and it should be:
http://blogs.domain.com/media/blogs/b/october2009/new-school-year/100_3135.jpg
My question is how to adjust all of the older paths (hyperlinks within the text to other blog entries as well as path's to the media) to the new URL. Is there a script I can run? Is there an option somewhere to tweak all that?
I really don't want to check each and every post (there are hundreds) and update the paths manually. Could I edit the actual database and do a "replace" like MS Word does?
Any help would be greatly appreciated.
Mike
It was a somewhat easy fix...
Using Navicat for MySQL editing, we ran the following command:
update evo_items__item set post_content = replace(post_content, ‘http://www.domain.com/Blogs, '');
That removed the absolute paths and changed to relative paths. Then, I had to go into the B2 console, go into Tools, then MISC. Click onto "Delete pre-renderered item cache."
Voila!