Posts Tagged ‘database’

Improve WordPress Database Performance

Friday, April 3rd, 2009

I was browsing Greatnexus Internet and Web page and came across Yoast’s Optimizing WordPress Database Performance article. This article caught my interest because I have been having issue with my VPS crashing more often than it should and was trying to figure out what’s wrong.

In the article Yoast, mentioned a new WordPress plugin called Debug Queries and said that it’s design to help you find inefficient database queries — naturally, I was interested. I downloaded the plugin and installed it on my main blog. The result was very surprising. Debug Queries found that my home page was making 1,776 database queries per page load — yes, almost 2,000! Upon further inspection, I found the offending plugin to be Cross-Linker. After deactivation of Cross-Linker, the number of database queries dropped to 21.

This is unfortunate because I like the plugin. But fortunately, I found another linking plugin called KB Linker that works just as well, and impressively, the number of queries remained at 21.

So I just want to shout out to Joost de Valk, Frank Bültge, and Adam R. Brown.  Good job guys. Thank you for terrific blogs and plugins.

How To Start A Blog in 9 Easy Steps

Monday, March 17th, 2008

Over the past few weeks, my friends and I wrote about different aspects of blogging and how to position your blog more successful. In this post, I would like to take a step back and talk about how to start a blog. Specifically, I will discuss how to start a self-hosted WordPress blog since we already established that it’s one of the best platforms to start on.

Launch
Photo by rocatis via Flickr

Please note the discussion below assumes that you are interested in monetizing your blog and attracting readership. It’s not as applicable to if you want to blog casually.

1. Establish a business plan for your blog

This doesn’t have to be a full business plan since blogging has a very low cost of entry. But before you begin, there are several things you need to consider:

  • What’s the main focus of your blog? — I discussed this in Key to Successful Blogging. Be sure to pick a topic that you are passionate and knowledgeable about.
  • What are you trying to accomplish with your blog? — Do you want to start a blog to complement your business, products, and services? For side income? For notoriety? To open doors to other opportunities? To help others? To keep yourself accountable?
  • What are your expectations? — How much time are you willing to commit? What level of traffic, subscribers, income do you expect 3 months, 6 months, and a year from now? What would you do if you fail to meet those expectations?

2. Find and register a domain name

Once you have identified your blog’s topic, it’s time to find relevant and brandable domain name. I discussed this topic in detail in How to Create an Amazing Domain Name. I currently use GoDaddy.com and I do recommend them for domain name registration.

3. Find the right web hosting company

Finding the right web hosting company is probably one of the bothersome aspects of starting your own self-hosted web site. I have used many hosting companies in the past, including GoDaddy.com Hosting.

I am currently with Media Temple and have been very satisfied.

I think the four most important things to do when you start out initially are:

  • Pick the Linux package over Windows. With Linux you will have greater flexibility with .htaccess and working with PHP.
  • Pick a host that offers cPanel and phpMyAdmin administrative interfaces.
  • Use the lowest cost package. Don’t worry, you won’t go over the limits any time soon.
  • Sign up for 1 month only. Extend an additional month if you are happy and slowly work your way up to full year commitment. Use the money back guarantee if needed.

Here are a few more web hosting companies you could choose from:

4. Install WordPress

Installing WordPress is not too difficult, but it could be challenging if you are unfamiliar with the web. The basic steps are as follow:

  1. Download WordPress
  2. Unzip and FTP files to your web host
  3. Set up database
  4. Set up database username and password
  5. Update wp-config.php file
  6. Run WordPress built-in installation
  7. 5. Find and install a WordPress theme

    One of the nice thing about WordPress is that there are literally thousands of theme to choose from. With minimal effort you can make your blog looks fairly unique. I discussed this in detail in How to Find the Right WordPress Theme.

    6. Install and set up essentials plug-ins

    Plug-ins are add on programs that enhance the functionality of WordPress. You can find hundreds of plug-ins at the WordPress plugin directory. However, the ones that I considered essential are:

    7. Set up companion accounts and integrate their functionalities

    Companion accounts are other online services that make your blog more effective. I shared more information in 12 Essential Companion Accounts for a Successful Blog. Basically, these accounts will help in different aspects like monetization, marketing, traffic generation, search engines optimization, and so on.

    8. Configure your WordPress installation

    Once you have everything set up and installed, you’ll have to make everything works together. This involves making configuration changes in the administrative control panel, as well as some minor tweaking of your WordPress theme. This latter part will involve a little bit of HTML and PHP programming.

    9. Start blogging

    That’s it! You’re done and ready to share your ideas with the world. At this point, you’ll want to read How To Grow A New Blog Efficiently and other fine articles to help your blog grow.

