Check that /restore/www/wp-config.php exists instead of only directory existence checking.