How can I stop WordPress from prompting me to enter FTP information when doing updates?
If you edit your wp-config.php file you can preload these FTP settings as constants read by WordPress. Keep in mind, on a shared host, you should be mindful of possible security implications. See Editing wp-config.php for more information.
Your settings will vary, but these work for me and my hosting setup. I’ve included some of the unused constants, prefixed:
1 2 3 4 5 6 7 8 9 10 | define('FS_METHOD', 'direct'); define('FTP_BASE', '/usr/home/username/public_html/my-site.example.com/wordpress/'); define('FTP_CONTENT_DIR', '/usr/home/username/public_html/my-site.example.com/wordpress/wp-content/'); define('FTP_PLUGIN_DIR ', '/usr/home/username/public_html/my-site.example.com/wordpress/wp-content/plugins/'); // define('FTP_PUBKEY', '/home/username/.ssh/id_rsa.pub'); // define('FTP_PRIKEY', '/home/username/.ssh/id_rsa'); define('FTP_USER', 'my-ftp-username'); define('FTP_PASS', 'my-ftp-password'); define('FTP_HOST', 'ftp.my-site.example.com'); // define('FTP_SSL', false); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.