I woke up to a WordPress database error yesterday. The error wasn’t caused by any changes I did to the site but something to do with the server.
I spent hours the night before working on this, a demo of using WordPress to manage a news portal.
With time to kill while waiting for the site to be fixed, I implemented something that had been listed in my “someday” list – customize the WordPress database error message and have the system send you an e-mail when your blog can’t connect to your database. I hate to admit it but I actually enjoyed the downtime as it taught me a lot as well as afforded me the time to play around with something I had long wanted to do.
The hack is surprisingly easy and I enjoyed crafting a database error page that I just might intentionally place wrong config data soon to test my planned addition to the error page.
I had wanted to include a php file that I could then just edit to serve as mini log while I’m or the server technicians are fixing the site.
I had also wanted to use an e-mail address that sends a message to my cell phone to alert me whenever there are problems with the database but after seeing that the system sends you an e-mail every time somebody visits the site while the database is down, I changed my mind.
The error and the time I spent trying to spot what the problem was as well as playing around with the database error page derailed my schedule to finish certain projects I’m working, including the news portal demo and the release of the Nautica05-Wordpress theme for webzines.
Check my news portal demo, this is the blog and this is the site when using the newsportal-wp theme I’m coding based on another open source template.
I’m still working on it as there are other functionalities I want to incorporate. I also don’t like the font used in the template–I haven’t gotten around to customizing it yet, I just converted it for use as a news portal. I’m still stuck at what to do with the opinion “page.” Should I display photos in the page when the photos of columnists are listed along with their latest columns in the sidebar? Should I display photos in the opinion “page” and not call the sidebar but instead another template file to replace it?
I use an edited author image plug-in to generate the mug shots that come with the columns. Anyway, I’ll write a blog post detailing what I did with the template as soon as I finalize it.
It still needs a lot of work. If you have suggestions, leave it in the comments field of this post.
The disorganized way I’m keeping template files I’m working on made me realize something I never thought would occur to me — I need version control. I need to learn how to work with Subversion. I want to host the templates I’m using in Google Code or Unfuddle but I still don’t know how to use Subversion. I plan to read the Subversion book when deadlines allow me.
Max is a journalist and blogger based in Cebu. He has written and edited for such publications as The Freeman, The Independent Post, Today, Sun.Star Cebu, Cebu Daily News, Philstar Life, and Rappler.
He is also a mobile app and web developer and co-founded InnoPub Media with his wife Marlen.
Leave a Reply