wp_insert_post slow with specific post_type
-
On my website i’ve built a plugin.
When the database grows everything keeps up to speed, except for 1 wp_insert_post() rule. It takes over 6 seconds to insert that post.When i change the post_type from ‘message’ to ‘messages’ it works again within a second. So i think it has to do with the database.
Any ideas on how to fix this?
This is the code:
$id = wp_insert_post(array( 'post_type' => 'message', 'post_status' => 'private', 'post_title' => 'message', 'post_parent' => $elementid, 'post_content' => addslashes(htmlentities($value)), 'post_author' => $senderid ));
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_insert_post slow with specific post_type’ is closed to new replies.