How to Solve WordPress Could Not Create Directory

Standard

WordPress is an interesting platform to build your website but when you get this kind of errors, you feel like plucking your hair off your head because nothing is happening. I have tried like 10 solutions but never got it right until now.

Am sure you have gotten something like this when trying to update your plugin or upgrading WordPress.

This is the error for the Upgrading of WordPress

Downloading update from http://wordpress.org/wordpress-4.4.zip…

Unpacking the update…

Could not create directory.

Installation Failed

This is the error for the plugin update

  Downloading update from http://downloads.wordpress.org/plugin/your-plugin.0.9.3.1.zip…

  Unpacking the update…

  Could not create directory. /wp-content/upgrade/yourplugin.tmp
 
  Return to Plugins page

SOLUTION:
Step 1:

Plugin: Just change the permission of /public_html/wp-content and /public_html/wp-content/plugins to 775. If the update succeed just revert it back to its default permission.

Upgrading: Just change the permission of /public_html/wp-content and /public_html/wp-content/upgrade to 775. If the upgrade succeed just revert it back to its default permission.


chmod 775 /var/www/html/wordpress/wp-content/

chmod 775 /var/www/html/wordpress/wp-content/plugins

chmod 775 /var/www/html/wordpress/wp-content/upgrade

Step 2:

Add the proper group permissions most likely to the same that Apache is running under.

ps aux | grep apache 

You will see the Apache user group on the left.

See my example of how I did it:

Screen Shot 2015-12-15 at 11.37.13 AM

Step 3:

Now change your WordPress folder to the same user group, you can do this in a parent folder or sub folder but for sanity it usually best for parent folder, use -R to recursively do it.

chown -R apache:apache /path/to/wp-root-folder
  • To login on windows use Putty
  • Enter your hostname and port
  • Choose connection type depending on server settings
  • Click open

If you try to chown and get denied you will need root privileges , type sudo su and your password.

Now try updating the plugin or Upgrading WordPress.

Awesome!!! Now we have solved that issue.

Solution by Wyck

 

If it helped you out, please don’t forget to like and share 🙂

Advertisements

No module named SimpleHTTPServer [Error]

Standard

I wanted to set up Python SimpleHTTPServer on my Windows 8 and I had Python installed on my computer. I was executing the following command

python -m SimpleHTTPServer 

Or(if you want to specify which port to open the application from)

python -m SimpleHTTPServer [<portNo>]

But I got the error:

C:\Python34\python.exe: No module named SimpleHTTPServer

error

Because I am using Python 3 the module SimpleHTTPServer has been replaced by http.server at least in Windows. So the following worked for me

python -m http.server [<portNo>]

soln

You will see the below screen. To test if it is working, go to http://localhost:8000/ and you should see a web page opening up.

final working

Hope that helped. Thanks!

Lima Kilo