How to Create Export/Import Functionality for Plugin

There are two basic approaches you can take. Use the standard wordpress inport / export plugin manually through the admin. Your custom post type must have the property can_export = true (default = true) If you go this route, there are interesting options for adding extra functionality for users, Check out this tutorial on adding … Read more

Import posts with featured images

If you export a single post type (i.e. posts, pages, a custom post type, etc…) it will not include attached media files like featured images. That’s incredibly idiotic, to me, but your options are — Export everything from site (which will include featured images), then modify the XML file as needed before importing to the … Read more

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)