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
- Is it fine to have foreign key as primary key?
- Detecting errors generated by $wpdb->get_results()
- Restoring WordPress posts from database only
- So much data in postmeta
- Performance Gains of Relational DB Setup
- store simple data in get_option()
- BuddyPress: What’s the use of wp_bp_xprofile_data table and how does it get updated? [closed]
- What is an efficient way to query based on post_meta?
- storing database in version control
- Is deleting orphaned wp_options entries safe?
- How to build a movie database with wordpress?
- Sub-domain or 2nd, temporary different domain?
- How do i get user data from a custom table in the wordpress database by user ID?
- Converting WordPress into Android or iPhone app
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- Database slowdown after update to 3.4.1
- WooCommerce sku location in DB
- How to insert data into MySQL database from the form created in WordPress site
- Which is best in the following scenario : post_meta vs custom table vs parent/child posts
- Can I have multiple database users within WordPress?
- wp_insert_post bulk import 500 server error
- Modify Database in Multi-Site wp_usermeta table
- $wpdb doesn’t like to store arrays
- Connect to a remote database for wordpress in my own hosting server
- WordPress ‘repairing database’ in a constant error loop?
- What Is the Proper Way to Merge Usermeta Table to a an existing WP Database?
- Importing CSV into database table not working?
- Check if an option exists and get its value in one hit
- Problems with moving my WordPress site to another domain/server
- Is it important to have integers inserted using %d rather than %s?
- Export a custom Mysql database product catalog to WordPress
- Connect to database in the header of my WordPress website
- WordPress url transformation script
- How to display data from db in select list [closed]
- Will adding & modifying default WordPress table index break future WordPress update
- echo site_url() returns a different value than what is in the database siteurl field
- Native timestamp on wp_options option
- SELECT rows between two datetimes when the range is dynamic [closed]
- How to get the full stack trace for WordPress “table doesn’t exist” error in debug.log?
- How to access a table in a wordpress database using REST API?
- How do I create a customised table list of a custom post type (in the admin area)?
- error establishing a database connection 3
- Correct and secure way to access a custom SQL database in a custom PHP template file
- Get original post ID after wp_insert_post
- Missing latest posts and options after DB migration via phpMyAdmin
- Local host to server import problem
- Getting deleted users in database
- Options of accessing wordpress data from mobile app
- Getting data from a table using a query