(Using shared hosting for Wordpress in Hostgator) Installation failed: Could not create directory - wordpress

Can somebody help me, how should i create a a directory for plugins, there's already a folder created in Hostgator's Cpanel "Public_html>Wp_content>plugins".
But still if i install any plugin, this error pop ups "Installation failed: Could not create directory." please help, Thank You in advance

You just need to give the permission to the folder.
When you installing any plugin it will uploaded to /wp-content/plugins directory.
Now there is three option to achieve this.
1) connect ssh and go to desire path and run chmod command
Chmod 777 -Rf /var/www/html/wp-content/plugins
2) Open file manager from cpanel and go desire path and select folder and give the permission
3) creat a script which give me the folder permission. You can get that script on google
Here is one of the link :
https://gist.github.com/jasperf/5755794

Related

Wordpress Plugins Couldn't Update: Could not create directory

Good day! Why is it that I am not able to update my plugins in my Wordpress Website.
In my FTP File I have already set my plugins folder to 755 then configured my wp-contents to 755. In my wordpress Site Health, this is what is written in File Permission
The main WordPress directory Writable
The wp-content directory Writable
The uploads directory Writable
The plugins directory Writable
The themes directory Writable
I have done everything written in this site and still I can't update any of my plugins. I don't know what is wrong anymore or what should I do.
I am using CWP, with WordPress 5.5.1 and PHP version 7.4.10
One way to solve this problem, trying to change the FTP permissions by the “wp-config.php” file.
There're some steps to fix “Installation failed, could not create directory.” From your web hosting account, open the “File Manager”. Within the root folder, locate the “wp-config.php” file.
In your “wp-config.php” file, enter the following passage of code.
NOTE: Replace the information in brackets with your information.
define(‘FS_METHOD’, ‘ftpext’);
define(‘FTP_BASE’, ‘/pathtorootofyourblog/’);
define(‘FTP_USER’, ‘ftpusername’);
define(‘FTP_PASS’, ‘ftppassword’);
define(‘FTP_HOST’, ‘yoursite.com’);
define(‘FTP_SSL’, false);
Save the “wp-config.php” file.
Return to your dashboard and try to install the plugin or upgrade once again. This time, it should be done without any problems.

permissions for enabling FTP upload and automatic plugin install in Wordpress

I have a wordpress install and I want to be able to do the following two things:
automatically install plugins via the backend without providing an FTP/SSH user
upload files via FTP
To achieve point 1. I have read that I have to execute the following command: chown -R www-data:www-data /var/www. That means that the user/group www-data becomes owner of all files and folders in /var/www. After executing this command, the automatic installation of plugins works like a charm.
However, I now am not able to edit/upload files via FTP anymore. For FTP I use a different user named ftpuser. The following error is shown in my FTP client when I try to upload a new file: [Filename] open for write: permission denied
I put the ftpuser in the group www-data, hence I think that ftpuser should be able to write:
root#xyz:~# grep 'www-data' /etc/group
www-data:x:33:ftpuser
The file permissions on the folder /var/www are 755.
What is my issue here?
Can you please try by using the below code in wp-config.php :
define('FS_METHOD', 'direct');
Hope that will work.

'Installation failed: Could not create directory.' I get this error everytime i try to download plugin in wp 4.8

I am getting error accessing my admin panel. The error is due to plugin. I fixed the issue by renaming the plugin folder from cpanel and changed it back. Since then,i couldn't download any plugins and get the error
Installation failed: Could not create directory.
You need to set permission on plugin folder/directory, now the user does not have permission to create folder/directory in plugin folder/directory.
You need to set permission on wp-content and all inside folder/directory to 755.
You can set permission via terminal
sudo chmod -R 755 wp-content
wp-content should me you folder path for Linux server path should be /var/www/html/project_folder/wp-content
OR
you can set permission via FTP. Right click on wp-content folder click on permission menu and set 755 permission to the folder.
The permissions or ownership on wp-content/plugins is incorrect. That directory should have a 775 permission set.
If its already that then reapply 755 and checked “apply recursively to all directories and files.
If you use a docker container or docker-compose, you also need to give permission to the database volume.

Redmine plugins folder location

Soo my problem is that my brand new redmine install (2.4) has a plugins folder path like this:
/usr/share/redmine/lib/plugins
I would expect the plugins folder to be under "something"/redmine/plugins
Also, it's not empty which seems kinda weird for a clean fresh install.
I'm thinking that this directory is not the directory for the plugins install.
Anybody could give me a heads up whether I'm in at the right place or need to create the directory myself or what. :)
Thanks in advance!
I confirm you should create a new "plugins" directory in the redmine folder.
Then you just have to copy your plugins into this directory.
More help here: http://www.redmine.org/projects/redmine/wiki/Plugins
locate redmine or find / -type d -name redmine first find where redmine folder is then create a folder called plugin and download the zip file or git clone.
restart the server sudo service nginx restart or touch /srv/redmine/tmp/restart.txt

Unable to create directory wp-content/uploads in Wordpress

I created php files for my plugin and added them to myplugin folder. Then I zipped myplugin folder as myplugin.zip. In Admin Panel of Wordpress I wanted to install my plugin to wordpress. I choosed this zip file and clicked to Install "Now button". Then Wordpress gave an error:
Unable to create directory wp-content/uploads/2013/05. Is its parent directory writable by the server?
What is the problem and how can I solve it? My OS is Linux and I use XAMPP server in my machine.
In your terminal, navigate to the wp-content folder and then run:
chmod -R 0744 plugins
That will set the folder and its subfolders to read/write/execute for you and read for everyone else.
Edit As suggested in the comments, check this out: codex.wordpress.org/Changing_File_Permissions
Alternatively you can just unzip them yourself and save them into this folder:
/wp-content/plugins/name-of-theplugin
Then you can just activate the plugin from the admin page.
I am not entirely familiar with XAMPP but it should be run as a user. Most likely your own windows account. You may try this:
Select the folder wp-content and right click -> properties. then go to Security Tab. There check to see if the User (i.e. you) has write+ modify permission.
Check what is XAMPP server running as, the folder above must have the permissions for the same user.
Double check the "general" tab on the wp-content folder and check the "Attributes" section. Make sure "Read Only is unchecked. If you are changing it, windows will prompt for whether to apply to subfolder. Say "yes".
. Or run XAMPP at Administrator and skip the above step .(assuming it is not production / public internet facing server).
I had this problem yesterday, I solved it by uninstalling the Wordpress module and installing it again as root from the terminal.
I thought if I run the installation wizard as I was logged as root was enough, but it wasn't.
These are the steps for MacOS:
Uninstall wordpress module. Be sure the folder is empty.
Mount the wordpress disk image
cd /volumes/nameOfWordpressModule image
sudo bitnami wordpress module.app/Contents/MacOS/installerbuilder.sh
I recommend you to list the items so you can write exactly the name of the image and app.
Hope it helps!
navigate to your main project folder and run the following:
chmod -R 0777 wp-content
in case of MAC run
sudo chmod -R 777 /Applications/XAMPP/htdocs/

Resources