Since the release of the Rating-Widget star ratings system WordPress plugin, I have received more than couple of dozens emails and support form threads regarding this error message. After googling this error, I’ve noticed that there are many WordPress plugins that suffering from this issue. This lead me to write a short blog post which will shine some light on this error and will provide a solution to start using the plugin.
When does “couldn’t connect to host” can happen?
This is a common HTTP error may happen when a client server is trying to retrieve a remote web page by establishing a TCP connection.
What does “couldn’t connect to host” mean?
This error indicates that the remote web server did not accept the TCP connection request, and hence the HTTP request could not be conducted.
Why does “couldn’t connect to host” caused?
There are various reasons for this error, but here’s the most common ones:
- Firewall mis-configuration: outgoing TCP connections are disabled. This is the most common reason for the error.
- Crashed or failed web server processes: an error that happens on the remote server in the middle of the request process.
- Network or router failure: an error that happens in your router’s connection or somewhere in the internet before actually getting to the remote server.
Workaround for Rating-Widget WordPress Plugin
The reason that our Star Ratings System WordPress plugin is trying to establish a remote connection is because the plugin must generate your
unique-user-key on our servers. This process is mandatory for your unique blog identification. The trick is that you can manually generate the
unique-user-key on our landing page.
- Go to our landing page: http://rating-widget.com and click on the “Get Widget” button.
- Then, click on the “Generate User-Key” button.
- Follow the instructions on the page to retrieve the
- After you’ll receive your
unique user-key, save it somewhere (recommendation – send it to your email box) and login to your WordPress admin dashboard.
- Then, go to the Plugins editor.
- Open the dropdown list of your plugins and select the “Rating-Widget Plugin”. After, click on “Select”.
- When the plugin files is loaded, find the
rating-widget/lib/key.phplink and click on it.
- Now, all what is left to do is to update the file with your key, and un-comment the user-key line.
- Don’t forget to click on the “Update File” button at the bottom to save the changes.
- You’r done! Now you can go back to the Ratings section and start enjoying the Rating-Widget WordPress Star Ratings System plugin.