Electronox Blog Electronox Photo Gallery Electronox Forum

Import Cutenews to Wordpress March 25th, 2008 by Justin

 

Out of necessity and a fair bit a curiosity, I created this script to import our old Cutenews database into Wordpress using the Wordpress Extended RSS file format.

***BEFORE YOU START: MAKE A COPY OF YOUR CUTENEWS FOLDER AND RUN THIS SCRIPT ON THE COPY OR BE READY TO RESTORE FROM A BACKUP***

First, change your date format in Cutenews to “Y-m-d H:i:s” in the Options, System Configuration, News menu. The time format for comments should also be “Y-m-d H:i:s”.

Make sure:

  • “Show comments when showing full story” is set to Yes.
  • “Full story in pop-up” is set to no.
  • “Show full story when showing comments” should be set to Yes.
  • Disable all character limits.

Now, make a copy of your Cutenews database file (./cutenews/data/news.txt) to your desktop, open up the file in a plain text editor (my favorite is Notepad2), and strip it down to a comma separated list of the 10-digit id numbers (e.g. 1099442233, 123002233, etc.).

Next, open upĀ  wp_export.php on your desktop with a plain text editor, and copy your comma separated values from the file you just recently edited in the brackets between $id_array = array ( and ). You need to delete the old values in this file and fill it with your own.

Finally, upload your modified wp_export.php and the other files in the .zip to your Cutenews directory.

Now run the script by typing it into your browser (e.g. http://mysite.com/cutenews/wp_export.php). Save the output (the source) as an .xml file and import this file in wordpress like you would a Wordpress export file.

Future versions of the script will automate the $id_array creation process. I just didn’t have time yet.

Download Cutenews to wordpress

No Comments »

No comments yet.

Leave a comment

updates