Create posts from RSS feed

Hi there!
We'd like to automatically create posts on a website, when posts are published on another. The "origin" site is a public website that's content can be copied, shared, etc.
How can we do that? Also, we'd like to somehow import the existing posts, and create new ones on this different website.
This website has a feed (http://www.fundeu.es/feed/) so I guess this helps things.
Thanks!

  • Adam Czajczyk
    • Support Gorilla

    Hello M.,

    I hope you're well today and thank you for your question!

    I believe we I got a solution that would be just right for that job :slight_smile: We do have an "Autoblog" plugin that fetching content from defined RSS feeds and posting them as posts on your site.

    Take a look here please:

    https://premium.wpmudev.org/project/autoblog/

    Please note though: if you expect that to post entire articles, entire articles must be included in the feed. Otherwise the plugin would post just excerpts. That's however not related to the plugin itself but the way RSS works.

    If you have any further questions, let me know please.

    Best regards,
    Adam

  • D.
    • The Crimson Coder

    Hi,
    This plugin is really great, thanks for that!
    We have a few questions:
    - How can we link back to each article's URL? there is only a general link back URL option:

    - How can we import more than 100 posts?:

    Thanks!

  • Dimitris
    • Support Star

    Hello M.,

    How can we link back to each article's URL? there is only a general link back URL option

    This is the text of the link which is auto generated by Autoblog. You can use a string like "source" in there. :wink:

    How can we import more than 100 posts?

    This is the top limit I'm afraid but on the other hand there shouldn't be much feeds with more than 100 articles. If you set a short interval then you shouldn't have any issue and lose any post.
    For migrating older posts though, you can always use the default WordPress import/export functionality from Tools admin menu item. :wink:
    Reference: https://premium.wpmudev.org/blog/moving-wordpress-site/

    Warm regards,
    Dimitris

  • D.
    • The Crimson Coder

    Hi, we need to import feeds that are way bigger than 100 posts (we don't have access to the site's wp-admin).. is there no way to modify the code to increase the limit?

    On the other hand, we're getting this error:

    Any workaround? i.e. slow down the import process?
    Thanks!

  • Adam Czajczyk
    • Support Gorilla

    Hello M.

    As for adding links to original posts.

    I just wanted to add up to what my colleague Dimitris suggested. There's an "Append text to post" add-on that you may want to enable (on "Auto blog -> Add-ons" page). After it's enabled you'll find a new section called "Appent test to post content" on "edit" screen for each of your feeds.
    There's a text editor where you can use a placeholder like this:

    %ORIGINALPOSTURL%

    It would then add a "footer" to the imported post replacing this placeholder with a direct link to an original post.

    Hi, we need to import feeds that are way bigger than 100 posts (we don't have access to the site's wp-admin).. is there no way to modify the code to increase the limit?

    To increase that number you would need to edit plugin's core file. I wouldn't recommend that and please note that upon any update of the plugin such change would be lost. If you wish to take the risk however here's what you'd want to change:

    in "/wp-content/plugins/autoblog/autoblogincludes/classes/Autoblog/Render/Feeds/Form.php" file find this code (starts around line number 511):

    <select name="abtble[poststoimport]" class="field">
                        <option value="0"><?php esc_html_e('posts.', 'autoblogtext') ?></option>
                        <?php for ($n = 1; $n <= 100; $n++) : ?>
                            <option value="<?php echo $n ?>"<?php selected($n, $this->poststoimport) ?>>
                                <?php echo $n ?> <?php esc_html_e('added posts.', 'autoblogtext') ?>
                            </option>
                        <?php endfor; ?>
                    </select>

    Inside this code there's this line:

    <?php for ($n = 1; $n <= 100; $n++) : ?>

    Replace the value of "100" with any higher value and update the file. Make sure that you kept an original file in case anything went wrong. This should then give you a better choice on a number of items to be fetched.

    On the other hand, we're getting this error:

    This error suggests that it took too much time for the script (triggered by cron) to complete. Could you please go to the "WPMU DEV -> Support" page in your site's dashboard, click on "System Info" button and then in "PHP" section check values for:

    max_execution_time

    memory_limit

    and in "WordPress" section check value for

    WP_MEMORY_LIMIT

    Please also add following lines to the "wp-config.php" file of your site:

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define("WP_DEBUG_DISPLAY', false);

    These lines should be placed above the "/* That's all, stop editing! */" line. After they are added please wait for the error to show up again and then look for a "debug.log" file inside the "wp-content" folder of your WP install. If it's there, download it please, rename to "debug.txt" and attach to your replay here.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.