# API01002: Connection Refused

## What This Means[​](#what-this-means "Direct link to What This Means")

The server actively refused the connection attempt. This is different from a timeout — the server responded, but said "no."

## Common Causes[​](#common-causes "Direct link to Common Causes")

* **Server is down** — The web server (Apache/Nginx) may not be running
* **Wrong port** — Attempting to connect on the wrong port
* **Firewall blocking** — A firewall is blocking the connection
* **IP restrictions** — Your IP address may be blocked

## How to Fix[​](#how-to-fix "Direct link to How to Fix")

### 1. Verify the Server is Running[​](#1-verify-the-server-is-running "Direct link to 1. Verify the Server is Running")

Try accessing your WordPress site directly in a browser. If it's not loading, contact your hosting provider.

### 2. Check the URL Configuration[​](#2-check-the-url-configuration "Direct link to 2. Check the URL Configuration")

Ensure you're using the correct URL:

* Verify `http://` vs `https://`
* Check for typos in the domain name
* Confirm the correct port if using a non-standard one

### 3. Check Firewall Settings[​](#3-check-firewall-settings "Direct link to 3. Check Firewall Settings")

If you have access to your server:

* Verify that port 80 (HTTP) or 443 (HTTPS) is open
* Check if your IP is whitelisted
* Review any security plugins that may block API access

### 4. Contact Your Hosting Provider[​](#4-contact-your-hosting-provider "Direct link to 4. Contact Your Hosting Provider")

They can check:

* Server status and logs
* Firewall configurations
* Whether your IP has been blocked

## Related Errors[​](#related-errors "Direct link to Related Errors")

* [API01001](/error-codes/API01001.md) — Connection Timeout
* [API01006](/error-codes/API01006.md) — Network Unreachable
