Search code examples
wordpresswoocommerceftpconnectioncredentials

WordPress FTP connection setting for localhost to upload and install WooCommerce


I can't upload a WooCommerce .zip file and install the plugin on the local host. Every time I click install button, WordPress is asking for connection information for the FTP credentials like this picture:

Enter image description here

Even though I entered localhost for the hostname and admin as username, it doesn't work!


Solution

  • Try:

    chmod 777 /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/plugins/
    chmod 777 /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/themes/
    

    Then add these to wp-config.php:

    /** Add here*/
    define('FS_METHOD','direct');
    define("FTP_HOST", "localhost");
    define("FTP_USER", “my_wordpress_user”);
    define("FTP_PASS", “password”);
    /** To here*/
    

    In the line above, my_wordpress_user and password are the ones used in wordpress.