Migrating database / content of non-CMS site to WordPress

I have a non-CMS website which is fully build with PHP with a lot of content in it. I don’t want to add my posts manually in WordPress, because that’s a pain in the ass (I am talking about 5000 posts)…

So my question would be: how do I do this? Is it even possible to clone something like this?

1 Answer
1

If your data is inside database as I understand, it is possible to export your database to CSV file and import this to WordPress. CSV file is basically a comma separated list of data from your database that makes it possible to transfer data from different database structure to another.

It does indeed take some effort to configure your export/import so that you get your data right, but it’s a lot easier thing to achieve than re-posting 5000 posts.

Look for WordPress plugins “csv importer” and/or “wp ultimate csv importer”.

You can export your data using your SQL-client (these often have an option to export in csv) or using PHP (see http://www.coderelic.com/2012/01/export-data-from-a-database-to-csv-excel-with-php/)

If your data is NOT in database, you could consider web scraping techniques (see: wikipedia / Web_scraping) where you go through your site programatically and look for id’s, classes and elements to create structured data out of your html files.

Hope this was helpful!

Leave a Comment