How to delete all posts, categories and tags from WordPress database

Use WP-CLI to remove all tables from the database in MySQL.

Runs DROP_DATABASE and CREATE_DATABASE MySQL statements using DB_HOST, DB_NAME, DB_USER and DB_PASSWORD database credentials specified in wp-config.php.

wp db reset --yes

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