WordPress Multisite Migration, Broken Permalinks & Database Connection Errors: Don’t Forget wp_blogs & httpd.conf!

Today I was migrating http://usfsm.edu to a new remote server.  Our internal was getting way too slow, old and laggy.

All was going smooth.  I moved over the files, the database, updated the wp-config.php file and updated wp_options to have the testing ip address instead of our domain: Error establishing connection to database.  Awesome.  I tested our database through a simple php script, connected and selected database no problem.  Checked file permissions, all seemed good.  Tried logging and debugging, nothing was showing up in log files.  I’ve noticed if you try and visit wp-admin you get different error sometimes.  Sure enough, apparently I needed to check on a table I didn’t think about: wp_blogs.  This is where domains are stored for all individual blogs so I changed the first, which is our primary blog, to the ip address and everything seemed swell.

Then I tried to test permalinks… awful, anything like usfsm.edu/academics was giving a 404 error.  Rebuild permalinks: No change.  Ok, is mod_rewrite installed and enabled? Tested, yep.  .htaccess permissions good? Yep, all well there.

What in the world could be wrong.  After some googling I found something else to check, the httpd.conf file.  Sure enough, AllowOverride was set to None for all directives.  Changed to All and everything works.

I know there are some security issues with that though so the next phase is finding the appropriate settings for allowing rewrites yet keeping our site secure.

Leave a Reply

Your email address will not be published.