#9903 closed enhancement (invalid)
Tweak export function: make the export planned
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.8 |
Component: | Export | Keywords: | export |
Focuses: | Cc: |
Description
Hello,
i use Wordpress for a xml reader and i need to propose a export xml every hour, but i think a core-function is needed, because the authentification is needed to make an export.
Change History (9)
#2
@
16 years ago
I have a feeling they're http-requesting the export page.
My advice, would be to use a output buffer, in combination with export_wp($author_id); (Which prints the export file)
#4
@
16 years ago
i find a hack:
/bin/bash # Settings BACKUP_DIR=/home/toto/ftp URL=http://www.website.com USER=admin PASS=passpass COOKIES_FILE=/tmp/wp-backup.cookies # Compute some aliases DATE=`date +%Y-%m-%d` BACKUP_FILE=$BACKUP_DIR/wp-backup-$DATE.xml # Authentication wget --keep-session-cookies --save-cookies $COOKIES_FILE --post-data "log=$USER&pwd=$PASS&wp-submit=Connexion&testcookie=1" -O /dev/null "$URL/wp-login.php" > /dev/null # Get the 'export' xml file wget -O $BACKUP_FILE --load-cookies $COOKIES_FILE "$URL/wp-admin/export.php?author=all&submit=1&download=true" chmod 777 $BACKUP_FILE #end of file
but i have the login page in html format, in the xml backup file :(
what is wrong?
bye
#6
@
16 years ago
- Milestone Future Release deleted
- Resolution set to invalid
- Status changed from new to closed
you can use wp_schedule_event() to generate the backup. and wp_set_current_user() if it needs to be "as if it was a particular author".
#7
follow-up:
↓ 8
@
16 years ago
And if you have shell access to your server, why don't you just dump your database? That's a much more robust solution.
Note: See
TracTickets for help on using
tickets.
Details?