One of the most common questions we are asked by WordPress beginners is: “Why can’t I add plugins in WordPress?”. It usually follows up with how the user is seeing an upgrade message or that their admin area doesn’t have the plugins menu.
You are Facing Memory Limit Issue
The failure notice is usually caused by the PHP memory limit. There are settings in your WordPress hosting and inside your WordPress core that define the amount of memory a PHP script can use. When a process reaches this limit, it either gets terminated or it gives an error like this:
Fatal error: Allowed memory size of 67108864 bytes exhausted
The quick fix to this problem is increasing your PHP memory limit. You can do that by adding this line to your wp-config.php file:
Check your wp-config file
When the following is added to the wpconfig.php file, it disables file editing and uploading.
If found, simply change the values from true to false or even better delete those lines.