WordPress is a great CMS but when it comes to debugging and error reporting it becomes pretty annoying. I've been searching a solution for my problem for quiet a while now. Unfortunately without any success or any clues. At some point you just get stuck and start typing a stackexchange question, like I'm doing now...

The problem

I can't upgrade or update from WordPress, however I'm able to upload media. Of course I want to be able to update plugins, themes and upgrade the core from the WordPress admin panel. Said shortly, I want to be able to use the FS_method direct.

The error

In case of a upgrade it returns:

Could not create directory.: wordpress

In case of a update it returns:

An error occurred while updating Example: Could not create directory. example

My setup

My server uses nginx and I tried chmod everything in the WP install to 775 and I also tried 777. Except the 'example/test' directory (755) and the 'example/index.php' file (644). I've a configuration file similar to this paste. I also tried to change the tmp folder to a local directory with perms set to 777.

The test

Since WordPress says that it's not able to create a directory (permission related). I decided to do a simple permission test, using this code, with this is the result. In this test I use is_writable() to check the permissions, the red file names are not writable.

The file with the script (permtest.php) was located at the wp root location aka doc root. I also tried to put the script in a separate directory (example/index.php is the same script) here is the result for that second test.

  • 1
    you are better of not using the direct way, better to have an FTP server if you for some reason can't use wp-cli to do upgrades. (reason is that if wordpress can write then any exploit can write as well, with FTP there is additional layer of protection) – Mark Kaplun Dec 24 '15 at 15:01
  • @MarkKaplun, wp-cli upgrades do work and yes I agree FS method direct might not be the most secure, but it is the fastest especially when you've more then 50 installation to take care of. – Fleuv Dec 24 '15 at 15:20
  • This problem is always related to the php handler: wp-root.org/moving-wordpress/appendix/#php-handlers nginx.com/resources/wiki/start/topics/examples/phpfcgi – user85951 Dec 28 '15 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.