• Resolved colinbarrett

    (@colinbarrett)


    Okay, so I’ve been silly. It’s not the first time and it won’t be the last. Here’s the story so far.

    I’m hosting with Hostgator and have an existing site whose URL points into a “home directory” on the server. Great.

    I’ve now developed a WordPress site hosted on Hostgator which I’ve built in its own folder at http://www.mysite.co.uk/uk. The site URL field has contained this info. The aim has been that when I’m ready to switch to the new WP built site I’ll do a redirect in Hostgator’s CPanel to point requests for the site to the newly-nominated home directory where the new WP site will be operable. This would then serve the new site.

    Trouble is that, like an idiot, I changed the site location in WP-Admin first before performing the redirect.

    Now I get a 404 page when calling the WP build! I do get the index.php sitemap but it’s naked – no CSS.

    How can I rectify this? Does it require a change of data using phpMyAdmin?

    Help!

    Colin

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter colinbarrett

    (@colinbarrett)

    Esmi – many thanks for the quick response. Whilst you were responding I’d actually found the same page (I didn’t perform the right search earlier)! The problem is now corrected thanks to the info right at the top of that page.

    Thanks again.

    Colin

    Glad to hear that you’ve got it sorted.

    Thread Starter colinbarrett

    (@colinbarrett)

    Actually…… it isn’t! The index page is fine and the admin section is OK, but all other pages return a 404. I only discovered this after clearing the cache in Firefox. Dammit.

    I’ll go back to the page you gave me and read further.

    Colin

    Hi,

    Set your desired permalink and add this code in htaccess:

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    ErrorDocument 404 /index.php?error=404
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Thanks,

    Shane G.

    Thread Starter colinbarrett

    (@colinbarrett)

    Shane

    That did the trick! Thank you very much – you’ve saved me hours of hassle, all because of a stupid error.

    Colin

    Where is htaccess? I’m having a similar problem (able to create pages on the dashboard, but when I click “view page” it brings up 404). Where do I add this code?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘404 page after site URL change’ is closed to new replies.