1
votes

enter image description here

After installing WordPress version 4.7.5 . I am unable to add any new plugin or theme.

I am getting this error on plugin addition section in WordPress admin:

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

How to fixed this issue, please guide me step by step?

Thank you!

2
Are you using localhost right? - Purvik Dhorajiya
I doing in real server but I not have coding because I click automatic install in website back-end. Now I can't add new plugin or theme. - Goong
@Goong Did you check my code, by any chance? - Purvik Dhorajiya
@purvik7373 No change. How to can fix any way? - Goong

2 Answers

1
votes

Try

define('WP_HTTP_BLOCK_EXTERNAL', true);

Add above line in your wp-config.php.

-1
votes

I had the same issue when adding new theme(but not on adding plugin). In my case, this was happening because default http request timeout(5 seconds) was too short to load the theme contents. Solution was quite simple, I just needed to increase it. Here’s the link for detail. Please like the post if this solves your problem. Good Luck!