Export all posts as individual plain txt files

Try this (you may need to bootstrap WP by loading wp-load.php, depending on where you put this code). $args = array( ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’, //’posts_per_page’ => -1 //uncomment this to get all posts ); $query = new WP_Query($args); while ( $query->have_posts() ) : $query->the_post(); $f = fopen(get_the_title() . ‘.txt’, ‘w’); $content=”Title: ” … Read more

Is it possible to export WordPress from command line?

Check out http://wp-cli.org/. It’s fantastic and I’ve used the export capability multiple times. More information on wp-cli. WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, set up multisite installs and much more, without using a web browser. You will most likely have to install wp-cli. You can find … Read more