April 27th, 2010
WordPress database migration causes MAMP permissions error – solved!
Tech tips aren’t something I ever intended on posting here. They’re boring as all hell to the majority of people and seem out of place in amongst my fantabulous drawings and aural selections. I will however make an exception for this little nugget.
I’ve encountered this problem twice now while moving a WordPress database from my local to remote server. I’m posting this largely so the next time it happens to me I won’t have to resort to a half-hour google search to find the answer, and of course to help those of you that may find it in your own search for a solution.
Here’s the story: I backup my database and WP files, go into settings and change the wordpress and blog address to the new url. I upload the files to the server and head back into MAMP to retrieve the database with the modified settings. Problemo! I can’t access the MAMP start page or phpmyadmin. Panic sets in.
Thankfully, like most web related problems chances are somebody out there has already encountered the same issue before. After some googling I discovered this thread which covers my exact problem. About eight posts in a generous soul shares the solution.
Here it is:
WordPress has created a .htaccess file in the root of your harddrive (that little devil!). The contents of which will likely look similar to this:
# BEGIN WordPress
RewriteEngine On
RewriteBase /ExampleSite/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /ExampleSite/index.php [L]
# END WordPress
Get rid of it. You’ll have to turn on hidden files to delete it, but once removed MAMP should be back to normal. Praise Jah.