WordPress Stuck in Maintenance Mode After Failed Theme Upgrade

When I logged into my WordPress Dashboard yesterday it notified me that three of my themes had updates that needed to be installed. I don’t always run off and install every theme upgrade immediately but it’s a good idea to stay current with the latest updates because the longer you hold off on upgrading the more you are putting yourself at risk by not installing patches for recent exploits.

With modern day WordPress everything is one-click: one-click install, one-click update, one-click [insert time consuming task made simple here], and theme upgrades are no exception. WordPress gave me the option to upgrade all three themes at once and I obliged. However, upon performing the upgrades my blog was put into a state of perpetual maintenance. Any page that I tried to visit whether in the admin panel or on the public site would only give me a screen which resembled the following:

WordPress stuck in maintenance mode

After a quick Google search I found the fix on a thread in the WordPress support forum. It turns out that when WordPress puts your blog in maintenance mode it places a “.maintenance” file in the root directory of your installation. (For illustrative purposes I’ve re-uploaded the file in a folder other than my root installation path)


The .maintenance file is just a simple one-liner of php which looks like:

<?php $upgrading = 1234567890; ?>

To fix this simply delete the .maintenance file or remove it from the WordPress root directory. After doing so you should be able to refresh and be back to normal. Note that the first time I refreshed my index.php after this occurred I got a few PHP errors at the top of the page, but it only happened that one time.

I hope this information helps someone in a time of need as it did me. As always feel free to drop me a question or comment below.


Read More

7 Ways To Increase Blog Exposure, Traffic

The reason why you or I or anyone else blogs shouldn’t be popularity. If you’re blogging for fame and fortune, you’re more than likely in for a rude awakening. We should be blogging mainly for two reasons: 1) we love to write; 2) we have something to say. That being said, it sure exhibits a warm feeling when you know that many people are actually reading and taking something away from what you write.

Obviously you have the writing part down, or else you wouldn’t be interested in a post on how to increase your blog exposure and traffic. So what remains is how to get people to find your blog. The readers are out there, believe me, we just have to guide them into our sites, as the blogosphere is one mighty jungle.

Here are seven things you can do to increase your blog exposure and traffic:

1) Change the href value of your application/rss+xml <link> tag within the <head> of your Web page to your FeedBurner URL. By default, the standard WordPress RSS link is used, in the form of domain.com/feed/. While this is fine for serving content we can gain more exposure by replacing this default RSS link with our FeedBurner URL. In using our FeedBurner URL here instead of the default RSS link we are effectively allowing users with auto feed-discovery browsers to select how they wish to subscribe to our feed. The more options a user has the more likely they are to subscribe. In addition, we get all the nifty FeedBurner metrics that are fun to look at. Note: TechCrunch uses this technique, and they have over 400,000 subscribers.

2) Make sure your sidebar content loads after your main content. Surprisingly, a lot of WordPress themes load the sidebar content before the main content, even if the sidebar is located on the right-hand side. By loading your hard-earned, well-thought out content after your sidebar you are making it more difficult for search engine spiders to find, and your listings on SERPs will not be satisfactory, aka less traffic. So help yourself out, often times it can be as easy as copying an include function <?php include (TEMPLATEPATH . ‘/sidebar.php’); ?> and pasting it further down in the code.

3) Change post titles to <h1> tags. By default, most WordPress themes ship with post titles formatted as <h2> or <h3> tags. Not sure why this is, just seems to be the status quo. Search engines give more significance to content in <h1> tags over <h2> and <h3> tags because an <h1> tag basically tells the search engine “hey, this page is about what I’m encapsulating, so pay attention to it!” As such, by changing your post titles to <h1> tags you are giving your posts a better chance at higher rankings, aka more traffic. And changing to <h1> tags will not mess up the layout of your blog, as you can make them look just like <h2> or <h3> tags with CSS.

