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
- wp_update_post function exclude specific field
- large number (bigint) for post ID issue in database
- WordPress Admin login problems- PLEASE HELP [closed]
- What is an ORM, how does it work, and how should I use one? [closed]
- What is the difference between an ORM and an ODM?
- What is this JavaScript “require”?
- Rename a table in MySQL
- How should I tackle –secure-file-priv in MySQL?
- What is this JavaScript “require”?
- What is “Advanced” SQL?
- What’s the difference between identifying and non-identifying relationships?
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- What are the differences between B trees and B+ trees?
- MySQL SELECT increment counter
- How to resolve ORA-011033: ORACLE initialization or shutdown in progress
- Example of a strong and weak entity types
- Oracle SQL query for Date format
- phpMyAdmin – Error > Incorrect format parameter?
- Strange Characters in database text: Ã, Ã, ¢, â‚ €,
- Difference between partition key, composite key and clustering key in Cassandra?
- How SID is different from Service name in Oracle tnsnames.ora
- What is a relation in database terminology?
- Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user ‘root’@’localhost'(using password:YES)
- Database vs File system storage
- Can I have multiple primary keys in a single table?
- Exclude Statement in SQL
- How do you query for “is not null” in Mongo?
- What is a file based database?
- Is it fine to have foreign key as primary key?
- Storing Images in DB – Yea or Nay?
- Using wpdb to connect to a separate database
- how to Optimize WordPress database for 10 million post? [duplicate]
- MySQL Database User: Which Privileges are needed?
- Why is my database import losing text widget data?
- Database synchronization between dev/staging and production
- Keeping WP database synced across multiple developers using git
- Post meta vs separate database tables
- How to update custom fields using the wp_insert_post() function?
- WPDB Insert or if exists Update
- Multiple developers / editors working on a site in progress
- Attaching taxonomy data to post with wp_insert_post
- How can I make updates to a site, on a development copy, but then move updates back without overriding live site’s evolving database?
- get_results using wpdb
- Will it break my site if I delete all transient records in wp_options table?
- Checking if Database Table exists
- What’s the simplest way to backup my WordPress database?
- WordPress (MyISAM) database is slow, should I switch to InnoDB?