How to fix a “Connection refused” error on WordPress hosting?
If you’re managing a WordPress website and suddenly face a “Connection refused” error, it can be both frustrating and alarming. This error typically means that the server is actively rejecting the connection request from your browser or application. Unlike a timeout or 404 error, “connection refused” often indicates a more immediate and technical server-side problem. Luckily, with a methodical approach, the issue can often be resolved without needing deep programming knowledge.
What Does “Connection Refused” Mean?
A “connection refused” error occurs when your computer tries to establish a connection with your WordPress hosting server, but the server rejects the attempt. Common causes include misconfigured server ports, a stopped web service, firewall restrictions, or even corruption in the WordPress core files or plugins.

Common Causes of the Error
You can trace the issue back to one of several usual suspects:
- Web server (Apache/Nginx) is not running
- Incorrect DNS or IP address misconfiguration
- Port 80 or 443 is blocked
- Firewall or security software blocking traffic
- Corrupt WordPress core files, plugins, or themes
Steps to Fix “Connection Refused” on WordPress Hosting
Follow these structured steps to diagnose and hopefully resolve the issue:
1. Check Website Status and Uptime
Start by verifying if the website is down for everyone or just you. Use free tools like downforeveryoneorjustme.com. If the site is offline for everyone, this confirms the issue lies with the server.
2. Restart Web Server Services
If you have root access through a VPS or dedicated server, log in via SSH and run the following commands:
sudo systemctl restart apache2 # For Apache
sudo systemctl restart nginx # For Nginx
Restarting the web server often restores the connection if the service had stopped unexpectedly.
3. Inspect Firewall & Security Rules
Ensure that firewall rules allow HTTP (port 80) and HTTPS (port 443) traffic. Commands like the following can be used to adjust UFW firewall settings:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
If you’re using a managed hosting provider, access security settings via cPanel or contact technical support.
4. Check Hosting Configuration and DNS
Make sure that your domain’s DNS settings are pointed properly toward your hosting server’s IP. Use the command nslookup yourdomain.com
to confirm.
Also, verify that your web server’s configuration files (like Apache’s httpd.conf
or Nginx’s sites-available
files) specify the correct server_name and root path to your site.

5. Disable Faulty Plugins or Themes
A corrupted or misbehaving plugin/theme can crash the WordPress site and result in a refused connection. To test this:
- Access your WordPress files via FTP or File Manager
- Navigate to
wp-content
and rename theplugins
folder toplugins_old
- Try accessing your site again
If the site loads, you’ve confirmed the issue is with one of the plugins. Rename the folder back and disable plugins one-by-one to isolate the culprit.
6. Review Server Logs
Server logs can offer insight into what went wrong. Look at files like:
/var/log/apache2/error.log
for Apache/var/log/nginx/error.log
for Nginx
Search for terms like “refused connection,” or lines indicating plugin errors, missing index files, or denied access based on IP rules.
7. Contact Your Hosting Provider
If none of the above fixes work, it’s time to reach out to your hosting support. Provide them with details like:
- Time and date the issue started
- What you’ve already tried
- Any relevant log entries
This will speed up the troubleshooting process.
Prevention Tips
To avoid future “connection refused” errors, consider:
- Regular backups — Always have a copy of your working site for quick restoration
- Use a reputable host — Cheap hosting often comes with limited resources and weak security
- Monitor your uptime — Use services like UptimeRobot or Pingdom to receive alerts
Conclusion
While a “connection refused” error is certainly serious, it’s usually fixable with the right checks and a careful approach. Most issues boil down to misconfigurations, stopped services, or simple firewall restrictions. By walking through the steps above, you’ll not only diagnose the issue but also gain a deeper understanding of how your WordPress hosting environment functions.
Always ensure your site is regularly backed up and monitored, as prevention is far more efficient than crisis management.
- How to fix a “Connection refused” error on WordPress hosting? - July 7, 2025
- Essential Website Features for Boosting Engagement and Driving Business Growth - July 6, 2025
- 7 Best AI Coding Tools - July 6, 2025
Where Should We Send
Your WordPress Deals & Discounts?
Subscribe to Our Newsletter and Get Your First Deal Delivered Instant to Your Email Inbox.