Doing an automatic upgrade of WordPress or any of your installed WordPress plugins is rather quick and painless though it could be much quicker if you didn’t have to fill in the FTP login details to your site each time.

When you attempt to automatically upgrade WordPress or upgrade a WordPress plugin for the first time you will be asked to fill in FTP login details in order for the WordPress framework to download the remote package(s) to your server, perform some actions and extract the package(s) on your server itself.

Depending on the permissions set to your “wp-config.php” file in the root directory of your WordPress installation, the initial FTP login details filled in will be saved automatically and used again in the future. Your “wp-config.php” file needs to be writable by your server in order for these FTP login details to be saved by WordPress. If your WordPress configuration file is not writable, your FTP details will not be saved and you will need to fill them in each time you need to automatically upgrade WordPress or a WordPress plugin.

Either way, you can define these FTP login values in your “wp-config.php” file from the start to save yourself some time and effort. Open up your “wp-config.php” file in a text editor and put the following code into it. Remember to change the second parameter of each of the DEFINE statements/functions in the code shown below.

<?php

define("FTP_HOST", "domain.com");
define("FTP_USER", "ftpusername");
define("FTP_PASS", "ftppassword");

?>

Each of the three FTP values being defined are explained below.

FTP Host (FTP_HOST)

The hostname or IP address of your website. This is usually the domain name or it could be the IP address of the server where the domain name is pointing to (hosted on).

FTP Username (FTP_USER)

The FTP username for the account of the site. It works in conjunction with the FTP password below. This value is created when the domain is initially setup and can be changed in your hosting control panel.

FTP Password (FTP_PASS)

The FTP password for the account of the site. It works in conjunction with the FTP username described above. This value is created when the domain is intially setup and can be changed in your hosting control panel.