2012-09-08 15 views

Trả lời

3

blogged here, tất cả những gì bạn cần là chức năng export_wp, do đó hãy chạy một thứ dọc theo dòng.

include 'wp-config.php'; 
include 'wp-admin/includes/export.php'; 

ob_start(); 
export_wp(); 
$file = ob_get_contents(); 
ob_end_clean(); 

$fh = fopen("wordpress-" . date('Y-m-d') . ".xml", 'w'); 
fwrite($fh, $file); 
fclose($fh); 

Sau đó, chỉ cần lấy tệp .xml được tạo!

Các vấn đề liên quan