WordPress.org

Ready to get started?Download WordPress

Forums

Need to import 60,000 articles into wordpress. Help. Me. (16 posts)

  1. Klark
    Member
    Posted 5 years ago #

    What should I do? I need to import everything (or at least a year) into my existing wordpress install. There has got to be a better way than re-entering all these manually. I've been doing it for a week now, and it's becoming physically painful :(

    I've got an excel file with 8 columns and 68,873 rows. Each row is a article. The 8 columns and (the contents) are:

    postno. (8 digit identifier)
    articletitle (text)
    articlecontent (html formatted)
    date (is in this format: 2008-03-19 03:59:43 between 2004 & 2008 )
    link1 (webserver image location, if N/A=NULL)
    link1caption (caption for link1, if N/A=NULL)
    link2 (webserver image location, if N/A=NULL)
    link2caption (caption for link2, if N/A=NULL)

  2. Jebaloo
    Member
    Posted 5 years ago #

    Perhaps exporting the file in a recognized format such as CSV, and then importing it through the inbuilt import feature in wordpress would work?

    You may need to re-arrange the excel file a little though before hand.

  3. Klark
    Member
    Posted 5 years ago #

    I was looking at a sample WordPress export file ..and there are alot of extra rows that I don't have. Are those required for a successful import ?

    Like for example, i noticed the sample xml has GMT and regular time.

  4. Klark
    Member
    Posted 5 years ago #

    Anybody ?

  5. jeremycherfas
    Member
    Posted 5 years ago #

    Are you coming from an existing blogging system? If so, there are importers. Or you might be able to get your existing system to XML and then import from XML.

    I don't know your skill level, but you could also export your spreadsheet into XML format for import.

  6. Klark
    Member
    Posted 5 years ago #

    No this is not from an existing system that WordPress can import from.

    How do i go about exporting the spreadsheet ?

  7. jeremycherfas
    Member
    Posted 5 years ago #

    Basically you need to inspect an XML file from WordPress and look at the tags. Then export from your spreadsheet and insert the correct tags using a text editor.

    Alternatively, do a search and replace within your spreadsheet to insert the tags.

    Or even add whole new columns in the right places, to contain the tags.

    It is harder to describe than to do.

  8. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    I was looking at a sample WordPress export file ..and there are alot of extra rows that I don't have. Are those required for a successful import ?

    Like for example, i noticed the sample xml has GMT and regular time.

    For your specific example of gmt and regular time, yes, those are both indeed required. My advice is to copy the column in Excel to another one and then convert that one to GMT.

    For other ones, they may not be totally required. Ideally you'll want to get as much of it as you can in there.

    But the short of it is that you're going to have to put it in a format WordPress can understand before importing it. Or write your own importer code.

    Note that while the WXR format has a lot of extra stuff, WordPress can also import from a simpler RSS feed. You can't get things like comments and categories and such that way, but it has a lower requirement level and might be easier to create from your data.

  9. Klark
    Member
    Posted 5 years ago #

    Nah..All I want is the Article Titles, text content, category and date.
    Some articles have image links to a folder on my server.

    Thanks Otto and jeremy.
    I will try and post back. If there's anything else that's required for a post import let me know.

    Someone should really write a custom importer that folks could just fill in blanks via source file.

  10. Klark
    Member
    Posted 5 years ago #

    I formatted my excel file with four columns: title(A4), content(B4), category(C4) and post date(D4). And added a fifth column for each line with this formula

    ="<item><title>" & A4 & "</title><content:encoded><![CDATA[" & B4 & "]]></content:encoded><category>" & C4 & "</category><wp:post_date>" & D4 & "</wp:post_date></item>"

    then i just copied the fifth column to notepad and saved as *.xml

    Then went to Dashboard>Manage>Import>RSS and uploaded.
    IT WORKS to some point.

    The post title, contents and category all import correctly, but all the posts are entered using the current date. And not the date I specified in D4.

    I'll keep testing. There's about a 3 other date options that i see in the standard wordpress export file..one of them must be the one that commands the date of the post.

  11. Klark
    Member
    Posted 5 years ago #

    OMG..I just did all the articles in a few minutes.

    it seems i could just drop my date format (2008-02-09 03:59:57) into the pubDATE field and it will accept it ..although the export file showed Wed, 02 Apr 2008 06:08:57 as the required format.

    Thanks to all...and to myagci & travelvice in a previous post.

  12. zasharas
    Member
    Posted 5 years ago #

    good lead! just to add that .txt files work fine as well. Actually .txt file performed better with the strange character sets like Lithuanian. And I have a question: why I can import only 50 "items" at a time? I have 2000 total to import.

  13. micharo
    Member
    Posted 5 years ago #

    thanks to everyone above for their work.

    I had success with the pubDate.

    I still have problems with custom fields.
    Anyone have an idea why it is not adding the custom field?

    <item>
    <pubDate>15 February 2008 00:00:00 +0001</pubDate>
    <title>rin</title>
    <description>easy</description>
    <category>Adrian</category>
    <category>rings</category>
    <postmeta>
    <meta_key>observer</meta_key>
    <meta_value>m</meta_value>
    </postmeta><
    /item>

    If you refer to the 50m on the RSS screen in wordpress - I think that means 50 megabytes not 50 items.

  14. flick
    Member
    Posted 5 years ago #

    I'm currently in a situation where I've got an excel file which follows the exact dump/layout of the wp_posts table. However, I'm a little lost as to how to import the file.

    I vaguely remember using a csv format before, but with the new WP2.5, do we now save as a .xml file? And will just a standard file do?

    Thanks ;)

  15. Anonymous
    Unregistered
    Posted 5 years ago #

    Sorry to resurrect an old thread, but I am stuck on this same problem. Have to import a LOT of old entries from an older ASP database. The RSS feed works, but still having problems with the dates all defaulting to a single date of 1901 (or whatever it is).

    I didn't understand the original posters solution:

    "it seems i could just drop my date format (2008-02-09 03:59:57) into the pubDATE field and it will accept it "

    Can someone walk me through that? Pretty much stuck on the whole "pubDATE" field -- where is that?

    I did the rest of the solution just fine. Only the dates are still screwy.

    Thanks!

  16. flick
    Member
    Posted 5 years ago #

    This works for me if I want to date my posts when I import an RSS.

    <pubDate>2004-10-10 17:26:00</pubDate>

    What is the date format of your ASP database?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.