Page 1 of 1

Migration CMSimple article to Wordpress

Posted: Thu Oct 25, 2012 7:37 am
by sroux
Hi, lately I'm working on a migration requirement, where I'm asked to migrate CMSimple page toward a Wordpress blog.

Would it be any features (export), plugins (export/importer...) or tricks (Perl module or script) to do so?

many thanks for any help you could provide!

SebRoux

Re: Migration CMSimple article to Wordpress

Posted: Thu Oct 25, 2012 10:05 am
by cmb
Hi SebRoux,
sroux wrote:where I'm asked to migrate CMSimple page toward a Wordpress blog
You might reconsider, if this is a necessary step. If "classic" CMSimple doesn't fullfill the user's expectations, there's CMSimple_XH.

About the export: that's fairly simple, as all data are stored in flat files. The complete content of the website is stored in content/content.htm, where each page is started with <h1>, <h2> or <h3>.

About the import: I guess you're better off asking in a Wordpress support forum. At least I have no clue, how Wordpress stores its content.

HTH

Christoph

Re: Migration CMSimple article to Wordpress

Posted: Thu Oct 25, 2012 10:34 am
by snafu
sroux wrote:Hi, lately I'm working on a migration requirement, where I'm asked to migrate CMSimple page toward a Wordpress blog.
if you split the cmsimple content.htm in single *.htm files there is a html to wordpress import plugin. but in the time you need to split the single cmsimple content.htm in several html files, you can also make a copy and paste from cmsimple editor to the editor in wordpress.
thats only for text, if there images in your cmsimple content you must handle them separate, wordpress handles images of his own way
there is no "easy" way from cmsimple to wordpress .... or from wordpress to cmsimple (i used both)

Re: Migration CMSimple article to Wordpress

Posted: Fri Oct 26, 2012 12:29 am
by cmb
snafu wrote:if you split the cmsimple content.htm in single *.htm files there is a html to wordpress import plugin. but in the time you need to split the single cmsimple content.htm in several html files, you can also make a copy and paste from cmsimple editor to the editor in wordpress.
Indeed there's an import plugin. :) About preparing the import: if there are only a "few" pages, importing them manually, as Winni has described, seems to be the best solution. If there are many pages, exporting these might be appropriate. As a simple example one can use the following cmsimple/userfuncs.php:

Code: Select all

<?php
for ($i = 0; $i < $cl; $i++) {
  file_put_contents("$i.html", $c[$i]);
} 
, which will create separate files for every single page in the root folder of the CMSimple installation. To be useful for the WP import plugin, one has to cater for the hierarchical structure, which is available via $l[$i] (=level of the page). It seems, that the WP import plugin is able to process <img>s, so these might be adjusted to the real path before exporting the pages (preg_replace() seems to come in handy).

But as I'm more interested in CMSimple_XH than in Wordpress, I'm looking for the other way round. Fortunately there seems to be a Wordpress export plugin. It might be interesting to add some import facility to CMSimple_XH (as a plugin/addon), based on the WP export plugin. But perhaps there are even simpler solutions, so I've asked in the WP support forum (link deliberately omitted) -- I'm eagerly awaiting the response. If the WP support forum turns out as friendly and competent as the CMSimple forum (what I have to assume), I'll gladly write an export tool which is compatible with the WP import plugin (not supporting all bells and whistles, though).