Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WordPress : Asking FTP credentials when trying to install a plugin or theme

Tags:

php

wordpress

ftp

I'm getting prompted for FTP credentials (ftp username, ftp password, host address) everytime I'm trying to install a plugin or theme in my WordPress Website.

How can I prevent it?

like image 690
Asheesh Avatar asked May 04 '16 06:05

Asheesh


People also ask

Why is WordPress asking me for FTP?

This usually has to do with modified permissions on Wordpress folders in your hosting plan. This often has to do with Wordpress that can not directly write to the /wp-content directory. You can "force" Wordpress not to try the update via FTP.


1 Answers

Since the files are not getting access you are prompted with FTP credentials.

There are 2 options to follow :

  1. Provide the FTP credentials inside /wp-config.php file :

define( 'FTP_USER', 'username' );
define( 'FTP_PASS', 'password' );
define( 'FTP_HOST', 'ftp.example.com:21' );

  1. By Pass the check as show in the SO post :

Can I install/update WordPress plugins without providing FTP access?

like image 62
Tharif Avatar answered Sep 22 '22 20:09

Tharif