[wp-hackers] WXR export via CLI

Daniel Westermann-Clark danieltwc at gmail.com
Tue Sep 6 12:43:57 UTC 2011


Most scripting languages have a "mechanize" library that does stateful
web browsing. You login to a website via some form, it remembers the
cookies, and you browse to the admin area.

The WXR process is straightforward using one of these mechanize
libraries. Example:

https://github.com/ufwebadmin/WordPress-Maintenance/blob/master/script/wp_export.pl
https://github.com/ufwebadmin/WordPress-Maintenance/blob/master/lib/WordPress/Maintenance/Mechanize.pm#L90

On Sat, Sep 3, 2011 at 8:03 PM, Charel Büchler
<charel.buechler at gmail.com> wrote:
> Hey,
>
> I'm currently writing a bash script for updating wordpress in the
> command line, and now what I do before backup is, making dumps of my
> database, to ensure that the data won't be lost.
>
> But let's think of this scenario, I have to upgrade wordpress. I make a
> db-dump, but my dump is corrupt. So I am unable to use my dump.
>
> In this case I'd love to get a WXR file, which I can export too, so at
> least, I can import my wordpress content.
>
> Now is there a possibility, to export a file through the command line,
> without writing another plugin which allows me this?
>
> Cheers
> --
> Charel Büchler
> E: charel.buechler at gmail.com
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

-- 
Daniel Westermann-Clark


More information about the wp-hackers mailing list