Допустим мы имеем блог http://example.org/ и надо обновлять переодически его плагины и сам движок WordPress.
Беда в том, что поддерживается по дефолту только FTP, а у меня его нет, из возможных вариантов есть только SSH, его и будем внедрять!
Настройка
Отредактируем наш конфиг «wp-config.php»:
/*
FS_METHOD forces the filesystem method. It should only be "direct", "ssh", "ftpext", or "ftpsockets".
Generally, You should only change this if you are experiencing update problems, If you change it, and
it doesnt help change it back/remove it, Under most circumstances, setting it to 'ftpsockets' will
work if the automatically chosen method does not.
See: http://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants
*/
define('FS_METHOD', 'direct');
define('FTP_BASE', $project_root);
define('FTP_CONTENT_DIR', $project_root . '/wp-content/');
define('FTP_PLUGIN_DIR ', $project_root . '/wp-content/plugins/');
define('FTP_PUBKEY', '/home/example_user/.ssh/id_rsa.pub');
define('FTP_PRIKEY', '/home/example_user/.ssh/id_rsa');
define('FTP_USER', 'example_user');
// define('FTP_PASS', 'password');
define('FTP_HOST', '127.0.0.1:22');





