wp_trash_post() duplicates post to trash

As the function name suggests, wp_trash_post() only trashes a post. If you want to have a post completely deleted then you can use wp_delete_post( int $postid, bool $force_delete = false ) instead. https://developer.wordpress.org/reference/functions/wp_delete_post/ When the post and page is permanently deleted, everything that is tied to it is deleted also. This includes comments, post meta … Read more

Is it possible to “Update” pages via SQL?

wp_update_post() is a PHP function, and you can’t trigger a page update with MySQL. You need to at least use PHP, but it’s possible that some plugins actually require manually pressing update. For WordPress and WooCommerce content your best bet would be to use the REST API or WP CLI from the command line.

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