Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1298156

    I am working on moving all of my blogs over from a live site to a development site. Once done with the redesign I will be taking the development site live again.
    When I imported the blog posts using the WP importer I loose all of the extra paragraph returns.
    I guess when I have been doing blogs I really am entering two returns to make a full space after each paragraph. So when I imported these are all gone?
    Here is a sample of the live site post:

    Then when this imported to the dev site see what happened here:
    https://devapp.galaxypress.com/ancient-environmental-clean-up-project-hidden-in-plain-sight/

    Hoping this is a simple fix on how I import this. Right before I go live I would like to reimport all of the posts newly from the live site so that all of the current comments come over.
    Thanks, Jason

    #1298419

    Hey Jason,

    Thank you for the inquiry.

    Looks like some of the paragraphs have been combined into a single paragraph. Is the theme already active when you imported the posts?

    Best regards,
    Ismael

    #1298702

    Yes, when I imported these the theme was already active. I went into galaxypress.com, the live site and using tools/export created an XML file.

    Then went to the devapp.galaxypress.com and using the XML file imported these posts.

    Both sites have the same WP and Enfold version (4.8.2).

    When I then import on the devapp.galaxypress.com site using the XML file this is when I loose all of the extra paragraph spaces.

    https://devapp.galaxypress.com/mission-earth-science-fiction-satire/

    This above should look like this:

    Thanks for letting me know any ideas on this.

    #1298895

    Hi,

    Thank you for the update.

    Looks like this is a common issue with the WP import. Another user created a tool that prevents conversion of paragraphs to br tags, which is probably what is happening in your import. The tool is available in the following link.

    // https://scotthom.com/2018/12/fix-wordpress-import-wpautop/

    Download the zip file, extract it to the same directory where your XML file is, then run this command.

    php fix-wordpress-export-wpautop.php < original-export-file.xml > new-export-file.xml
    

    Replace the file name with the actual name of your XML file and the desired output name.

    IMPORTANT: Please create a backup of the XML file before doing the steps above.

    This is the original thread: https://wordpress.org/support/topic/double-line-breaks-changed-to-single-line-breaks-after-importing-xml-file/

    Best regards,
    Ismael

    #1304540

    Dear Ismael,

    Thanks so much. I downloaded the XML file and put it on my MAC. I then downloaded the PHP file from // https://scotthom.com/2018/12/fix-wordpress-import-wpautop/ and ran the script. (A friend walked me through the phone on running the script.)

    As a note it took me a little bit to figure out how to run the script so I called someone who helped me and it worked. But when I went to do it a second time I could not remember what I put in front of the php fix-wordpress-export-wpautop.php < original-export-file.xml > new-export-file.xml to run the command.

    I know I did “cd” to the folder where the files were. Then after this I can’t duplicate again how I ran the script. If you could put this in layman terms on how to do this in MAC Terminal it would be great. Thanks, Jason

    #1304845

    Hi,

    Thank you for following up. Glad to know that the script worked. We did not get a chance to try it.

    That is actually the complete command, but you have to make sure that the php script file is in the same folder as the xml file that you are trying to fix. And of course you have to replace original-export-file.xml with the actual name of your xml file and the new-export-file.xml with the desired name of the file after the fix.

    Do you see any errors when you run the command? By default PHP is installed on MacOS, so that should not be an issue, and you should be able to use the php command anywhere.

    Best regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.