Hi there
,
I wanted to share something I’ve run into on at least 3 different WordPress sites running Tainacan on Linux virtual servers.
The issue: The CSV importer and exporter in Tainacan would fail with timeout errors like:
-
“cURL error 28: Connection timed out”
-
“REST API errors”
-
Import/export processes just hanging indefinitely
Root cause: Turns out that when you set up WordPress with a domain and don’t update the /etc/hosts file, the server can’t make loopback requests to itself. WordPress (and Tainacan) needs to call its own REST API, but without the proper localhost entry, it tries to connect through the external network instead of locally, which causes timeouts.
The fix: Replace the standard localhost entry in /etc/hosts with your actual domain:
Instead of just:
127.0.0.1 localhost
Add or replace with:
127.0.0.1 your-domain.com
Additional steps that helped: After fixing the loopback issue, it’s also worth clearing out old transients and manually running the background tasks depending on what you’re doing:
-
For imports:
tnc-bg_import_cron_check -
For exports:
tnc-bg_exporter_cron_check
More details about this are mentioned here: Importer error - #2 de mateus.m.luna
I know this might seem obvious to some, but I think it’s worth sharing somewhere. It’s an easy step to miss when associating a new domain to a WordPress install with Tainacan, and it cost me hours of troubleshooting across multiple sites.
Hope this helps someone else out there ![]()