Creating wordpress dump(.wxr) using unix and mysql

I need to create wordpress export dump (.WXR) using SSH on my server. I have lost access to the Wordpress dashboard.Can it be done using some unix,mysql script.

Answers


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!


Need Your Help

How to return an UIImage type from a GCD

ios objective-c uiimageview uiimage grand-central-dispatch

I have an "UIImage" return type method named "ComLog". I want to return a Image from this method. In "ComLog" method i use GCD to get the image value from an array. I use the following code, the

how to bind to a list of key value pairs

c# wcf

I have a WCF service that returns a List<KeyValuePair<long, string>> - I need to bind this to a DisplayMemberPath and the SelectedValuePath, anyone know how I might bind to the key and ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.