Automatic upgrades failing

In trying to use the "Auto Update" option from the update notification screen, I'm getting an ftp error:

Failed to connect to FTP Server 127.0.0.1:21

I am running WP on a Vagrant/VirtualBox.

What are the best steps to take to troubleshoot this problem?

  • Mason

    Hiya,

    Are you also unable to do any of the normal WordPress updates? Normally the behavior would be the same for regular updates as for our products.

    It could be that Apache is not configured to give WordPress the correct permissions to do the updates. If that's the case you can add something like the following to your wp-config file:

    define('FS_METHOD', 'ftpext');
    define('FTP_USER', 'username');
    define('FTP_PASS', 'password');
    define('FTP_HOST', 'ftp.example.org');

    Obviously, you'll need to change the info to match your site and ftp credentials.

    IF that doesn't work, I'm wondering if it has something to do with the port. I've not setup a Virtual Box like that so not sure if that port is open but you could test by seeing if you can login via ftp or not.

    Let us know if the above works. Thanks!

  • Fool

    I already have the ftp host and credentials defined, so that's not it. Digging a bit deeper, one strong possibility is that it's a permissions issue in Vagrant, which I'll need to resolve on this end.

    You're correct that this is not specific to the membership product.

    Bigger question: I have a custom gateway file that I'd like to include in the /gateways directory. I can paste that in after this upgrade, but I'm concerned that any future auto upgrades may overwrite/delete such a file. Is that the case, or will custom files remain intact?

    Thanks for your prompt responses.

  • Mason

    Ok, yeah, I'm not familiar with Vagrant so can't help ya with the permission issues.

    Bigger question: I have a custom gateway file that I'd like to include in the /gateways directory. I can paste that in after this upgrade, but I'm concerned that any future auto upgrades may overwrite/delete such a file. Is that the case, or will custom files remain intact?

    Yes. The way WordPress plugin/theme updates work is to overwrite the entire directory (which is totally a bummer).

    That means for custom gateways you'll want to download the latest version here and add your gateway before uploading via ftp.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.