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

When importing – failed to import: Invalid post type feedback

The issue is you’re trying to import posts with a post type of feedback, but there is no such post type registered on your install of WordPress. Quick-and-easy fix is to register one: add_action( ‘init’, function () { register_post_type( ‘feedback’, [ ‘public’ => true, ‘labels’ => [ ‘singular_name’ => ‘Feedback’, ‘name’ => ‘Feedback’, ] ]); … Read more

What is the required format for importing posts into WordPress?

Here is an import file where only a few settings are used (although you may be able to exclude even more), which successfully imports three posts (tested on WP 4.2.2): <?xml version=”1.0″ encoding=”UTF-8″ ?> <rss version=”2.0″ xmlns:excerpt=”http://wordpress.org/export/1.2/excerpt/” xmlns:content=”http://purl.org/rss/1.0/modules/content/” xmlns:wfw=”http://wellformedweb.org/CommentAPI/” xmlns:dc=”http://purl.org/dc/elements/1.1/” xmlns:wp=”http://wordpress.org/export/1.2/” > <channel> <wp:wxr_version>1.2</wp:wxr_version> <item> <title>My first post</title> <dc:creator><![CDATA[admin]]></dc:creator> <description></description> <content:encoded><![CDATA[ <p>Welcome to my first … Read more

Import WordPress xml file larger than 8mb

OPTION 1: If a WordPress WXR file, an XML file exported from WordPress, is too large to import, there are several things you might try to overcome that limit. Increase the amount of memory a PHP script may consume. Note: If using a shared hosting service, you may need to ask your host to increase … Read more

How to add post featured image to RSS item tag?

You could do it by adding an action to the hook ‘rss2_item’ like so: add_action(‘rss2_item’, function(){ global $post; $output=””; $thumbnail_ID = get_post_thumbnail_id( $post->ID ); $thumbnail = wp_get_attachment_image_src($thumbnail_ID, ‘thumbnail’); $output .= ‘<post-thumbnail>’; $output .= ‘<url>’. $thumbnail[0] .'</url>’; $output .= ‘<width>’. $thumbnail[1] .'</width>’; $output .= ‘<height>’. $thumbnail[2] .'</height>’; $output .= ‘</post-thumbnail>’; echo $output; });

WordPress WXR Specification

I posed this question to John O’Nolan, a WordPress core developer, who forwarded my question to core committer Aaron Jorbin. O’Nolan responded by saying (I’m paraphrasing) that there isn’t any official documentation on the WXR standard, but that reverse engineering a WXR export should give me all the information I need. O’Nolan also noted that … Read more

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