how to enable one-click install on locally hosted multisite?

Hi - I read Harely Alexander's excellent WPMU article on how to install a local development area using multisite on a MAC. Everything is working as it should except for one important thing: one-click install of themes or plugins does not work. This includes everything from the WPMU Dev Dashboard. WP says "failed to connect to ftp server..." Since my install is local, ftp should have nothing to do with it. Does anyone know how to work around this or how to tell WP multisite not to bother with FTP and just install the files where they reside locally? Thanks in advance for your feedback...

  • Vaughan
    • Support/SLS MockingJay

    hi @Ted

    thanks for posting.

    at the top of your wp-config.php file, you should see some defines for FTP, just comment them out with // and hopefully that should do the trick.

    hope this helps. if you require any further assistance, please let us know. thanks.

    define('FTP_BASE', '/path/to/wordpress/');
    define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/');
    define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');
    define('FTP_PUBKEY', '/home/username/.ssh/id_rsa.pub');
    define('FTP_PRIKEY', '/home/username/.ssh/id_rsa');
    define('FTP_USER', 'username');
    define('FTP_PASS', 'password');
    define('FTP_HOST', 'ftp.example.org');
    define('FTP_SSL', false);

    thanks.

  • Ted
    • WPMU DEV Initiate

    Hi Vaughan - Thanks for the feedback. I actually don't have any ftp settings in my config.php file. I'm using the same config.php file I downloaded from WP a couple of days ago (attached). The only adjustments I've made to it were to include some defines for multisite and I added the ftp defines you posted but just commented them out. I'm flummoxed. Is there anything else you can think of that would solve this? Thanks again. -Ted

    These are lines 17-27 from my wp-config.php[

    // ** FTP setting commented out per WPMU feedback
    //
    // define('FTP_BASE', '/path/to/wordpress/');
    // define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/');
    // define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');
    // define('FTP_PUBKEY', '/home/username/.ssh/id_rsa.pub');
    // define('FTP_PRIKEY', '/home/username/.ssh/id_rsa');
    // define('FTP_USER', 'username');
    // define('FTP_PASS', 'password');
    // define('FTP_HOST', 'ftp.example.org');
    // define('FTP_SSL', false);

    and here are lines 98-115...

    /* Multisite */
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'wordpress.ms');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    
    /* That's all, stop editing! Happy blogging. */
    
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
  • andr__s_cajiao
    • Flash Drive

    Hey,

    Appart from suggestions here, I would do the simple trick: Just install an FTP server!
    Maybe you could use XAMPP

    it includes an FTP server and if you are trying to go live this it's going to be a must for your website, specially if you are going to have more administrators outside of your box.

    Anyways, let me know if you want more help with that.

  • Ted
    • WPMU DEV Initiate

    Hello - I am wondering if anyone else has feedback or has experienced this problem? I closely followed the guide put out by @harleyalexander but have since spent far too much time working out problems that should have been predictable, imo.

    Here's a link the article: https://premium.wpmudev.org/blog/local-wordpress-test-environment-mamp-osx/

    Wordpress ms still keeps searching for ftp when i try to add plugins or themes, but the install is local. Creating a local install for development using MAMP and Wordpress MS was the whole point of the tutorial.

    @Vaughan offered what seemed like would do the trick, but when I looked at my wp-config.php file, there was nothing there related to FTP settings.

    I'm confused as to why this won't work If I can't get this to work shortly, I will just delete Mamp and start over again with a bitnami install and see how that goes.

  • Alexander
    • DEV MAN’s Mascot

    Hi @Ted,

    I'm so sorry we didn't get back to you on this. This is a permissions issue that usually indicates the folder isn't writable by the web server process. If you're still having issues here, let me know and I'd be happy to advise a few things we could try. I've reactivated your account as well so you could respond here. I hope that in the meantime you've had a solution worked out, perhaps with bitnami

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.