Why Cant I Install Plugin in WordPress
One of the most common questions asked by WordPress Users is “ Why Can’t I Install Plugins in WordPress”. If you are finding this issue, then you are in right place. In this article, we will explain why you cannot add or install a plugin in WordPress.
For resolving this issue of WordPress plugin installation we are using Apache web server.
1. Login to WordPress Account:-
First of all, login to WordPress account after that click on WordPress Dashboard then go to Plugins and click on ‘Add new’ button which is on top of the menubar and installs plugins.
2. Facing problem regarding Directory:-
When we installing plugins in WordPress sometimes we get an error while installing plugins such as
Installation failed: Could not create a directory.
If you have this problem while installing WordPress plugins then follow the given steps.
3. Change the permission of directory:-
The suggested permission for all directories in WordPress should be 755. This means this command provides read, write and execute permission for groups and others.
chmod 755 $(find wordpress -type d)
4.Change the permission of files:-
The suggested permission for all files in WordPress should be 644. This means that the user has read and write permission and groups and others can only read files. Probabaly this ensures that no one can change the file except the owner.
chmod 644 $(find wordpress -type f)
5. Change owner permissions:-
This command chown is used to change the owner. Due to this command we can change the owner of file systems and directories. Unprivileged users who wish to change the group membership of file that they can also use chgrp.
sudo chown -R www-data wordpress/
sudo chgrp -R www-data wordpress/
If someone uses NGINX as web server then for changing owners permission, there are different command for changing owner permission in NGINX. You need to change just one thing into above all permission replace to www-data with nginx.
6. Go to wordpress after that check for plugin installation:-
Almost, we have done all changes in file permission after that login to WordPress and go to the plugin section and click on the install button.
Finally, we successfully installed this plugin in WordPress by changing file permissions.