Creating wordpress dump(.wxr) using unix and mysql Creating wordpress dump(.wxr) using unix and mysql wordpress wordpress

Creating wordpress dump(.wxr) using unix and mysql


As blogged here, all you need is the export_wp function, so run something along the lines of.

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);

Then just grab the .xml file generated!