4) Submit to Digg, Reddit, etc. Although it is very difficult next to impossible to make it to the front page of a site like Digg, that doesn’t mean we still shouldn’t submit our entries. By submitting a post you are almost always guaranteed at least one visitor. The odds are that at least one person will click it while perusing upcoming stories. However, when submitting to sites like Digg and Reddit the goal isn’t necessarily getting “Dugg” and making it to the front page, but getting our content indexed within these social news sites. The millions of people on these sites use their search functions extensively, and by submitting our entries we are giving ourselves the ability to show up within searches on these sites. So in sense we can think of submitting to these sites as submitting to other search engines apart from Google and Yahoo, and although the volume is significantly less, the traffic will probably be more targeted. And as we’re thinking of these sites as other search engines, it’s important to submit our titles and descriptions with good, relevant keywords to our posts so that we have a better chance of generating click-throughs on related queries.

5) Choose a good permalink structure. WordPress ships by default with the following permalink structure: domain.com/?p=x where x is the number of an entry in the database — page, post, etc. This is hardly search engine friendly as not only does the URL have a parameter in it, there aren’t any keywords! You can customize your permalinks virtually anyway you want in the Options > Permalinks section of your admin panel, but at the bare minimum you should at least remove the parameter and insert the post name into the URL. This will help to ensure that your posts are getting indexed well for relevant keywords.

6) Ping services when you post an entry. This may not be as much of an issue for bloggers with the most recent version of WordPress, but whenever you make a post you should ping outside services to let them know you have updated your blog and to come back and look at it. This will lead to getting your posts indexed faster and with higher listings. I believe that by default WordPress is configured to ping Pingomatic (http://rpc.pingomatic.com/), but you should also ping blog search engines like Google (http://blogsearch.google.com/ping/RPC2) and Technorati (http://rpc.technorati.com/rpc/ping). You can update your list of services to ping at any time by going to Options > Writing in your WordPress admin panel.

7) Be active on blog communities like MyBlogLog and on other blogs. Blog communities are a tremendous resource for finding targeted readers, increasing your subscribers, and even getting backlinks. Other blogs are also a space that you should be active in. By participating and commenting on other blogs, not only will the author visit your site and potentially contribute, readers of the other blog might as well — not to mention if the other blog doesn’t have “nofollow” attributes on its anchor tags you could even get an extra backlink!

These are seven easy — though possibly time-consuming — ways to increase your blog exposure and traffic. Since I have undertaken all of these collectively my average daily traffic has increased over five-fold, and I strongly believe that if you do all of these as described your exposure and traffic will increase as well.

Read More

Bobbles WordPress Theme Similiar Topics Bug Fix

As you may or may not know, I recently switched to the Bobbles WordPress Theme from Dezzain.com. It truly is a gorgeous theme and has a very “Web 2.0″ feel to it with a lot of social web integration. In using and exploring Bobbles I came across a bug that I informed the creator of, but I decided to take matters into my own hands and come up with a fix.

The bug is small but nevertheless needed to get fixed. If you were looking at a single post — therefore in the single.php file of the theme — you would see a “Similiar Topics” section with related entries to what you were looking at, but when hovering the mouse over a link you would get the_excerpt() from the current post you were reading. So the solution was to change the code to pull the_excerpt() that corresponds to the title of the related post.

After a few hours of hacking away at it here is the code (in single.php) that I changed to get it working:


Essentially there are three things that need to be done: 1) add the getWords() function between lines 52 and 61 — make sure it’s not inside the foreach loop or else you will get errors as you can only declare a function once; 2) add the variables between lines 63 and 65 — these will go inside the foreach loop because they need to get done for every related post; and 3) change the value of the anchor tag title attribute in accordance with line 67 so that it outputs the final variable $a_title.

If you want to show more than the first 15 words change the number on line 64 to however many words you want to show, and if you don’t want show the three dots (…) after the excerpt just take out . “…” from line 65.

Let me know if you have any questions or experience any problems.

Read More