• Resolved lowlands123

    (@lowlands123)


    Hi there,

    I’m VERY new to all this and have checked online and in these forums but can’t find anything which works (I must be missing something!) so I’m hoping one of you lovely folk may be able to help!

    I was working on a site on my localhost yesterday and all was fine. There were some power cuts but I could still get on when the power came back on. Today I tried to enter the site and I’m getting the error ‘This site can’t be reached. ‘address…’ refused to connect.

    My WAMP server is working fine and is green. I’ve checked mySQL and the details are fine as I haven’t made any changes. I didn’t change the theme or install any plugins yesterday.

    Could the https be interfering? Although the error message isn’t for SSL?
    Would reinstalling WAMP work?
    Worse case scenario, should I set up another site and transfer the files across? I’ve done a fair bit of work (20 hours) on the site. Any help with how this works would be helpful too.

    Any help very welcome!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Could the https be interfering? Although the error message isn’t for SSL?

    Since it worked before, so you must have had all the settings done right already. At the time it used to work, did you use http or https? Make sure the site configured correctly, in the wp_options table double check on siteurl and home.

    It could also be the Port 80 is in used by other application, see this page for info
    https://www.raymond.cc/blog/change-apache-server-port-80-in-xampp/

    It could also be how the network accuires ip-address, see this page for info
    http://help.cose.isu.edu/howto/changing-your-computer-to-dynamically-obtain-ip-address

    Thread Starter lowlands123

    (@lowlands123)

    Thank you so much for replying.

    I’ve checked and it’s set to http, rather than https, but I can’t stop it defaulting to https.

    The port is fine and being used by Apache and there doesn’t seem to be anything wrong with the ip address.

    So, it looks like I’ll need to find a way to stop it redirecting to https, however I searched online for this and followed the steps (in Chrome, delete the localhost address so it doesn’t block it and cleared the cache) but that didn’t work.

    Sorry to ask again but any ideas?

    The other thing that I can think of is the .htaccess file, it’s in the root directory. See to it that it doesn’t redirect to https. I would just make a copy of it first just for a backup, then delete it, WP will regenerate this file again when we access permalink setting in admin.

    Thread Starter lowlands123

    (@lowlands123)

    Thank you, is that in phpMyAdmin too? I can’t find the root directory there.

    phpMyAdmin is for database, not files. Just use file explorer and navigate to where you installed WAMP, and go to where you installed wp.

    Thread Starter lowlands123

    (@lowlands123)

    Thanks, I’m really new to this stuff.

    So, I’ve checked via Atom and this is what I’ve got under .htaccess:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>

    # END WordPress

    No mention of redirecting here.

    Thanks again for your help with this.

    Is there another way round this, aside from starting it all again? So, could I set up another site on my localhost and use the wordpress files I’ve already got?

    Is there another way round this, aside from starting it all again?

    Please see this youtube link

    I don’t really think this is the case, but since we’ve checked all the common culprits already, also it’s just one line of code to be looked at, nothing to lose.

    So, could I set up another site on my localhost and use the wordpress files I’ve already got?

    Actually we do not need to re-do anything again, all your works will still be usable. I would reinstall core WP, keep wp-content folder, and database untouched, also make a backup copy of wp-config first

    See detail in this link under the title: Manual Update
    https://codex.wordpress.org/Updating_WordPress

    Doing the manual WP reinstall will rule out if the problem is a damaged core file that could have happened during the power cuts you mentioned.

    Thread Starter lowlands123

    (@lowlands123)

    Thank you for your help but sadly nothing has worked so it’s back to the drawing board for me.

    If you go into phpMyAdmin can you see the database? Are the site’s files still in the WAMP www folder?

    Thread Starter lowlands123

    (@lowlands123)

    Hiya,

    Yes, the files are in the database. The site files weren’t ever in the WAMP folder (I set them up into another folder) but all worked until yesterday.

    Dion

    (@diondesigns)

    Power outages can result in an unstable state, especially if you are using Windows. I’d suggest restarting your system and see if that helps.

    Don’t forget to do a complete backup before reinstall server and WP all over. The work you have done shall not be lost.

    https://codex.wordpress.org/WordPress_Backups

    Thread Starter lowlands123

    (@lowlands123)

    Thank you for your help. Sadly I couldn’t work it out so had to start again but appreciate your replies!

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Site can’t be reached on localhost’ is closed to new replies.