WordPress – Menus Fail After Moving Site

I recently wanted to promote my website to be the primary site on an account at Just Host.  You might be thinking, “why did you even care?”  Good question.

First, I wanted to do away with the site which was currently the primary site.  I couldn’t do that if it is tied to the account.  More important, though, is that I want to assign an SSL Certificate to my WordPress site.  The only place Just Host allows an SSL Cert is my site primary site.

So, I got on a support chat and got that done.  Everything that is written about it says that things should “just work” but that I should backup my site anyway 🙂

Well, of course I’m going to backup my site.

When my new primary site was ready, all the menus (except for Home) failed to resolve as pages.  I had to scratch my head for a while to understand what happened.  In the end, the .htaccess file was wrong.  It never got transferred in the move.

To fix the problem, I had to copy the htaccess file from my old site.  Below is the minimal htaccess file for WordPress.  Yours will probably be somewhat different, but you will need the rewrite rules to be correct.  There is WordPress documentation on that.

.htaccess

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