Thanks to @AhmedMahdi’s comment I figured out the following works for my situation:
select * from wp_posts
where post_status="publish"
order by post_modified desc;
The where condition is necessary to remove all the draft or private posts that I am not concerned with.
Related Posts:
- Manually removing revision post types
- What happens if I delete all the rows that represents a post revision from the posts table into WordPress database?
- MySQL Query to Retrieve Category from wp_posts
- Any way to create a revision of a post ONLY with a new button in the Meta Box?
- Search & Remove Specific Shortcode From All Posts
- Manually delete post from database
- how to enable different number of revisions for different blogs when using WPMU?
- How to force update all posts after import
- Get the author of the latest revision
- Query All users that has post
- Can’t publish new posts
- Adding a cancel button to edit post screen
- How do I batch create revisions of all posts?
- Are posts updated or built from revisions + autosaves?
- Reset/Reorder posts ID in the MySQL wp_posts table
- Enable post revisions for a specific post
- How do I find which articles are missing a featured image in The WordPress database?
- Tags to Post-ID mysql query. Tag Search
- Define a wordpress constant through plugin functions?
- Post revisions disappeared (for some posts)
- wp_insert_post – duration
- How to hide html tags on revision comparison pages?
- Get user categories with most posts in it
- MySql query to get posts with all meta and terms
- Visual (non-HTML) display of post revisions [closed]
- Custom order for Mysql array
- List authors with the last post title and order by last post date
- How to Mysql select a list of posts with meta_values AND all relevant categories?
- Remove a shortcode from all WordPress posts
- Order posts alphabetically: how to set order=asc in mysql query?
- What do these phpMyAdmin errors mean on my WordPress databaes?
- why there are so many posts whoes post_type is revision? will these records waste too much database space?
- Display post changelog in post
- Delete post results in “Cannot delete or update a parent row: a foreign key constraint fails”
- Why my wp_posts data is so huge?
- Inner join overrides Advanced Custom Fields plugin’s get_field [closed]
- update image path with words starting uppercase to lowercase chars
- Delete post revisions only for a single post
- Queries take 120+ seconds on my large WordPress site
- Database hacked – random posts are modified
- Need to change all links in page content but not in post content
- Can’t update WordPress Page if post_content is Empty
- Restore woocommerce orders
- How to select particular month post from table and update the post status using MySQL?
- How do post IDs work in WordPress?
- Get author posts count after excluding a category
- get last post’s link with SQL query
- query for filtering published posts?
- MySQL: Possible to replace all of wp_posts.post_content(id#) via UPDATE + REPLACE + SELECT?
- Deleting post tags removes categories
- Return records between two meta datetimes saved as strings
- WP query taxonomy optimization
- How can I change the date format of the revision list?
- MYSQL: Create SQL query to search for string and replace
- Query to fetch custom taxonomy along with post title
- Mysql update menu_order problem
- Bulk find & replace on WordPress posts/pages (minus image paths)
- WordPress MySQL Search and replace with wildcard?
- Add postmeta to all blog posts
- ‘posts’ table should not store the absolute image path
- Dev and prod on the same database- dev version active for IOS
- load post data into mysql
- Clean up customize_changeset in DB
- SQL trigger failes with post_content
- Converting Posts to Pages
- How to change the publishing date of each posts?
- SQL query to remove first image in all posts
- Delete junk text from all the post using my sql command
- FIND and REPLACE wp_posts AND IGNORE custom post type mysql query
- How to create a post based on data in a table?
- If meta_key exists then don’t select this post?
- How to update wp_posts with just the returned comment count from wp_comments (SQL GROUP BY)
- How to add a new tab to page editor
- How to query serialized array by comparing greater than (>=)?
- when returns wp_errors or 0 , how to set conditional tag
- 2nd button row from WP Super Edit or TinyMCE Advanced doesn’t show to 2nd admin
- How to disable single post view in wp
- Select a random post from a specific category?
- Insert Content In Between Post Feed
- How to bulk-untag multiple posts?
- Using $wpdb to fetch posts with meta data
- Is there a way to specify an extra class for a post or page with no title?
- Prevent posts with certain post_meta to be edited
- How to get different Related Posts
- Using wp-cli and delete everypost first image
- Inserting an example of the last 3 post on to the homepage
- how to get day month and year from wp_post_object?
- Using Posts Like a Page
- Pagination for normal (standard) posts on a page with a custom loop?
- How to associate a custom taxonomy to a post multiple times
- Can I show category name in url for only one of my categories?
- Featured image error after importing blog posts
- How do I remove all links from all my posts at once?
- Display Updated Date Instead of Published Date
- How do I create a ‘selection’ criteria list’ that will then dictate which posts are generated when the user presses search?
- get “read more” with custom DB query like you would with WP Query
- Create custom URL with different levels
- making a few sites in wordpress
- How to use wp_editor(); in functions.php then retrieve content in the template
- append $_GET parameters to post