Today I was just performing update to my WordPress website that I normally do one to two times a Month. I checked for all the outdated plugins and WordPress core install after login to WordPress admin dashboard. First I decide to perform WordPress core update and after that the outdated Plugins.
When i started the process to upgrade the WordPress core files and then but suddenly WordPress Asking For FTP Credentials and i got a message.
To Perform the requested action, WordPress needs to access your web server. Please enter your FTP Credentials to proceed.
I was wondered what is the issue. In last years I have performed hundred of update before but never face this type of issue. I started to figure out the solution. After some research i found the solution for this issue. I got that there are two basic solutions to fix the problem.
Solution 1: Direct File System
This solution is very simple and start work in seconds. You just need to open wp-config.php file in a editor and just add the code.
define('FS_METHOD','direct');
After adding the above code into wp-config.php file you just need to save it. Reload the WordPress admin page and try to perform update again. If everything go well then you are the winner.
But if the problems continue then you can try the second solution.
Solution 2: Add Your FTP Credential To Wp-config.php
After you tried the first solution to fix the problem but that did not work then here is the second solution to fix the issue.
You have to add the FTP credential wp-config.php file. It will allow WordPress to install updates through FTP.
Here is the code that need to add your wp-config.php file.
define('FTP_USER', 'YOUR FTP USERNAME');
define('FTP_PASS', 'YOUR FTP PASSWORD');
define('FTP_HOST', 'FTP.WEBSITE.COM');
Use your FTP username, FTP password and your website FTP host address and save the file. Reload WordPress dashboard and then try to perform the updates.