Setup a Linux Server

Setup a Linux Server

How To Fix WordPress Asking For FTP Credentials

If you find that WordPress is continually asking for your FTP credentials when you’re trying to install an update, you’re not alone.

The error usually looks something like this:

Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

This problem may appear when you initiate an update or try to install a new theme or plugin. It results from WordPress having insufficient permissions to modify files on your server.

2 Solutions To WordPress Asking For FTP Credentials

Method 1: Force Direct Filesystem Method

This solution is quite simple and may solve your problem in a matter of seconds.

Simply add the following code to your wp-config.php file:

define('FS_METHOD','direct');

This forces WordPress to use the “direct” PHP method for automatic updates, rather than utilizing FTP.

Once you’ve added this code, save the file and reattempt the update/installation that originally caused the error. If it installs normally, you’re good to go!

However, if you continue to have problems, remove the code you just added and proceed to Method 2.

Method 2: Add FTP Credentials To wp-config.php

If the first method didn’t work for you, you can also add your FTP information directly to your wp-config.php file. This will allow WordPress to install updates via FTP without continuing to prompt you for your credentials.

To do so, add the following code to your wp-config.php file:

define('FTP_USER', 'USERNAME');
define('FTP_PASS', 'PASSWORD');
define('FTP_HOST', 'FTP.EXAMPLE.COM');

Be sure to replace the username, password, and host with your own details. Check with your web host if you’re unsure about any of this information.

Once you’ve added the code above, save the file and reattempt the update in WordPress. It should work now!

How To Fix WordPress Asking For FTP Credentials

Leave a Reply

Scroll to top