Moving Your WordPress Installation? Don’t Forget the .htaccess File!

In my previous article From WordPress to Joomla and Back Again, I wrote about how I made the switch back to WordPress after giving Joomla a long trial run.

My migration plan back to WordPress was fairly simple: I had Joomla installed in my website’s root directory ( and I installed WordPress in a subdirectory ( where I could begin setting up, customizing the theme, and migrating articles from Joomla.

PHPWhile the Moving WordPress instructions in the WordPress documentation were easy enough to follow, it wasn’t until I noticed that the SexyBookmarks plugin wasn’t rendering properly in my articles that I must have done something wrong. I tried reinstalling the plugin, but it kept hanging up during the “Unpacking contents of package” phase.

The WordPress documentation does make some mention of the .htaccess file, but it doesn’t state that WordPress requires this file to be in your website’s root directory even if WordPress is not installed to the root of your website. The reason? For people like myself using a shared web hosting plan, you do not have full control of which version of PHP the web server is running. The alternative is to explicitly instruct the web server to use PHP5 instead of PHP4 (if available) to process all .php files on your website by including a .htaccess file at the root of your website containing the text: AddType x-mapp-php5 .php. Not knowing this myself, I removed the .htaccess file along with the rest of the Joomla files as I was migrating the WordPress files into the root of my website, which broke the WordPress plugin installer. When I restored the .htaccess file to the root of my website, WordPress started working normally again and I was able to get the SexyBookmarks plugin reinstalled.

In case you need to recreate the .htaccess file, just open a text editor and save the file as “.htaccess” without an extension. If your operating system gives it an extension anyway, just rename the file and remove the extension.

Check out the WordPress Codex for more information about the .htaccess file.


Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *