How to prevent plugin, theme installation failures on WordPress?

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?

Read More

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.

Related posts

Leave a Reply

4 comments

  1. 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.
  2. 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.

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

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