Blogs

WordPress: How to use MySQL to replace the URL in your posts

WordPress logoIf you've ever moved your WordPress site to another location, you'll find that all your images end up broken because they all point to the old domain.

The problem is, all the image paths stored in the database are static, so you've got to update them to the new location.

Usage case: My usage case is that I'm moving an old WordPress site to my local computer to use as a sandbox for theme design. So all the references to myolddomain.com need to be changed to localhost/sandbox (the directory on the server that my WordPress installation is on).

Caveats: What I'm about to show you will not only update the image paths, but it'll also update the internal links on the site. As long as your permalinks setup is the same as before, everything should be fine!

Tools: This procedure can be easily carried out using either PHPMyAdmin if you've got it installed. You can also use a simple MySQL command line prompt if you're familiar with that.

Some interesting content publishing systems

I test out a lot of content management/publishing systems. A lot.

As someone who runs a couple of websites, I make it my business to check out different publishing systems and see how they're cobbled together. Some systems are pretty straightforward to set up and conducive to publishing straight out of the box.

WordPress

WordPress, for example, is a wonderful publishing tool and more flexible than you might give it credit for: photoblogs, text blogs, magazine style sites are all possible. Bolt on BuddyPress and you've got a basic social network with some of the best elements of Twitter and Facebook. Themeing is a snap, and it's notoriously good for SEO benefits. What it lacks out of the box can be filled in by some extremely well-written plugins.

We run Unreality TV and a sister site off WordPress, and have done since 2005. The improvements to the platform since then have been breathtaking, especially the one-click upgrades and the very slick administration pages.

Ubuntu: How to share a wired internet connection

Ubuntu logo

Ever been stuck with a single, wired internet connection, but needing to connect more than one computer to the internet?

You'll be glad to know that with Ubuntu, it's easy to share an internet connection by creating an ad-hoc wireless network. It happened us recently on holiday - we had a single wired network connection, but two laptops. Both machines were wireless enabled.

Here's how to set up the connection:

How to grab a vanity URL for your Facebook fan page

Facebook logoWe maintain a couple of Facebook fan pages for Unreality TV and its sister site, Unreality Shout.

Now, I knew that it was possible to set up a vanity URL for your own account on Facebook (mine's facebook.com/gerardmcgarry - don't stalk me, I won't follow you), but I just discovered today that it's quite simple to set up a vanity URL or username for your Facebook fan pages. If you're a publisher this is a godsend, because it makes the URL more concise and easy to share.

The bleeding edge of Drupal 7

Drupal logo

I'm a very renegade web developer. I like to exist on the bleeding edge, and I'm waiting with baited breath for the next version of Drupal to be released.

My memory of the last big Drupal release - migrating from version 5 to 6 - was a frustrating affair. Though the new core code was available, very few of the contributed modules were available at the time Drupal 6 came out.

The reason for writing this is because I came across this blog post on Mikkel Høgh's blog, where he talks about supporting Drupal by adopting the latest version as soon as possible. Now, even though that's quite an old post, I admire the principle - upgrade as quickly as possible and help move the Drupal project along.

I'm keen to jump on board with the latest version. There are sites in production that I can afford to experiment with and one's where I'll adopt a "wait and see" attitude, or perform some more in-depth testing first.

Anniversaries

This is going to be a strange post. But then it's a strange time, and my head is full of conflicting ideas and emotions and memories. So expect a jumble of words that may not entirely make sense and may not be in exactly the right order....

Last Monday, I found myself in Elstree, the home of Big Brother. On assignment as our roving reporter to meet with 89 potential housemates for the new series. It was brilliantly twisted of the Endemol staff - giving interviews with the possible housemates, but throwing in 75 red herrings to make it almost impossible for the red tops to do any dirt digging.

If anything, it was good for a laugh, I got to see the back of my head (what bald spot?) on Big Brother's Little Brother for about 2 seconds and had some fun chatter on the train back to London with a couple of online journalists about the series.

Inspiration: Drupal Showcases and Galleries

Drupal logo

I've got a couple of Drupal sites I'm planning to tidy up and work on over the coming months. Ideas for these sites are currently in flux, so I'm looking around to see other sites running on Drupal, what their features are and how they've been structured and designed.

As part of my research, I've dug out some galleries that showcase live Drupal websites. Some of these contain excellent screenshots, others merely link to the sites in question. However, if you want to see the breadth of what Drupal can do, and you want to look at real-world solutions, these are great places to start.

I have listed these posts/sites in order of preference, so hopefully you'll hit the most useful resources first. And if you know of any other Drupal showcases that deserve a mention here, leave me a comment and I'll update this post.

Displaying a previous - next post link in your Drupal theme

If you're a convert to Drupal from a blogging platform like WordPress, you might miss the Previous/Next post links that allow visitors to read through the posts on your site in a chronological manner.

I've been searching for a solution to this for a while, but nothing I've found on Drupal.org has offered an acceptable solution for me. What I'm going to show you here is some code I've put together that retrieves the next and previous posts from the database and displays them for the user. If you are a Drupal guru and have suggestions for how to refine this, please share your knowledge in the comments.

GerryBot: A free minimalist theme for Drupal

GerryBot - A theme for Drupal

I promised a while back that I would make the theme I use on this site available for free download.

Well, here it is. Called GerryBot, it's  a very minimalist one-column Drupal 6 theme. The original concept behind this theme was to have as little as possible on the page to distract from the content. Some of the features are:

Give your Drupal site an SEO makeover

Drupal's currently my content management system of choice. But like virtually any CMS, Drupal needs some SEO tuning to make it more attractive to search engines.

I've set up a number of websites using Drupal, and this post will gather together some of my standard actions for optimizing. I'll try to be as exhaustive as possible on this post, starting with the basics and moving toward more complex optimization techniques.

This post, for the most part, looks at Drupal modules that can automate the SEO process for you. None of this negates the need to have an accessible theme design and to do the usual SEO activities such as building backlinks to your site. Let's get started...

Syndicate content