How To: Stop WordPress Asking For FTP Info To Upgrade Plugins
Does your WordPress site ask you for FTP login information every time you want to add, delete or upgrade a plugin? This starts off as a minor annoyance, but after time can grow to be one of those things that can drive you crazy or make you wonder why it’s happening when it didn’t happen before, or doesn’t happen on other sites that you have that are on other servers.
I will show you s simple way to fix this annoyance and give you a brief explanation about why this happens. WordPress is picky about file ownerships and who can do what with those files. If your server uses a different username than what wordpress expects for the site it won’t allow it access without you providing those FTP login credentials every time you need to add, delete or upgrade a plugin. If you are on a shared host you will likely never see this happen but if you are on a VPS or Dedicated server it’s quite likely that you will, but don’t worry its a very simple work around to stop this from happening. If you wish to, installing suPHP on your server will also fix this issue or you can read on for the other alternative.
First off, you will need to open up your wp-config.php file (which if you are doing things right will be one directory above your sites root directory) and in this wp-config.php file you just simply have to add your ftp loing information and you will never have to type it in again, so without further ado heres the bit of code you want to add to your wp-config.php file.
//*added ftp login credentials to avoid the annoying prompt asking for login info every time I wanted to upgrade a plugin*
define('FTP_HOST', 'ftp.yoursite.com');
define('FTP_USER', 'Your_FTP_Username');
define('FTP_PASS', 'Your_FTP_password');
//*If you can use a SSL connection set this to true*
define('FTP_SSL', true);
That’s it, set these options, save the file and you are all set.
-
Rick
-
Jesse
-
Greg
-
Jesse
-
esabeth