How to fix: WordPress updates and plugin installs require FTP login but shouldn’t.

WordPress is generally very good about working under any server situation you put it in. It even has fall back code if the preferred server settings are not available.

The plugin and update installation code is one example of this. If WordPress doesn’t have the rights to directly update files, it will ask you for FTP login information.

However, there are times when you KNOW the permissions are correct to allow Apache to update files and WordPress doesn’t detect it and insists on FTP. This should be extremely rare. However if you ever do come across this circumstance you can force WordPress to override this behavior and use direct updates.

Just add these lines to wp-config.php:

define( ‘FS_METHOD’, ‘direct’ );
define( ‘FS_CHMOD_DIR’, 0777 );
define( ‘FS_CHMOD_FILE’, 0777 );

You can read more about these constants on the WordPress Codex.

3 Comments

Add a Comment

Your email address will not be published. Required fields are marked *