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

Failed to import Media

I had a very similar problem when I moved a WordPress Blog from a single WordPress installation to a Multisite installation with different domain names but same IP. I found out that the problem is the wp_http_validate_url function which drops the URL if the source IP is the same as the destination IP. You can … Read more

Where does the Media Library live in the database?

Select * from wp_posts where post_type=”attachment”; Will return all the entries in the Media Library. After the execution, you can export the result table as SQL, or CSV, or any other portable data format you like. Remember, if you are not sure if the entries already exist in your database, use the INSERT IGNORE statement … Read more

Python circular importing?

I think the answer by jpmc26, while by no means wrong, comes down too heavily on circular imports. They can work just fine, if you set them up correctly. The easiest way to do so is to use import my_module syntax, rather than from my_module import some_object. The former will almost always work, even if my_module included imports us back. The latter … Read more

Java Package Does Not Exist Error

Are they in the right subdirectories? If you put /usr/share/stuff on the class path, files defined with package org.name should be in /usr/share/stuff/org/name. EDIT: If you don’t already know this, you should probably read this doc about understanding classpath. EDIT 2: Sorry, I hadn’t realised you were talking of Java source files in /usr/share/stuff. Not only they need to be in the … Read more