Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am unable to install any theme/plugin to my wordpress 3.0

Downloading install package from http://downloads.wordpress.org/plugin/contact-form-7.2.3.1.zip…    
Unpacking the package…    
Installing the plugin…    
Could not copy file. /public_html/blog/wp-content/plugins/contact-form-7/languages/wpcf7-lt_LT.po    
Plugin install failed.


Downloading install package from http://wordpress.org/extend/themes/download/piano-black.2.2.zip…
Unpacking the package…
Could not create directory. /public_html

Downloading install package from http://downloads.wordpress.org/plugin/contact-form-7.2.3.1.zip…
Unpacking the package…
Could not create directory. /public_html/blog/wp-content/upgrade/contact-form-7.tmp/contact-form-7

I get similar messages everytime. Is there any solution?

Update 12/01/2012: If you're using a latest version of WP (3.1 and above, 3.3.1 as of today), you will not have any problems. These issues have been removed. Enjoy your WP.

share|improve this question

migrated from webapps.stackexchange.com Feb 12 '11 at 15:03

This question came from our site for power users of web applications.

6 Answers 6

up vote 6 down vote accepted

headdesk

Permissions on all WordPress files should be 644. Permissions on all WordPress directories should be 755.

Exceptions:

  • The uploads directory may need to be 775 or 777, depending on your server configuration.
  • wp-config.php should be 600, 640, or 644, whatever is the lowest number that works.

Never, ever, give higher permissions than those. That way lies dragons.

If you're having trouble writing files, then the first thing to do is to install the Core Control plugin and try to figure out what is failing. Specifically, the "Filesystem" module lets you diagnose which mechanism WP_Filesystem is attempting to use. That way, you don't waste time screwing around with the wrong thing: http://wordpress.org/extend/plugins/core-control/

Once you know the mechanism (probably the FTP method or a direct method) then you'll better know how to approach the issue.

  • If it's direct, then you either have a file ownership issue or a permissions issue.
  • If it's FTP, then you may have a loopback connectivity issue, or a file ownership issue.
share|improve this answer
    
That was a great explanation. Thanks a lot –  San Apr 21 '11 at 11:59
    
This didn't help me. I can do some plugins, just not one I created. If I FTP the plugin up and activate it, it works. The Core Control plugin didn't help me understand the problem either. I tried playing with the permissions on the upgrade folder from 755 to 777 to deleting and recreating again and still no good. –  Volomike Mar 12 '12 at 9:47
    
Aha! I found the source of my problem. My plugin's zip folder had a Linux alias in it that I forgot to remove. That's like a shortcut to a folder. The WordPress fopen command in the direct method was failing, and because WordPress was doing @fopen, I could never tell the error. I had to step through wp-admin/includes/class-wp-filesystem-direct.php until I found this fopen, removed the @, reran the test, and found the problem. I removed the alias folder from the zip and it works well now. –  Volomike Mar 12 '12 at 10:09

Check your folder permission. Most likely your folder doesn't have correct permission.

The permission should be set to 777. If you have cPanel on your host, then it would be easy for your to do because the GUI is similar to WIndows.

share|improve this answer
1  
I would relax the permission slowly. 777 should be the last option. Test from lower permissions and see if it works before going all the the way to 777. –  phwd Aug 10 '10 at 11:15
    
Permissions are a very likely culprit. I'd go so far as to contact technical support at your hosting company and ask what permissions should be set on folders/files that the server application needs to modify. –  dgw Aug 10 '10 at 20:33
    
It doesn't work :-( –  San Aug 19 '10 at 9:16

Are you recursively changing the permissions? /public_html/blog/wp-content/plugins/ would need to be 755, 775, or 777 depending on whether you're the same user, same group, or neither, respectively, as the file/folder owner. I agree with phwd that 777 should be a last resort.

share|improve this answer

to my experience, check wp-content.. is there "upgrade" folder? if isn't, you must create it, n set to 777 or if the upgrade folder exists, u must remove it n recreate the new one

share|improve this answer

http://wordpress.org/extend/plugins/ftp-upgrade-fix/installation/

share|improve this answer
    
Wow.. let me try it –  San Apr 21 '11 at 11:59

You can install wordpress plugins without any failure. This is how you do it: install wordpress plugin

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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