Migration - Path to pictures

Having trouble installing serendipity?
Post Reply
seegers
Regular
Posts: 9
Joined: Mon Sep 26, 2005 6:43 am

Migration - Path to pictures

Post by seegers »

Hey everyone,

I am currently moving my blog from one domain to another one:

www.example1.com/serendipity/
to
www.example2.com/2blog/

I imported all the articles and settings through the import feature and uploaded the photos manually using ftp as suggested.

Sadly in all the articles, the path to the pictures is "/serendipity/...". Is there an elegant way to change all these references to "/blog/..."?

If not, I guess I would have to do it manually or keep an old mediabase for references on a different path (/serendipity/) and start building a new one...
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Post by kleinerChemiker »

you could export your articles from your db and do a search&replace.
seegers
Regular
Posts: 9
Joined: Mon Sep 26, 2005 6:43 am

Change Links, Trackbacks and Comments, too...

Post by seegers »

I just noticed an even bigger headache:

Apparently upon importing the articles, the numbering of the articles changed.

So unless I find a more systematic approach, I have to redo/rematch/move all internal links, internal trackbacks, all comments manually

:cry:
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

The only way to take entries from one S9Y blog to another while preserving pictures, comments, and other properties, is to export the database as an SQL dump (phpMyAdmin makes this easy), edit the database text to reflect the new locations (any text editor will do), and re-import the database at the new location (again, phpMyAdmin is your friend).

There was once a plugin that did database backups; unfortunately, it often overran its alloted time, or otherwise had problems with the size of the task.

There's a tutorial with pictures on s9y.org for moving your blog. It covers all this nicely.
Judebert
---
Website | Wishlist | PayPal
seegers
Regular
Posts: 9
Joined: Mon Sep 26, 2005 6:43 am

Post by seegers »

Thanks, will do that. Figured that I would have to that for tables for some plugins anyways...

If all that works well, then migration is still easy to do. Guess I was getting my hopes up for an even easier with that providedvimport tool. 8)
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Yeah, the RSS import works, but it's very limited. Although we have lots of importers for other blog engines, they all require a database dump.

Good luck with your move!
Judebert
---
Website | Wishlist | PayPal
seegers
Regular
Posts: 9
Joined: Mon Sep 26, 2005 6:43 am

Post by seegers »

Ok, just adding a few problems and solutions that I am having in case it might help someone else.

Just exporting and importing an SQL dump everything is at first a nice idea... but also overwrites your current fresh configuration. Preexisting data can also cause problems upon importing.

I managed to transfer my data without any errors during import by not selecting the following tables:

- serendipity_authors
- serendipity_authorgroups (afterall upon installation at least one author is created, I guess these tables should be cleared before importing several new authors - or just left alone)

- serendipity_config (contains your fresh blog configuration)

- serendipity_groups
- serendipity_groupconfig (I suppose similar reason as with the authors)

- serendipity_plugins (I figured I was going to install the plugins later, no need to copy this one)

Next step: Export the data from the individual tables to correct paths with an texteditor.
Post Reply