How to Find the Right WordPress Theme

Tuesday, February 5th, 2008

Whoa, is there such a thing as the wrong WordPress theme? Sadly, the answer is yes. There are literally thousands of themes out there. There are some really good ones, and inevitably, there are some bad ones too.

Moolanomy Theme

Where to find WordPress themes

Before I show you what make a theme bad, I would like to share some resources where you can find WordPress themes:

10 Signs of Bad WordPress Themes

This is not a hard and fast rule, and certain flaws are worse than others — also, some could be fixed with relative ease. Note that my theme doesn’t pass all the tests either, but I know where the problems are and I am working on it. In other word, you may have a tough time finding the perfect theme that passes all these 10 points.

  1. Ugly — I know beauty is in the eyes of the beholder. So you have to decide on this one. If it’s ugly, move on and don’t even bother.
  2. Doesn’t stand out — Another design problem is using a theme that looks the same as everyone else’s. Worse, you have a theme that look very similar to the more popular blogs in your niche. Your theme is an important part of your brand, so it’s worth investing a little time to make yours stand out.
  3. Bandwidth hog — Some themes have too many images, large CSS file, add-on JavaScript files, and large HTML files. Make sure that what you are getting is worth the bandwidth usage. To check your theme bandwidth efficiency, check out Web Page Analyzer from Web Site Optimization. If you use Firefox, try Firebug and YSlow add-ons combination (awesome!). Some tips on reducing bandwidth usage:
    • Reduce the number of images, scripts, and external CSS file (each image takes at least 1 HTTP request)
    • Optimize images to make them smaller
    • Reduce the size of CSS file — i.e., using Clean CSS — or you can do it on your own by stripping out comments, extra spaces, reduce long-hand coding to their short-hand equivalents, etc.
    • Eliminate unnecessary clutters from your blog — i.e., links, text, images, widgets, clicklets, etc.
  4. Database hog — Some themes can make a lot of unnecessary calls to the database. For example, Tigopedia Reloaded uses only 2 database calls compared to its predecessor that uses 30+ calls. Other than that, judicious use of plug-ins will also help reducing database usage.
  5. Invalid HTML — This is probably one of the easiest problems to fix. Unfortunately, some theme designers don’t even take the time to validate their code. To check if your theme validates, try the W3C Markup Validation Service. You can use the “show source” option to help you track down and fix problems.
  6. Invalid CSS — This is similar problem to the HTML validation. To check your CSS validation, try the W3C CSS Validation Service.
  7. Poorly optimized for search engines — There are many articles about how to optimize WordPress for search engines, but when it comes to theme, we are dealing mainly with location of content relative to other code, use of headings, and use of links. In general, good theme has the following characteristics:
    • Present main content first and sidebar(s) afterward
    • Use only one H1 heading for the post title (some may argue using H1 for blog title, but I think it’s more advantageous to use H1 for post title)
    • Use links sparingly and link directly to the post title
  8. Poor separation of content and design — Good theme should make good use of id and class attributes. It should have very little style declaration inside the template files itself. Also, CSS and JavaScript code should be in separate files and not included with the main HTML page.
  9. Inflexible (hard to modify) — Code should be clean, well formatted, and strategically commented. I have tried several themes in the past and there are some that are so hard to work with, I simply stop using them.
  10. Portable — One of the common problems I see when visiting blogs through a portable device (e.g., a blackberry) is bad rendering. Occasionally, I will see blog showing broken CSS code before I can get to the content. If you have an opportunity, check your site through a portable device and see for yourself. To get an idea on how your blog appears on text only or portable device, try Lynx Viewer.

I hope this post help you find your next theme. Before I go, I also want to share a really cool plug-in called Admin Theme Preview. This plug-in let your blog runs uninterrupted, while you can work on a new theme in the background.