3

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.

5 Answers 5

3

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.

6
  • 2
    If you'd like more info on WordPress permissions, go here: codex.wordpress.org/Changing_File_Permissions May 13, 2013 at 17:32
  • 1
    @vlasits , it is not working with 0744, tried 0777, works fine. May 14, 2013 at 10:27
  • @vlasits, and we must change the folder with name plugins, not uploads. And your answer is great! Thanks! May 14, 2013 at 10:31
  • @vlasits, edit your answer, please, edit 744 to 777 and uploads to plugins May 14, 2013 at 12:33
  • @ZiyaddinSadigov It might be ok and/or necessary for you to change to 777 on your local machine, but since it is a bad idea on a public-facing server, I'll leave my answer with the 744 and leave the comments here to point people in a similar situation as you to the solution you found.
    – vlasits
    May 14, 2013 at 14:54
1

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).

2
  • my OS is Linux. Can you explain for Linux? May 13, 2013 at 15:56
  • 1
    Linux is actually easier. I thought you're on Windows. Xampp is basically a set of packages specific to your distro. In fedora/redhat/centos RPM style distros the directory should be owned by user "apache" on debian/ubuntu it is "www-data" A #chown -R apache will do the trick for you. No need to reboot or restart process. However the xampp site says they run the apache as user "nobody". So in your case it is most likely: #chown -R nobody <your web root> May 13, 2013 at 20:02
1

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:

  1. Uninstall wordpress module. Be sure the folder is empty.
  2. Mount the wordpress disk image
  3. cd /volumes/nameOfWordpressModule image
  4. 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!

2
  • Thanks for MacOS version for MacOS users, Ana Gomez! Jan 28, 2014 at 17:29
  • Sorry, this is for Linux: chmod 755 bitnami-wordpress-version-Linux.run after unistalling wordpress. Then double click on the file to open it.
    – Ana Gomez
    Jan 30, 2014 at 21:46
1

navigate to your main project folder and run the following:

chmod -R 0777 wp-content
1

in case of MAC run sudo chmod -R 777 /Applications/XAMPP/htdocs/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.