a quick and dirty way to do this is by running this ONCE:
global $post;
$posts = new WP_Query();
$posts->query(array('posts_per_page' => -1, 'post_type' => 'post'));
while ($posts->have_posts()):
$posts->the_post();
$post->post_content = wpautop($post->post_content); // replaces new line chars with <p>'s
wp_update_post($post); // updates the database
endwhile;
(didn’t test it)
But how are you exporting your posts in text form? Maybe you could apply the autop filter in your export routine
Related Posts:
- How do I export my WordPress blog as a book? [closed]
- Is it possible to export WordPress from command line?
- Export all posts as individual plain txt files
- Export specific menu [duplicate]
- Import posts with featured images
- How to Create Export/Import Functionality for Plugin
- Most Flawless Way To Transfer from Dev to Prod [duplicate]
- Problem: Create a cron job to export posts to a WordPress XML file on server
- export csv functionality into my plugin
- Best practice to import/export specific pages and posts
- Export posts to csv with data from ACF custom fields
- Export a blog(not mine) as a PDF document
- export category and sub-category
- I am having trouble with article formatting when exporting/importing articles from the production to the development environments
- Export local WP install to live – help needed
- Moving wordpress site to subpage of another site
- 403 export error when exporting pages from multisite subfolder site
- Export Custom Report as CSV
- UTF8 Encoding problems when exporting posts
- How to give my database to a friend for duplication in a secure way [closed]
- How to assign name the WordPress export.xml file
- How can transfer get so large when exporting data (15-16MB to over 10GB)
- Export All Posts and Media to XML and/or Word
- Button to download export data WordPress in CSV file
- How to add a timestamp to the exported WXR filename?
- ExpressionEngine Export/Import Issues
- Get all post from table and put it in excel sheet
- How can I export Grunion Contact Form messages in an easily parsable format, e.g. CSV?
- Different way to export data from WP?
- How to export posts and keep html tags in the title
- Does doing an export moves all my posts or just a copy of it?
- wordpress export pretty permalinks and post excerpt export
- Best Way To Locate Offending WP Table
- How do I export whole Unity project with all scenes?
- How to export JavaScript array info to csv (on client side)?
- Failed to import Media
- How To Export/Import WordPress (MySQL) Database Properly Via Command-Line?
- Is it possible to “freeze” a WordPress blog?
- One Click demo content installation feature in WordPress theme options panel
- Exporting revisions
- How can I get an XML export of my 1K+ posts WordPress instance?
- How can I export WordPress posts’ attachments?
- Non-Linear Questionnaires in WordPress
- How to migrate WordPress Blogs into Multisite without using the GUI-Import/Export Feature
- Copy site from one multisite to another
- How can I export and then import posts with featured images?
- Is there a way to export Advanced Custom Fields data?
- Exporting Data from WordPress into a flat table
- MySQL Syntax Error upon restoring database from backup [closed]
- Is it possible to import a wordpress backup from a single site in to a multi-site configuration?
- Creating a one click demo importer
- WordPress export tool doesn’t export post-format value of custom post type?
- Create a clone from one WordPress site to another in a few minutes
- Export blog posts with MathJax to LaTeX document?
- Exporting table to csv works in the admin but exports HTML data when used on the front end
- How to export post 2 posts WordPress plugin data [closed]
- Extending the woocommerce product export functionality
- Import users from old WP site to new one
- Export Specific User data without plugin
- What is the difference between wp-admin>Export>All content and MySql dump and import
- How do I export WordPress galleries?
- Export SQL query based on post type
- Export Users and their Advanced Custom Fields
- get csv of users with user_meta
- How to modify admin headers
- Importer failed to import posts as format “day and name”
- Migrating to Tumblr [closed]
- WordPress localhost site always redirect to live site [closed]
- Export postmeta (custom fields)
- When moving a WordPress installation to a new server, why do I have to update each post before content shows?
- Customizing $product->get_title() function
- Exporting completed webiste for another server
- Exporting by table
- Two-way synchronizing of a post type among multisite blogs
- Transferring theme and imported post attachments
- How to Get Last ID?
- wp-cli error: “Term is missing a parent”
- how to convert a wp multisite into a single site with content from subsites
- Featured image error after importing blog posts
- Exporting post info into a formatted table and into MailChimp as automated as possible
- WordPress shortcode to pull product post data
- Content export, reinstall and content import
- How do I split a single WPML site with 6 languages (English is Main) into Multisite with 5 subfolders
- Exporting CPT from dev site and import into live site?
- How to import several big Import XMLs?
- How can I export data without using any import/export plugin
- WooCommerce – Adding Product Attributes to CSV Export
- Importable Menus? Along with Pages (a site layout template)
- How to replace all images within exported xml files to demo.jpg?
- Importing blog failed to download attachments from older (still online) blog
- Export and import all Plugin options
- how to import custom taxonomy (& terms)
- Saving data to database and exporting to excel
- Import/Export WordPress demo
- WXR? Export from Drupal 7 – import into WordPress
- Siteurl code for links
- How to export and import plugin data through WordPress tools option
- Export user data from Squirrly’s Starbox plugin?
- is it possible to use wp cli to export custom post types
- Does WordPress import export tool keeps the file hosted on the old website?