Failed to connect to PC:21 – WordPress & XAMPP

Generally speaking, on a local development environment I wouldn’t rely on FTP as an update solution. Fortunately your issue isn’t specific to XAMPP or Apache, but rather a question of server permissions in general.

This is good news because it means the following WordPress documentation for Automatic Updates may contain some useful information for you.

I don’t like to run an FTP Server from my local machine for reasons of security and resource allocation. That means I usually end up downloading WP, theme and plugin updates manually. This process works well for me since my code is typically under version control.

The other condition the docs mention is that if you set your file permissions correctly so that the working folder is OWNED and WRITABLE by the apache user the update may be successful without FTP access.

Hope this helps.