• If I enter https://www.mydomain.co.uk I get an HTTP 500 error, yet if I try this on ANY other PC then I can see my home page without a probelem. Furthermore, if I stick “/?” at the end of the URL I can see the homepage fine from my PC.

    Conclusion: there is some problem specifically with the setting on my PC, but I don’t know how to fix it.

    Why the problem happened in the first place: A friend commented to me that for most firms it is not necessary to type the whole URL into the address bar (complete with www.), just the domain name is sufficient as a redirect will do the rest. So I asked my temp to sort this out for me. They went into the WP admin General settings and deleted the https://www. from the front of my blog address thinking this would solve the problem… the result: I lost the entire website.

    I quickly fished around online and found a patch to recover my website. This involved altering the wp-config.php file with hard code as follows:

    define (‘WP_SITEURL’, ‘https://www.YOURDOMAIN.co.uk’);
    define (‘WP_HOME’, ‘https://www.YOURDOMAIN.co.uk’);

    So now, when i go into General settings, my URL is correct, but greyed out and un-editable… and rather bizarrly now I can’t see my own homepage.

    HELP!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi David,

    I’m not sure what settings may have been altered on your local computer but I do have some recommendations. You may want to try this in different browsers to make sure it’s not just a browser cache issue. If the error is due to caching, empty your browser’s cache.

    The reason your URL is greyed out in your General settings is because making changes to the wp-config.php overrides any settings in the database (which could normally be changed in the General settings). If having your URL editable in your dashboard is needed, simply double check and make sure your WP_SITEURL and WP_HOME fields are correct in your database and then remove or comment out those lines in your wp-config.php file.

    Hope this information helps!

    Thread Starter David Lawson

    (@david-lawson)

    Hi there ChristiNi

    Thanks for the swift response. I tried clearing the cache as you suggested but alas no joy.

    The greyed out URLs in General settings are indeed correct, so next I tried “commenting out” my patch. This resulted in me losing access to WordPress completely, accompanied by “Error establishing a database connection” in big, friendly letters… so I put this patch back in.

    So I’m back to square one – I can’t see my homepage, but everyone else can. Of note, during the time my website was down, my colleagues using Chrome could still see my site, but those using Firefox could not. It appeared that the ones using Firefox were getting a permanent redirect that was removing the “www”.

    Curiouser and curiouser said Alice

    Hi David,

    Yes, curiouser and curiouser indeed! Here are my next thoughts on this:

    Did you modify your hosts file on your local computer?
    Do you have custom DNS setup for your domain?
    Do you have any redirects setup in your .htaccess file?

    Error establishing a database connection would be due to incorrect hostname, database name or database username. Make sure when editing the wp-config.php file that you check for any stray characters that could cause errors.

    Good luck with getting your site sorted out!

    Thread Starter David Lawson

    (@david-lawson)

    Hello again ChristiNi

    Many thanks for coming back to me a second time; I worked through your suggestions and my problem is now resolved.

    Solution: I set up a new redirect in my .htaccess file (my URL in the WordPress General Settings are still greyed out… but the canonical redirect in the .htaccess file seems to take precedent here).

    Other things I’ve learned: always take a copy of your php files before you start playing around with them… I had no idea just how fussy php can be (evidently the acronym stems from Programmer? Horrendously Problematic)

    Anyway – tis fixed now (and I can access my homepage once again from various browsers, both with (and without) the “www.” !)

    Thanks again

    ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘I cannot see my homepage, but everone else can’ is closed to new replies.