How to Add or Change FTP Details for Easy WordPress Upgrades

If your WordPress site has recently been moved or if you have changed your FTP password, you may be continually prompted for your details within the dashboard. This can be quite annoying if you’re upgrading or installing new plugins and themes. Did you know that there’s a way to set these FTP details so that WordPress will never ask you again? It’s very easy and should save you a lot of time if you are struggling with with those auto-prompts.

How to Set Your WordPress FTP Details in wp-config.php

Step 1: Check Your FTP Username / Password.

You’ll want to make sure you’ve got the correct information before inputting it into wp-config.php. Visit your hosting control panel to verify your FTP hostname, username and password.

Step 2: Add the FTP Details to wp-config.php

You’ll want to specify the details for your connection and then add them in the wp-config.php file:

define('FTP_USER', 'username');
define('FTP_PASS', 'password');
define('FTP_HOST', '');

This should correct and update your FTP details with WordPress so that you can be on your merry way with upgrades and new plugin and theme installs. If you want to use a secure connection, you can add this:

define('FTP_SSL', true);

Sometimes you may experience issues because your WordPress installation is not in the root directory of the FTP server. In that case you’ll want to define the path to the base directory, content directory and the plugin directory:

define('FTP_BASE', '/path/to/wordpress/');
define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/');
define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');

More than likely you won’t need to do all of the above. There are a number of WordPress Upgrade Constants listed in the codex, but you should only define as many of them as are necessary. There’s no need to go wild and put in all of them. Just the basic FTP details should be good enough to make your upgrades quick and easy.