The Latest and Greatest…

D’oh! I Entered the Wrong WordPress URI!

So I was migrating the FoSCL website from Dreamhost to HostMySite due to some performance and compatibility issues we’d been having. The new site and e-mail configuration were all set up and ready to go. Then, just as I was submitting the form to change the WordPress and Blog addresses (URIs), I noticed a typo I’d made in the WordPress URI.

Damn!

As anyone who’s made this mistake before knows, the message, “Sorry, you need to enable sending referrers for this feature to work” and un-styled websites with no images are instantly your new least favorite friends.

After a few moments of panic and some failed attempts to undo, I tried temporarily removing the part of WordPress that performs the security check. It worked like a champ! If you’ve found yourself in the same perdicament, here’s what you can do to remedy the situation:

In the /wp-admin/options.php file, comment out the line that reads, check_admin_referer(); by changing it to, //check_admin_referer();. It should be on or around line 32. Save and upload the file and you should be able to change the WordPress URI back to whatever it’s supposed to be.

When you’ve got things working again, make sure you uncomment that line, save it again, and re-upload it to the server. The function called on that line performs an important security check that, in most situations, prevents someone from hacking your site to redirect people to somewhere else. In this particular situation though, it prevents you from un-effing things.

I hope this helps someone…

This entry was posted on Thursday, June 29th, 2006 at 11:51 PM and is filed under Web Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

Browse Happy logo