Skip to content

Instantly share code, notes, and snippets.

@sonnetmia
Created June 20, 2016 14:56
Show Gist options
  • Save sonnetmia/b8a6e3581acc61f0fa5d14e4bfb67420 to your computer and use it in GitHub Desktop.
Save sonnetmia/b8a6e3581acc61f0fa5d14e4bfb67420 to your computer and use it in GitHub Desktop.
Force WordPress update without ftp info in some case.
<?php
/** Sets up 'direct' method for WordPress to FTP, without requiring credentials */
define('FS_METHOD', 'direct');
/** Defines permissions for WordPress to apply to new directories */
define('FS_CHMOD_DIR', ( 0755 & ~ umask() ) );
/** Defines permissions for WordPress to apply to new files */
define('FS_CHMOD_FILE', ( 0664 & ~ umask() ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment