Unable to install new plugins – “An unexpected error occurred”

When I try to search for new plugins, if I include a space in my search term, I get this error:

“An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.”

If I search for a single word without a space, I can find plugins as normal but when I try to install it, I get this error:

“Installation failed: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.”

I have the latest version of WordPress (6.4.3) and I manually upgraded to PHP 8.2, because one of the plugins I was using required 8.1 or higher.

The most recent thing I did in the past 24 hours was delete a plugin that refused to delete from inside the WordPress backend, from my hosting control panel from the wp-content –> plugins folder, and deleted another plugin that I didn’t even know I had (it was in a folder called mu-plugin in my hosting control panel).

I can activate plugins that are already installed but I cannot search for or install new ones.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer