[wp-hackers] revamping an huge old site ( written in custom CMS ) into a fresh install WP.
Spilka, Dan
dspilka at techtarget.com
Tue Mar 27 15:28:37 UTC 2012
Hello Haluk,
I think what you're outlining makes sense. Basically, I would write some PHP scripts that 1) loads up WordPress to have access to the WordPress API, 2) pulls data from your old site DB, and 3) imports it into WordPress using wp_insert_post, wp_create_category, wp_insert_user, etc.
-Dan
------------------------------
Message: 2
Date: Sat, 24 Mar 2012 15:48:48 -0700
From: Haluk Karamete <halukkaramete at gmail.com>
Subject: [wp-hackers] revamping an huge old site ( written in custom
CMS ) into a fresh install WP.
To: wp-hackers at lists.automattic.com
Message-ID:
<CAHERW=1ADkiSoWkF-cBrFFpZR_UEee7X+esOemZjBi1idF4VMQ at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
We need to revamp 15 year old high traffic website with 10,000+
articles/videos/audios ( where things are stored in different tables ) and
in an asp/ms-sql implementation. And we chose WP for the implementation of
the new revamped site.
Obviously, we don't want to do that manually, that is one post at a time,
and since this is a home grown CMS, we do not have a utility to import the
current content into WP magically neither. We need to write that utility.
Our first goal is to get the 90% of the old data into a demo WP site and
iron out the details or worry about the look and feel stuff later.
For that, I thought of the following plan but I need to pick your brains
before I delve into it - You guys are a lot smarter than me and you can
tackle this kind of stuff way better than the plan outlined below.
1- get a premium magazine theme with the demo database/resources. ( I
contacted two known vendors and they accepted to give me the demo site
resource files and the actual db in the form of an xml )
2- get the demo run on my server and play with it to understand how the
demo is put together, the cats, the tags, the posts etc... how they manage
the featured posts, how things are laid out, the details etc... so just to
get familiar with it.
3- create a bunch of custom mysql tables ( that have nothing to do with the
wp tables/structures ) and populate these mysql tables with enough
category,tag, post data that the demo site contains
4- start a new instance of a wp with a fresh install on the same server
5- write a php script that taps into the custom mysql tables, read the
cat,tag,post data and start executing tons of wp_insert_term,
wp_insert_category and wp_insert_posts one after the other into the fresh
install wp that I talked about in step 4.
6- keep fixing the php script until the script is able to create the
original demo site programmatically with the click of a button.
7- once step 6 is passed successfully, clear the custom mysql table's data
and write another script which taps into our old ms-sql to extract our
existing cat/tag/article/media file info to be inserted into the custom
mysql table
8- run the script ( of step 5 ). With this time, we should be able to get
the demo site back except with our content showing thru.
What do you say to this plan?
What's a better way to achieve our initial goal than the above approach? Do
we hit a road block somewhere along the way with the above approach?
More information about the wp-hackers
mailing list