Few days before we migrated our site to new server, everything gone well and site started working on new server. Nothing seems wrong, but when we try to install/remove plugin from our WordPress plugins dashboard it ask for FTP Credentials. Yeah, WordPress was asking for FTP credentials before removing and installing some from the server. It was a completely new situation for us, we don’t know how to tackle with this.
This is the error message:
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
We searched for the solution and we find a really easy method to solve this problem and also find the root cause of this situation. And now we thought that why we not share with our users.
To solve this problem just go to your server panel and open up the file manager. Now, open up the your web directory and find there wp-config.php.
Edit the wp-config.php
file and add following line of code in it and save it.
define('FS_METHOD','direct');
That’s it you have solved your problem.
Now, the question is why this happens? it is because of directory permissions for the user. You can also solve this problem by just simply change the permissions for the user. This can be done directly from the server panel or if you are on Ubuntu you can also change it from Terminal. Change the permissions of the following directory for the user to…
chmod 777 /public_html/www/YourSite/wp-content/plugins/
You can also face this error in other scenario but the method to solve this solution is same as mentioned above.
Leave a Reply