Why trash folder got empty automatically?

Check the value for the constant EMPTY_TRASH_DAYS. With this constant can you control how long is the time to save in trash before delete automatically. Check at first the wp-config.php for this constant, maybe is set in your installation for a small value. The codex write more about the constant and his possibilities. Also it … Read more

wp_delete_post() deletes post instead of moving it to trash

Following the line of code https://core.trac.wordpress.org/browser/tags/4.9/src/wp-includes/post.php#L2467 if ( ! $force_delete && ( ‘post’ === $post->post_type || ‘page’ === $post->post_type ) && ‘trash’ !== get_post_status( $postid ) && EMPTY_TRASH_DAYS ) { return wp_trash_post( $postid ); } the $force_delete just work with ‘post’ and ‘page’, it not work with custom post type

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)