It wasn’t working because at public status draft/publish were written without a capitol so it has to be 'post_status' => 'Draft' or 'post_status' => 'Publish'
Related Posts:
- Why WordPress choose data serialization over json_encode?
- Issue with wp_insert_post and post_content field error Could not update post in the database
- Dealing with Many Meta Values, 30+
- What is the most secure way to store post meta data in WP?
- How to delete outdated, wrongly sized images in _wp_attachment_metadata?
- Meta query interfering with orderby relevance
- Migrating non-WordPress CMS to WordPress, lots of data to move — possible solutions?
- How to solve slow WordPress site caused by attachment_metadata
- Can’t update database after wordpress update from 3.8.1 to 4.4.1
- Delete all post meta except featured image
- Add search Value to wp_list_table pagination
- Using table lock with wp_insert_post?
- Why are no posts showing despite my apparently correct DB restoration?
- Is it possible to store visitors IPs in wp_postmeta table?
- Multiple postmeta with same name for one post in wp_postmeta table
- Delete all post meta except featured image Using SQL
- One post carries 30 postmeta values, is this too much?
- delete post meta from db, even if does not exist?
- WordPress and MySQL: how to transfer Meta_key and Meta_Value from one post_id to another
- Storing data for a wordpress plugin
- Where does the actual data stored by add_post_meta
- Structure of postmeta meta_value for woocommerce product download
- Insert post in another database
- Routine to convert custom post meta from old to new value
- Retrieve data from the database to table such as comments in the admin control panel
- Saving zero as meta value
- Uknown meta entries in wp_postmeta
- How to combine multiple wp_insert_post into one in order to gain better performance
- Does post_meta data need to be unserialzed?
- Adding prefix to WordPress database tables breaks admin capabilities?
- Is my way to change WordPress server is correct?
- Link image with data from the wpdb
- Compare User meta_value with Product meta_value
- How to save EXIF metadata in WordPress database?
- _wp_attachment_metadata is not being added to database when PDF files uploaded
- “BS_” rows in postmeta table
- Migrating meta_key and meta_value from old theme to new one
- WordPress site migration – locked out of admin area
- WordPress Migration – Issue with admin panel changes
- Database structure for thousands of posts
- WordPress URL error for links
- How much post meta data is too much?
- Call to a member function insert()
- How do i get value from wp_postmeta?
- add_post_meta displays in admin edit area
- Recommended Post Structure for DB Storage
- SQL query : Select a thumbnail for a media
- Recover Same WordPress Admin Password
- cannot access wp-admin after options table crash and repair
- Database Queries are crashing the server
- How to protect my credentials on my clients website
- large number (bigint) for post ID issue in database
- What are the differences between B trees and B+ trees?
- Strange Characters in database text: Ã, Ã, ¢, â‚ €,
- Storing Images in DB – Yea or Nay?
- Attaching taxonomy data to post with wp_insert_post
- Connect to database using wordpress wp-config file
- wp_users user_status field
- Display data from a non wordpress database on a page template
- Is it possible to switch the data layer within WordPress?
- Changing the Database Connection Error Message
- Should I hint table index for search query on wp_post
- Corrupt WordPress Database
- Have multiple local wordpress installs share a wp-content folder and database
- Connecting to external oracle database
- Bulk Update of Custom Post Type Post Status through SQL
- How do I add indexes to WordPress Database?
- Faulty restore of the database, encoding issue
- Huge wp_options table
- Can’t save ajax value to database
- Updating all rows of table with $wpdb
- What actions affect files, DB, or both?
- Block search SQL from happening
- Is $wpdb->prepare escaping to much? How to use it properly?
- wp_options table has duplicate rows and primary key / autoincrement has been removed
- What is the purpose of storing `siteurl` in database?
- How to log database changes during an upgrade?
- Using same database for main and subdomain
- Emojis getting converted to “?”
- Building a Scalable Resiliant WP Setup
- Single database for multiple instances
- Search and replace special characters (å,ä,ö) for image attachments only in database
- Accidentally deleted active_plugins portion of the wp_options DB table
- Automate dir and DB stack creation with WP-CLI
- Moving WP from local server to live, error establishing a db connection
- Is there a way to see history of WordPress database changes?
- Exporting table to csv works in the admin but exports HTML data when used on the front end
- wp search-replace (not executing)
- How to have an external DB read and get data from my wordpress database
- Import users from old WP site to new one
- Create table from array with prepare
- Migrate database between 2 different wordpress version
- wp_usermeta key problem
- How to properly configure SSL connection to remote azure database for running queries within a WordPress environment
- Uploading to WordPress Database
- Database Errors since site updated to WordPress 6.4.3
- $wpdb->update is not working until next page refresh. Is there one more step?
- Merging multiple WP databases into one for a multilanguage site prevents access to language-specific WP administration
- How to change all the images in post content to full/orginal size – Thumbnails are broken
- Can I Load posts from an External database if the post is not found on Main WordPress Database