Flash image replacement!

Archive for the ‘Web Mastery’ Category

WordPress Staging Environment In 5 Quick and Dirty Steps

Wednesday, May 12th, 2010

wordpress-staging-quick-and-dirty

The ability to fully simulate your latest creation in a staging environment is what separates the best from the rest. Once endowed with such powers, publishing to a live site just to see how it looks seems about as smart as dipping your finger into boiling water to see if it’s the right temperature. Staging environments are not simple though – they require a unique install of WordPress, a file comparison interface and a bunch of other things. Plug-in’s are a powerful thing but cloning the entire structure of it’s parent is not something plug-ins are capable of. If you run your WordPress install from something other than a server you have full control over, setting up a staging environment is a near impossibility. Most WordPress users don’t run their own server let alone know what “Apache” really is.

There is hope though! Before I took the reigns and built my own server, I ran WordPress on a paid host. Something I didn’t have complete control over. Luckily, you can use WordPress’s “preview” powers to create your own quick and dirty staging environment.

Here’s how!

  1. Log into your FTP and go to [your blog dir]/wp-content/themes/. Copy the directory of your current theme and rename it. Something like “[your current theme]_staging” would make sense.
  2. Log into WordPress with your admin account and go to Appearance > Themes. You’ll see your newly copied staging theme here. Right click on it’s “preview” button and copy the link address. Depending on your browser, this will be “Copy link address” or something similar. You could always right click and see it in properties.
  3. Now, log into your host and create a new sub domain. Most hosts will give you 10 sub domains or unlimited sub domains free. Name your new sub domain something like “staging.[your blog domain].[com/org/net/whatever you use]“
  4. Redirect your new sub domain to your staging theme’s preview link. Paste for the win!
  5. Once your new sub domain is created, visit it in your browser. Looks exactly the same as your normal WordPress site, right? Good!

Now, when you want to edit your theme, overwrite the files in your staging theme folder instead of your “production” theme folder. Visit your staging sub domain and see how it look’s in full screen glory. It even has the built in security of WordPress – you can’t see it unless you’re logged in and have permission to preview themes. Is that quick or what?

Here’s the dirty part. If you want to preview your latest post on your latest theme, you can do that by appending “p=[post ID number]” to the URL. You can get your post ID number by looking at the preview link URL on the edit post page in WordPress. This will only preview that post’s “single” page though. You can’t preview your latest post at the top of your index page until it’s published. There’s also the downsides of having to do things manually. In addition to finding your post id number, when you want to update your production site with your staging files, you have to copy the files from your staging theme folder to your standard theme folder. This is still no harder than copying updated files strait to your production theme though and at least you’re not affecting your live site. Be careful not to overwrite files you didn’t want to and always keep a backup!

The dirtiest part is this – version control. It has none. Lets say you want to see how a new logo image looks. You have to upload that new logo image and change the URL in the <img> tag in the header file of your theme. If you just upload and overwrite the existing logo file, that will affect your “production” site. This is why a true staging environment requires an entirely separate install of WordPress. Like I mentioned – it’s not simple. The setup is no doubt an improvement over having to hit preview and seeing it in a frame or worse – experimenting with your live site.

SEO From the Professionals – A Case of Applied Logic

Saturday, April 3rd, 2010
Search Engine Optimzation

Search Engine Optimzation

SEO (search engine optimization) is often regarded as a mythical un-masterable collection of cheats to have Google place your page higher than others. The reality is far from mythical, though there are plenty of myths about SEO itself. There’s little tips and tricks (which I’ll cover here) but a recent presentation I attended by SEO experts SearchingWorks Inc. revealed both a surprising and obvious secret. Search engines are an ever-evolving organisms which become more powerful (and useful) everyday. A few years ago SEO was more akin to black market trickery with tactics such as

<META name=”keywords” content=”digital camera, digital camera, digital camera, digital camera, digital camera, digital camera”>

Gone are those days and good riddance! Modern SEO can be boiled down to this 1 mantric question: “Are my pages logical?”

Google and similar search engines are governed by 2 simple elements. The “bot” and people who use the net. A bot is a confusing algorithm of mathy sciencey pixie dust worth untold millions of dollars. Put plainly though a bot will “crawl” your pages to determine what content it contains. That’s it. The search engine then uses human factors such as visits, time spent on pages, number of “organic” links from other pages and a few other factors to determine how desirable your page’s content is versus content of a similar nature, on other pages. Simple right? Don’t worry if you said no, it’ll make sense in a moment!

To understand SEO, you first have to understand what a bot “sees”. The meta tags are almost completely irrelevant (*gasp*!). The number of times a word is repeated on a page is also irrelevant (*double gasp*!). What matters a great deal though, is your headlining text. The page title is a good indicator of page content, no? Well it should be, and this is possibly the greatest weight in determining relevance to searched-for content. A header such as the title of this post is also a good indicator of the content that follows it and subsequent headers are good indicators of the content that follows them. So use your headers well! Stay away from font tags and make good use of CSS.

Make good use of the <TITLE> tag:

  • Well-written, unique title paired with strong content helps position in search index
  • 50-75 characters in length (66 are displayed)
  • Lead with the important word (not always the company name)
  • Compelling titles invite clicks by search engine users
  • By comparison, keyword meta tags are all but useless

Another powerful indicator of page content is the pictures it contains. This also keeps visitors engaged. Have you ever been searching for something, land on a plain text page and just leave cause there’s no pictures? We all have. Search bots can’t determine the content of pictures (with the exception of the presence of a face) but the “alt” or “alternate” text is used as an indicator to the pictures content. When an image doesn’t load for any reason, the alternate text shows. Making the “alt” text relevant to the image’s content is smart for both SEO purposes and if your image doesn’t show. Makes sense right?

Contrary to popular belief, the number of times a term is mentioned in an article (“keyword density”) will not make that article rank higher for relevance to that term. It’s a myth! It screams unprofessional (or perhaps just incompetent) to have content that appears to be written for search engines.

Keyword density doesn’t allow for:

  • Location of terms on a page
  • Usage or terms in context
  • Proximity of terms in context
  • Contextual use of terms in comparison to other documents
  • Synonymy, plurality, other contextual variations

Lesson: don’t write like you’re trying for hits. Write like you want the reader to be engaged with your content. Search engines have gotten smart about keyword determination, but if you really want worth-while visitors, you need to make it human friendly too.

Guidelines for keyword placement:

  • Once in the title, possible twice as a variation
  • Once in an H1 tage on the page
  • 3x or more in the body
  • Once in bold (at least)
  • Once in the meta-tag description
  • In the anchor text pointing to the page (links from other pages!)

Doing all of the above will make for pages that index the best they can. That is something entirely different however from pages that pull a lot of visitors! To get many loyal visitors, you must produce content those reads will read and you must keep them engaged with frequent, high quality updates. One of the greatest ranking factors is how many other high ranking sites link to your own. A second mantric question you should ask yourself is “Is my content desirable?”. It’s hard work, I know, but make it on to the google-podium for hard-to-rank terms organically, and you’re getting the SEO holy grail – free advertising.

If you’d like to read more on the matter, LifeHacker has a short and to the point SEO article here or head over to SEOmoz which has an excellent, free and quite complete guide to search engine optimization here. Getting quality visitors is about producing quality content too however – for guidance there I’d recommend Gerry McGovern and his book “Killer Web Content”.