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:
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:
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:
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:
in case of MAC run
sudo chmod -R 777 /Applications/XAMPP/htdocs/