When good sites turn bad. Canonical loops, white screens of death and more

Posted by | April 08, 2011 | Services, Websites | No Comments
Until now I've managed to avoid the dreaded 'WordPress loop' which, like a naughty imp, attacks WordPress sites for a variety of reasons including website builders like me trying to get too clever. There are several loops you can get caught in - the Canonical redirect infinity loop is a popular (and very UNpopular with us lot) example. Add one plugin too many, or indeed change from standard permalinks to pretty permalinks, and you might get a message like this: “Firefox has detected that the server is redirecting the request for this address in a way that will never complete.” Or this one in Safari: “Too many redirects occurred trying to open this document.” There are some excellent plugins around that help fix this dire loop. Mark Jaquith's Disable Canonical Redirects plugin is probably the best and easiest to use. So when a client's site starting looping last weekend after I upgraded to the latest version of WordPress, I confidently installed the plugin and thought all would be well. After all, I'd backed up the database. Or so I thought. Things went from bad to worse. The initial site Canonical loops were all fixed up, with internal links working perfectly, but neither the client or I could log into the site. We were caught in a login loop. No matter how many times we cleared caches and history, at each attempt at logging in we were simply redirected back to the login screen. Nothing I could find online seemed to solve the problem no matter which browser I used. I got into the back end via FTP and removed all plugins, including the Canonical Redirect one. So then the site crashed. Big time. White screen of death. Nothing. Except my extremely red face. I contacted the host, a US-based company which shall remain nameless, but they were little help and didn't respond to my help desk emails. In the meantime my client had bought hosting at Crazy Domains as we'd intended to shift the site there anyway. It's local, the help desk is local, the backend system is CPanel X which is fantastic for maintaining your site, and the hosting rates are very affordable for small business. I recommend Crazy Domains to all my clients; if you need help those guys are really on the ball. So we pointed the domain name to the IP address at CD, and I installed WordPress. I jumped onto PHPMyAdmin and uploaded the backed up database. Or tried to. The system wouldn't accept it.  By now I was getting nervous. We'd wasted nearly a day already trying to fix the site up. Moving the WordPress site database should have been an easy process. Rather stressed and furious, a male version of meThe guys at CD help tried everything for another day to get the old database to talk to the new, and I had visions of burning the midnight oil rebuilding the entire site from scratch. Finally their head techy told me the old database wasn't a proper backup. Simply exporting from PHPMyAdmin doesn't create a backup of a WordPress site that PHPMyAdmin can read when it tries to reinstall it. Poor Crazy Domains, they must hate me; up to six calls a day for three days trying to get this wretched thing to work. So... back to the US host I went, this time using an online chat facility where all they could recommend was exporting from PHPMyAdmin. I explained why that didn't work and they suggested trying Navicat in the end. I downloaded a free trial of Navicat for My SQL and it's seriously good. $500 worth but I have it free to try for 30 days. There's plenty of documentation, and it's a simple to use, quality product. Realistically I didn't have to do much in the way of RTFM, it's quite intuitive. It took another chat line conversation to find out what the US host's port for the SQL server was, and finally, oh finally, I had a proper, working backup that the Crazy Domains server accepted with open arms. (By the way, Crazy Domains and any host using CPanel X provides you with a proper backup facility via CPanel X. For free. Great if you are doing single site backups.) But I still couldn't log in and the site's home page and all other pages were still glowing white with nothing on them. The air around my Mac was turning blue in response. Finally I reinstalled WordPress, crossed my fingers that the backup would upload again safely (it did), and all was well. The site was back online. My widgets hadn't kept their place in my sidebars, but that was the only difficulty I had. I could feel my blood pressure falling gracefully.

Leave a Reply

Your email address will not be published.