My site is refusing to connect - how do I get it working?

Hi. I have set up a new Linode and followed the set up instructions. I'm running Ubuntu 16.04 with a LAMP stack. I am trying to transfer a live Wordpress site from another server. I have done the following things, in this order:

  • Uploaded site files to /var/www/html/site.co.uk/public_html
  • Uploaded .sql file to same directory
  • Imported .sql file to MySQL
  • Updated wpconfig.php with relevant database name and login
  • Created a DNS zone
  • Changed nameservers at my registrar, and A records just to be safe
  • Waited for A records to propogate
  • Waited for DNS records to propogate
  • Generated an SSL certificate with letsencrypt
  • Restarted all services

When I navigate to my site - either via IP or https - I receive the following error:

This site can’t be reached
[site].co.uk refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall

This happens across networks and devices (https), so it's not to do with my machine.

Help much appreciated as the site is currently completely down :(

6 Replies

Make sure you have the firewall setup to allow ports 80, 443, and 22. It could be either you’re using ufw or iptables. I recommend ufw.

I didn't but I have now. Error still persists.

I found a few issues in the error log, seems like something went awry with the Wordpress installation. Current plan is to remove transferred site files from public_html, reinstall Wordpress, and copy over site files after that.

If you don't mind starting over, you might find it easier to follow the instructions in our guide on How to Migrate a WordPress.com Website to Linode.

While the above guide advises setting up Wordpress on Ubuntu 18.04 LTS, you can follow the same procedure after installing Wordpress on Ubuntu 16.04 LTS.

Ok, I normally do an installation from scratch since things can get hairy. Also, in case you run into some nodes trying to hack into your WordPress site you can use UFW to block those IP addresses.

Quick guide to handle common Linux commands and emergency situations

Network monitoring tools:

iftop -P -n to show ports and only IP addresses, no domains.
iptraf
bmon

UFW Firewall

sudo ufw status numbered (Shows rules by number order)
sudo ufw insert 1 deny from <insert address="" attacked="" being="" block="" ip="" to="" when="">
(Insert 1 puts the rule at the top of the list so it gets picked first)</insert>

Thanks both.

bbigger, I found that guide but I couldn't follow it because I don't have access to the Wordpress backend on the other server, only FTP, and I didn't know what format the Wordpress export would have to be in to import it through the recommended plugin.

It turned out to be an error with the files that had been transferred, which is now resolved. However now I'm getting an exciting new issue where only the homepage works.

Things I have tried for this:

  • visited permalinks in wp-admin settings to regenerate htaccess file
  • turned allowoverride on for var/www in apache2.conf

Any guidance here would be greatly appreciated..!

Never mind - I rebooted apache in desperation and it seems to have fixed things..!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct