You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm testing migrating from a WordPress install to Craft CMS and I figured out how to get past errors that are not explained in the docs when exporting your custom post types and custom fields to XML, using the WP All Export plugin, and processing them in your control panel with the FeedMe plugin. I found a workaround. At least, it worked for me. YMMV.
Before exporting, you may need to update your max_input_vars setting in php.ini for your WordPress server if you have a lot of metadata. Mine crapped out, so I upped it from 1000 to 10,000 and then changed it back when done.
Make sure to export your post slugs from WordPress as this is a great piece of data to use as a unique identifier, and because FeedMe will recognize the slug and add it when it creates your Entries.
If you have a sizeable amount of metadata, like I did, this plugin tends to mess up the XML. If you try to process these with the FeedMe plugin, you will get errors that there is "Extra content at the end of the document." xmllint will tell you "Validation Failed: no DTD found!"
In order to fix the crap code this plugin might spit out, you can follow the steps below.
Here's what to fix:
Open the XML in a code editor
Search for end </data> tags (it tends to add extra in the middle of the file)
Delete the extra ending </data> tags and add one at the end of the file if it's not there
Look for broken tags (some end tags may be half-created)
Look for empty tags outside of the <post></post> tags and move them inside or delete if not needed
If the Fields in your control panel don't exist for your WP custom fields, create them and add to the Entry
Do a Find/Replace in the XML for the WP <custom_field_names> and change them to the handle of your Craft Fields
Save your XML file
Place the XML in your public folder
Follow the instructions to process your feed, match up the handles and custom fields in the menus on final step
It is a little bit of a process, but so far it's working. If you do it in stages (processing the feed multiple times with chunks of fields as you make them), you may see your top Entry in the list have duplicate fields unless you uncheck the box, but you can delete the empty duplicate with the cog wheel. Make sure to uncheck Create New Elements and make sure you DO check Update Existing Elements if doing things in stages.
I haven't done my images yet, but have a method in mind. I will post here afterward to share the results and process.
Hope this helps if you run into the same problem I did.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm testing migrating from a WordPress install to Craft CMS and I figured out how to get past errors that are not explained in the docs when exporting your custom post types and custom fields to XML, using the WP All Export plugin, and processing them in your control panel with the FeedMe plugin. I found a workaround. At least, it worked for me. YMMV.
Before exporting, you may need to update your
max_input_vars
setting inphp.ini
for your WordPress server if you have a lot of metadata. Mine crapped out, so I upped it from 1000 to 10,000 and then changed it back when done.Make sure to export your post
slug
s from WordPress as this is a great piece of data to use as a unique identifier, and because FeedMe will recognize the slug and add it when it creates your Entries.If you have a sizeable amount of metadata, like I did, this plugin tends to mess up the XML. If you try to process these with the FeedMe plugin, you will get errors that there is "Extra content at the end of the document."
xmllint
will tell you "Validation Failed: no DTD found!"In order to fix the crap code this plugin might spit out, you can follow the steps below.
Here's what to fix:
</data>
tags (it tends to add extra in the middle of the file)</data>
tags and add one at the end of the file if it's not there<post></post>
tags and move them inside or delete if not neededFields
in your control panel don't exist for your WP custom fields, create them and add to the Entry<custom_field_names>
and change them to thehandle
of your Craft Fieldshandles
andcustom fields
in the menus on final stepIt is a little bit of a process, but so far it's working. If you do it in stages (processing the feed multiple times with chunks of fields as you make them), you may see your top Entry in the list have duplicate fields unless you uncheck the box, but you can delete the empty duplicate with the cog wheel. Make sure to uncheck
Create New Elements
and make sure you DO checkUpdate Existing Elements
if doing things in stages.I haven't done my images yet, but have a method in mind. I will post here afterward to share the results and process.
Hope this helps if you run into the same problem I did.
Beta Was this translation helpful? Give feedback.
All reactions