Support » Plugins » Tweak export function: make the export planned

  • Hello,

    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=<code>date +%Y-%m-%d</code>
    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

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Tweak export function: make the export planned’ is closed to new replies.