6 replies
Is there any way to import txt files as posts into WordPress, as I have over 1000 articles needing importing Thanks everyone!
#txt #wordpress
  • Profile picture of the author astronomynerd
    Anyone????? Thanks!
    {{ DiscussionBoard.errors[8495600].message }}
  • Profile picture of the author johnmags
    If those articles are unique, it is best to individually copy-paste each post in your WP site and optimize each page for better search engine visibility. Just my 2 cents.
    Signature
    Are you looking for a Professional Content Writer
    {{ DiscussionBoard.errors[8495650].message }}
  • Profile picture of the author CyberSEO
    You can easily convert your texts to RSS feed and then import them into WordPress. For example, you can use this code:

    <?php
    if (isset ( $_GET ["dump"] )) {
    $dump = file ( $_GET ["dump"] );
    $time = time ();
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
    echo "<rss version=\"2.0\">\n";
    echo "<channel>\n";
    echo "<title>My Feed</title>\n";
    foreach ( $dump as $item ) {
    list ( $title, $desc, $url ) = explode ( "|", trim ( $item ) );
    echo " <item>\n";
    echo " <title><![CDATA[" . $title . "]]></title>\n";
    echo " <link><![CDATA[" . $url . "]]></link>\n";
    echo " <guid><![CDATA[" . $url . "]]></guid>\n";
    echo " <pubDate>" . date ( "D, d M Y H:i:s O", $time ) . "</pubDate>\n";
    echo " <description><![CDATA[" . $desc . "]]></description>\n";
    echo " </item>\n";
    $time -= 86400;
    }
    echo "</channel>\n";
    echo "</rss>\n";
    }
    ?>


    If you want to use the code above, your texts have to be stored in the following format:
    title|description|link
    title|description|link
    title|description|link
    etc...
    {{ DiscussionBoard.errors[8498174].message }}

Trending Topics