Cannot add new plugin to my WordPress site

Hello! I’m having a problem to add a new plugin to my site. Why do I keep getting an error: An unexpected error occurred. Something may be wrong with or this server’s configuration. If you continue to have problems, please try the support forums. How can I fix this?

Hey there!
Hope the solution in this link helps


define('WP_HTTP_BLOCK_EXTERNAL', true);

Add above line in your wp-config.php .