Wordpress - How to prevent plugin, theme installation failures on Wordpress?

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.