make default upload folder year/month/day wordpress without plugin [duplicate]

Here is a similar question.

The simplest solution that worked for me was use the upload_dir filter. Place the code below in your functions.php file.

function wpcb_upload_dir_filter($uploads){
    $day = date('d');
    $uploads['path'] .= "https://wordpress.stackexchange.com/" . $day;
    $uploads['url']  .= "https://wordpress.stackexchange.com/" . $day;
    return $uploads;
}
add_filter('upload_dir', 'wpcb_upload_dir_filter');

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