The MU forums have moved to WordPress.org

What PHP function should I call to export to XML from outside wordpress (8 posts)

  1. reboltutorial
    Member
    Posted 14 years ago #

    I have too many blogs, I had encountered problems with mysql dump not always working at some webhosting service and losing a huge database when switching to another provider.

    So I want to make also an export of blog but automate it by calling the php function which is responsible for it.

    What function should I call ?

    Thanks.

  2. tmoorewp
    Member
    Posted 14 years ago #

    There isn't a PHP function to export your blog. You'd have to write something from scratch yourself.

    The functions built into WordPress won't export your entire database, either, if that is what you are talking about. WordPress exports posts/pages, but not plugin settings, etc.

  3. kgraeme
    Member
    Posted 14 years ago #

    I'm pretty sure I've seen some tutorials for creating a bash script on a cron job to automate hitting the wordpress export script. It's not something I've implemented though.

  4. andrea_r
    Moderator
    Posted 14 years ago #

    Also, there's the advanced exporter plugin to get your export file in chunks.

    http://wordpress.org/extend/plugins/advanced-export-for-wp-wpmu/

    (which again, still doesn't get the links, widgets, options tables etc...)

    I have broken down and exported just single (large) tables from the db. And clean up the db before exporting - take out spam, post revisions, rss_feeds from the options tables...

  5. coverify
    Member
    Posted 14 years ago #

    I wanted to do something similar with my blog. I will be trying the perl script on the following site.

    http://unixwayoflife.wordpress.com/2008/11/08/automated-wordpress-com-backup/

  6. reboltutorial
    Member
    Posted 14 years ago #

    @andrea & @coverify great thanks to both, I didn't see your answer at first as I don't visit the forum quite often but that's really great I did as they are both usefull scripts for me :)

  7. rsgrone
    Member
    Posted 14 years ago #

    Speaking of the Advanced Export Plug-in -- It's an okay plug-in for those that do not have the ability to adjust their php settings but, what i do not like about is, that when you import it as in recovery or in my case, sending the posts to a mirrored blog, it duplicates everything...

    I wonder if anyone has come up with a tweak that will allow the dates to be a little more specific, I mean taking Decembers posts the first week of December is fine, and grabbing someone's posts by name or category kinda sucks if they have used multiple categories (which I suspect is causing my duplications) and no matter what I do, it always created duplicate categories.. it's quite the mess, I can clean a lot up in MySQL but the duped stuff... is a different mess, that's can take hours/days to go through all those posts...

    Does anyone have such a beast where as you can download/export via the day or week style range?

  8. andrea_r
    Moderator
    Posted 14 years ago #

    It should not be duplicating anything, as it's built off the internal WP import code which skips duplicates.

    Might want to report that to the plugin dev, you know. :)

About this Topic

  • Started 14 years ago by reboltutorial
  • Latest reply from andrea_r