WordPress will only prompt you for your FTP connection information while trying to install plugins or a WordPress update if it cannot write to /wp-content directly. Otherwise, if your web server has write access to the necessary files, it will take care of the updates and installation automatically. This method does not require you to have FTP/SFTP or SSH access, but it does require your to have specific file permissions set up on your webserver.
It will try various methods in order, and fall back on FTP if Direct and SSH methods are unavailable.
https://github.com/WordPress/WordPress/blob/4.2.2/wp-admin/includes/file.php#L912
WordPress will try to write a temporary file to your /wp-content directory. If this succeeds, it compares the ownership of the file with its own uid, and if there is a match it will allow you to use the ‘direct’ method of installing plugins, themes, or updates.
Now, if for some reason you do not want to rely on the automatic check for which filesystem method to use, you can define a constant, 'FS_METHOD' in your wp-config.php file, that is either 'direct', 'ssh', 'ftpext' or 'ftpsockets' and it will use that method. Keep in mind that if you set this to ‘direct’, but your web user (the username under which your web server runs) does not have proper write permissions, you will receive an error.
In summary, if you do not want to (or you cannot) change permissions on wp-content so your web server has write permissions, then add this to your wp-config.php file:
define('FS_METHOD', 'direct');
1. Log in to your WordPress admin dashboard.
2. Go to the “Plugins” menu.
3. To install a new plugin, click “Add New” and search for the plugin you want. Click “Install Now” and activate it.
4. To update a plugin, click on the “Updates” notification or go to the “Updates” page under the “Plugins” menu.
5. Check the box next to the plugin(s) you want to update or select “Update All.”
6. Click the “Update Plugins” button.
7. WordPress will download and install the updates automatically.
8. The updated plugins will be activated.
Remember, most plugins can be installed and updated using this method, but there may be exceptions depending on specific plugins or hosting configurations.
Yes, it is possible to install and update WordPress plugins without providing FTP access by using the built-in WordPress feature called “FTP method fallback.” This method allows you to enter your FTP credentials in the WordPress dashboard to enable plugin installation and updates.
To configure the FTP method fallback, you need to add the following lines to your wp-config.php file, which is located in the root directory of your WordPress installation:
define(‘FS_METHOD’, ‘direct’);
define(‘FS_CHMOD_DIR’, (0705 & ~umask()));
define(‘FS_CHMOD_FILE’, (0604 & ~umask()));
Once you have added these lines, save the wp-config.php file. Now, when you go to install or update a plugin in your WordPress dashboard, you will be prompted to enter your FTP credentials. This information will be used by WordPress to perform the necessary file operations without requiring direct FTP access.
By using the FTP method fallback, you can manage plugins without the need for FTP access. However, please note that this method might not work on all hosting environments. In some cases, you may still need to provide FTP access or use alternative methods provided by your hosting provider.
Yes, it is possible to install/update WordPress plugins without providing FTP access.
WordPress provides a built-in feature called “Automatic Plugin Updates” that allows you to install, update, and delete plugins directly from the WordPress dashboard without requiring FTP credentials.
To enable automatic plugin updates, you can follow these steps:
WordPress will automatically download and install the plugin or update it without requiring FTP access.