here i will show how Installing wordpress plugins on localhost, you could go to the plugin repository and download the plugin yourself before copying it to your plugin directory, but that’s not very neat and doesn’t solve the same issue for WordPress Core/Plugin updates which also require this connection information.

Fortunately, you don’t need to provide a convoluted FTP route for WordPress to be able to update or install files – it can do so directly by changing a single setting within the wp-config.php file.

define('FS_METHOD', 'direct');

Once set in your config file, WordPress will now write directly to your directory.

You will of course need to set the directory permissions to allow your WordPress installation permission to alter the file structure – but you shouldn’t need to worry too much if you’re installing in a standard file path and your web server has the correct permissions for your webroot.



%d bloggers like this: