N
N
Nikolai2011-06-17 10:30:45
MySQL
Nikolai, 2011-06-17 10:30:45

Export news from Strawberry to Wordpress?

Hello! Due to the complete lack of experience with MySQL, I ask for practical recommendations on translating a news feed (1000+ entries) from the Strawberry news engine to Wordpress.
1. The first pitfall was that in Strawberry the news is stored not in one, but in two tables (in the first, technical information, in the second, the text of the news). Accordingly, we need to combine them into one.
First table:
`cute_news` (`date`, `author`, `title`, `short`, `full`, `avatar`, `category`, `url`, `id`, `views`, `comments` , `hidden`, `sticky`, `keywords`, `type`, `parent`, `level`, `password`)
Second table:
`cute_story` (`post_id`, `short`, `full`)
We need a query that would add a cell to the first table (or add a value to one of the existing ones that is not in Wordpress) with the data of the short field of the second table in accordance with id = post_id.
2. The second pitfall was the different date storage format. In Wordpress, the date is stored in the format yyyy.mm.dd hh:mm:ss, while in Strawberry the date field is 1240330515. How can it be converted to the current format or will Wordpress be able to recognize it in this form as well?
3. Now you need to delete the "extra" cells in the first table (which are not in Wordpress), and also add new ones - those that are.
Wordpress table:
`wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name `, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`)
4. Not sure in the correctness of work in the absence of values ​​in a number of fields (in particular, guid is a link to the news). Can they be generated automatically? For example, using the post id.
I will be grateful for concrete examples of requests. Or another, more correct algorithm for solving the issue. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xSkyFoXx, 2011-06-17
@xSkyFoXx

You can use an easier way to import data into your new WP site.
WP has a whole host of ways to import data into itself. This setting is located at: http://[your_domain]/wp-admin/import.php
The easiest way for you, in my opinion, is to extract the full RSS feed from your previous site.
Don't forget to set your site's RSS settings on Strawberry to give it 1000+ entries in the feed.

I
Igor Vorotnev, 2014-02-21
@HeadOnFire

@xSkyFoXx speaks volumes. Do it through RSS, XML, etc., but just don't try to transfer data from database to database by hand - this will not lead to anything good.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question