Adding A New Widget to WordPress Disables the Existing Widgets

You missed a lot of things . You have to add add action hook in your code. In below I give you an ideal widget code. Now try this.Replace your code with mine. Hope it will work. Thanks

    function test_widgets_init() {
    register_sidebar( array(
        'name'          => esc_html__( 'Sidebar', 'test' ),
        'id'            => 'sidebar-1',
        'description'   => esc_html__( 'Add widgets here.', 'test' ),
        'before_widget' => '<section id="%1$s" class="widget %2$s">',
        'after_widget'  => '</section>',
        'before_title'  => '<h2 class="widget-title">',
        'after_title'   => '</h2>',
    ) );
}
add_action( 'widgets_init', 'test_widgets_init' );

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