Importing xml file not working properly.

We are underway to restore our site http://www.n***ep.net; we already imported an XML file with size 91MB (included all posts in the text).

We are importing above file by Wordpress Tools, however, each time imported that file, the website only appears 1 or 2 posts. We tried and tried again many times, but it does not work!

https://pasteboard.co/HuOUhDK.jpg
After 4 times imported XML file, we just had only 5 posts as you can see above snapshot.

Please help!

  • Adam Czajczyk

    Hello Khanh

    I hope you're well today and thank you for your question!

    I have checked your site and I also tried to re-import posts there but I was experiencing the same issue - only a handful of post was imported. Before trying that I also raised a WP memory limit for your site and enabled debugging to be able to catch any errors that might appear.

    However, there was no debug.log created and no errors in a browser console. I then tried to import it to my own test setup but to no luck as well. I tried different import tools and it looks like the export file is malformed. There seems to be some code that's braking XML which in turn breaks "importer" behavior.

    I'll need some consultation on this from our developers so I have forwarded this issue to them and am awaiting their response. Please keep an eye on this ticket and we'll keep you updated on the status of this.

    Kind regards,
    Adam

  • Konstantinos Xenos

    Hi Khanh !

    The default WordPress import unfortunately runs everything in a single attempt, this is why you are not able to import a big amount of posts since it tries to gather all data beforehand.

    Unfortunately I've been having some issues with your CPanel, I couldn't for example change your PHP vars to give more execution time just in case that worked ( maybe your account doesn't have permissions - I'm not sure ).

    In any case we're here to help, so! I've installed a Plugin called WP All Import. This will help you import any amount of posts without problems as it imports them by chunks ( 20 - 20 for example ) so your server will definitely handle it. I already did a test and I went up to ~1600 posts and then cleared everything up so you can run it yourself.

    My problem is that since I'm not speaking your language I don't know what field to map to be 100% sure so I can import them myself for you.

    Let me walk you through it with some screenshots as it's really easy, every screenshot uploaded here is from every step:

    Step 1: Upload your .xml file and select Posts when the option becomes available.

    Step 2: Select the item as an element from the list on your left ( it should automatically be selected for you ).

    Step 3 ( screenshots 3, 3_2, 3_3 ) :
    This is the critical part, on the right side of your screen you will have a list of fields that are inside your .xml file. For example <title>, <dc_creator> etc. On the left side of the screen all options will be empty.

    You will have to drag & drop the <title> element to the Title ( from right to left ) if you want that xml item to be inserted on that specific field.

    For example Content should be <content_encoded> from the list, so on so forth. The screenshots I'm providing are a basic setup of what I did but you can make it as complete / complex as you like with multiple Categories, Tags. You know your posts better than me so it will be easier for you to identify what goes where.

    After you're done 'mapping' the fields proceed to step 4! Take your time here as this is what you will actually be importing.

    Step 4:
    The Unique Identifier field is just an ID for WP All Import to keep it's records, you can press Auto Detect. All other options can stay as on my screenshot.

    Make sure to have 'Iterative, Piece-by-Piece Processing' and that the iteration is on 20 records with 1000 record chunks selected ( this is what will make sure that your server won't timeout ).

    Step 5: Press continue, on the next screen it will calculate and process the XML and will ask you to proceed importing.

    Final Page: On the last page you will see a loading bar informing you of the percentage and the posts that have been inserted. Stay on this screen until it finishes.

    ----

    If you follow these instructions you'll be able to insert as many posts as you like. Make sure to also inform your hosting company about the redirect issues your CPanel is having so they can take a look.

    I hope this helps!

    Best regards,
    Konstantinos

  • Khanh

    Hello guys,
    We just completed importing xml file and got all of posts in dashboard already. We noticed that your recommend tool (WP all import) are much more useful and effective than a tool we used before (Wordpress Tools), thanks again for that.

    However, now when we actived theme and some necessary plugins, and got another problem is homepage was not performance correctly, while postpages are ok.

    We checked again in dashboard (edit page)
    http://www.xxxxxx.net/wp-admin/post.php?post=203149&action=edit

    There is a missing of button HomePage Builder! Where we can design/config our homepage (this is a theme's tool, not using plugin).

    Could you please help to take look on it?
    As you got our ID and pass for hosting and dashboard yesterday already, however, if you need to send them again, please let me know.

    Thanks you in advance,
    Kind regards,
    Khanh

  • Adam Czajczyk

    Hello Khanh

    I'm glad that the plugin that Konstantinos suggested worked for you, that's a great news!

    As for the missing button. I'm not sure if I correctly understand. I can see that you got a Visual Composer there. When I entered the page to edit that you shared linked to in your last post, it was by default in a standard WP editor but I had two buttons there: "Backend Editor" and "Frontend Editor" which are both of a Visual Composer.

    Then I found the Homepage and entered it in back-end and these two buttons are there as well so that seems to be fine. If you click "Backend Editor" it will open a visual editor in the back-end and if you use "Frontend Editor" it will let you work directly on that page in front-end.

    So, that seems to be as expected and I"m not quite sure which button is missing, could you explain that a bit more, please?

    As for editing posts. By default Visual Composer only works with pages. That can be changed so I went to "Visual Composer -> Role Manager" page in your site's back-end and switched "Post type" option for "Administrator" from "Posts only" to "Custom" and then selected both "posts" and "pages" and the editor is now available also for posts.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.