1

I have a quick question around the import file for WordPress (WXR) as I'm really new to WordPress, a couple of things don't make sense.

In most examples I found, the first part of the /channel node contains information about the site, like:

<title>My Site Title</title>
<link>http://www.mythicalsite.co</link>
<description><![CDATA[Information on my site, with sp'ecial character]]></description>

If I create a new WordPress site and import this file, for example, nothing gets updated? If this is expected behavior, why include this? Can the export file not just start with the nodes I need imported? If I leave this out, the import tool cries me a river.

Basically, if I update the basic site information in this XML document, my assumption is that WordPress should comply with the information supplied, and update accordingly, right?

Update

Like stated, if I add a single to create a post, it adds the post without issue, but the basic information, if I modify them in the WXR file, they do not get updated in the database.

My test file.

<?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>
        <title>My Mythical Site</title>
        <link>http://www.mythical.co</link>
        <description><![CDATA[Just a notice & stuff]]></description>
        <pubDate>Wed, 28 May 2014 10:33:47 +0200</pubDate>
        <language>en-ZA</language>
        <wp:wxr_version>1.2</wp:wxr_version>
        <wp:base_site_url>http://www.mythical.co</wp:base_site_url>
        <wp:base_blog_url>http://www.mythical.co</wp:base_blog_url>
        <generator>http://wordpress.org/?v=3.9.1</generator>
    </channel>
</rss>
  • Could you post the full code? – cybmeta May 28 '14 at 9:19
  • cybmeta, this is just a general question. the import file I tested with contained nothing more than basic site information, no items, categories and additional meta information. i've updated my question with my WXR file – JadedEric May 28 '14 at 9:49
  • Could you elaborate on "cries me a river" part? :) What errors are you getting? – Rarst May 29 '14 at 14:10
  • hi @Rarst, i simply does not do what i want. after some investigation into the importer code, I found that it does ignore the tags highlighted if they are not correctly formatted. unfortunately, most bloggers out there don't stipulate the exact requirements, and expect you (as developer) to figure this out yourself. thanks. – JadedEric Jun 3 '14 at 20:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.