你们太容易放弃:)
这对我很有用:
<?php
require(dirname(dirname(__FILE__)) . \'/wp-load.php\');
require(ABSPATH . \'wp-admin/includes/admin.php\');
require(\'includes/export.php\');
ob_start();
export_wp();
$xml = ob_get_clean();
file_put_contents(\'out.xml\', $xml);
echo "done"
?>