(obviously) untested, and make a backup of your DB first…but you ought to be able to do this natively in SQL:
UPDATE wp_posts
SET post_content = REPLACE(post_content, '<p>', '')
WHERE (put whatever selection logic you want here...)
Do the same for </p>. Like I said…make a backup first…
(edit) geez, didn’t realize this was a year-old question…sorry, for some reason it was edited and at the top of the active questions list…
Related Posts:
- How to auto-format code in Eclipse?
- Adding spaces in multiple lines simultaneously – in Pycharm
- can I add a custom format to the format option in the text panel?
- Change CSS/formatting on specific page, but not pages in general?
- How to change text size of Gutenberg editor
- Content over 10,000 characters won’t display with the_content()
- How to prevent automatic conversion of dashes to –
- Add dollar sign and commas to a number?
- Line breaks not showing up properly
- Use a language specific thousand separator
- Comment formatting with comment_content
- Formating the display of a post’s date, outside the Loop
- Formatting with
- How to define a custom font family for a wordpress blog that will not affect the entire site
- Keep formatting for tables copied from MS Word?
- Page formatting lost when I attempt a revision
- How to properly format if statement with html and php
- How can I prevent WordPress to wrap into a paragragraph
- Linebreaks behaving oddly inside blockquotes
- post_class() breaks out of formatting. . . extra markup also generated
- How to Prevent WordPress from Automatically Applying Inline Styles to Post Images?
- How do I format the date in Event Organizer?
- Images that copy code to clipboard when you click on them
- Formatting poetry in wordpress
- Trim content without stripping formatting
- Changing the code format for wordpress
- How to remove filter apostrophe and single quotation
- Display KML (or other “raw data” file) nicely in WP?
- why doesnt my formatting work in my wisiwig editor?
- Formatting issues within Divi theme
- Preparing Hardcopy and Online Page
- how to display the web content which contain html code prolerly?
- How to prevent wordpress from autoformatting my posts once and for all?
- How do I display page content next to a contact form, rather than under it?
- Multiple item layout with one query
- Fix issue with displaced braces( )
- Formatting text in posts
- Is there a way to reorder a collection of posts to read from top (oldest) to bottom (newest)?
- How to add a spoiler without using shortcode-based plugins [closed]
- Can’t get blog entry to format properly using wp-load
- Paste Function Broken
- Moving formatted data in Salesforce rich text field into WordPress
- Expected RBRACE, but the bracket is there?
- std::string formatting like sprintf
- Convert java.util.Date to String
- How to format numbers as currency strings
- Properly formatted multiplication table
- How to format a string as a telephone number in C#
- (Excel) Conditional Formatting based on Adjacent Cell Value
- Formatting Code Snippets on Free WordPress.com Account?
- Issue with enabling formatting in excerpts in WordPress
- Remove hidden formatting when user paste text from MS Word into TinyMCE
- Preserve white-space in Page
- Formatting post content to exclude gallery
- Why does WP not like my container?
- Add visual editor capability to custom excerpt window?
- Lost formatting after saving
- Keep pasted pre formatted code as it is -with tabs- in visual editor
- Is there a way to disable formatting shortcuts in 4.3?
- Get last seen date/time in wordpress get_comments() [closed]
- $content = $post->post_content; with formating
- How to center oEmbedded content
- What are the “U” and “G” time formats?
- Unwanted line break before
- Number format for wp_count_posts()
- Modify Gallery Output to render differently on a PAGE and a POST
- Is sanitize_title_with_dashes formatting function too liberal (in terms of accepted characters)?
- How to set up VS Code for WP plugin/theme development in 2021? [closed]
- How to preserve exact formatting when copy pasting from Facebook into WordPress (or elsewhere)?
- How can I remove line breaks from manually formatted HTML?
- How can I add custom text styles to the visual text editor?
- Exclude uploaded files from appearing in the excerpt()
- Space Not Being Generated in HTML Output?
- WordPress get_the_content losing formatting when emailed
- Multiple Rows in a using wp_query
- Special Formatting for WordPress Plugin Description?
- HTML tables in content areas
- Displaying Meta-Box Data Properly
- Using Microsift Word/Outlook for content publishing to WordPress
- Pasting formatted text from MS-Word
- All images on one line for each post
- Problem with -> in pre tags
- Snippet to Format Elementor Text Box Throws Error
- Email sent from WordPress has HTML tags
- Measure time in ONLY HOUR format
- Is there an easy way to remove the data-preserver-spaces span from blocks?
- Page takes on two different formats
- Understanding automatic text formatting in the WordPress editor
- Paste from word not preserving formatting
- How to format the various types of custom fields?
- What could interfere with changing iframe contents with href?
- the_content inside my own theme does not retain line breaks / enters like in the admin
- ACF loop and php formatting
- WordPress excerpt with formatting and allowing selected tags
- getpost content with all formatting for admin pages
- Add Default WordPress Formatting To Data From External SQL Tables?
- Custom formatting
- Date is showing in unreadable format. How to convert to readable date?
- How can I add the option to format to list in RichTextToolbarButton?
- How to customize Date Format for American visitors?