Moving Your WordPress Blog to a New Domain Name or URL

In the past several months I have taken a more active interest in my web presence, namely my websites’ placement in search results for queries of my name. My personal website and blog were previously hosted under two different domain names, and I decided to consolidate the URLs of my personal blog and personal website under one domain name. I wanted to reclaim the previous domain name for another use, and I wanted to accomplish all of this without breaking any existing inbound links to my WordPress blog posts.

With some creative thinking and using mod_rewrite, it is possible to move your blog to a new location, ensure your visitors never miss a beat, and reuse your old domain name. Here is the approach I used to move WordPress to a new domain name without breaking any existing links. For the purposes of this discussion, we will use URL1 and URL2 to stand in for our source and target URLs, respectively. I also assume you are using Apache and that your server/host supports mod_rewrite.

1. The first step is to identify the target domain name, URL2. My hosting company DreamHost has a web-based control panel that makes this part easy, and in my case, I chose to create a new subdomain of my personal website.

2. WordPress provides excellent documentation for how to move the blog itself. Just be careful not to change your permalink structure in the process.

3. You can manipulate the .htaccess file at URL1 to automatically redirect your traffic to URL2. If you have no intentions of reusing this domain, the following code in your URL1 htaccess file will simply redirect all traffic to URL2, preserving the path of the original request:


Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://URL2/$1 [R=301,L]

However, if you are like me and you want to reuse URL1 for something else, you can do a bit of pattern matching on the requested paths to redirect only WordPress-specific pages to your new domain. I simply browsed through my own blog and noted that only a handful of paths need to be redirected. Then I created a RewriteRule for each.


RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$

# If you do not want to redirect your blog's homepage to your new domain name, comment out the next line
RewriteRule ^(.*)$ http://URL2/ [L,R=301]

# Redirect the permalink structure to URL2
# (assuming permalink struct: http://URL1/year/...)
RewriteRule ^2009(.*) http://URL2/2009$1 [L,R=301]
RewriteRule ^2008(.*) http://URL2/2008$1 [L,R=301]
RewriteRule ^2007(.*) http://URL2/2007$1 [L,R=301]
RewriteRule ^2006(.*) http://URL2/2006$1 [L,R=301]
RewriteRule ^2005(.*) http://URL2/2005$1 [L,R=301]
RewriteRule ^2004(.*) http://URL2/2004$1 [L,R=301]
RewriteRule ^2003(.*) http://URL2/2003$1 [L,R=301]
RewriteRule ^2002(.*) http://URL2/2002$1 [L,R=301]
RewriteRule ^2001(.*) http://URL2/2001$1 [L,R=301]

# Redirect these standard locations
RewriteRule ^category(.*) http://URL2/category$1 [L,R=301]
RewriteRule ^author(.*) http://URL2/author$1 [L,R=301]
RewriteRule ^wp-content(.*) http://URL2/wp-content$1 [L,R=301]
RewriteRule ^wp-admin(.*) http://URL2/wp-admin$1 [L,R=301]
RewriteRule ^feed(.*) http://URL2/feed$1 [L,R=301]

# Finally, redirect any Pages you may have
RewriteRule ^about(.*) http://URL2/about$1 [L,R=301]

The only catch here is that if you want to reuse URL1, you cannot duplicate any of the paths that you are redirecting because your visitors will never see that content. If you use a different permalink structure, simply adjust the regular expressions in each RewriteRule to match.

Hopefully this helps with your next WordPress move. With the magic of mod_rewrite and some creative htaccess entries, your visitors will arrive at your blog’s new location without incident and never the wiser.

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

SonicWALL – Web Site Blocked

You wouldn’t be surprised to see this message in a high school computer lab. You may even catch this at your local library. But when you see it on your own laptop while surfing the web from the waiting room of a private business, you may start to wonder. What is the responsibility of private business owners who provide free internet access to customers when it comes to content filtering?

This site is blocked by the SonicWALL Content Filter Service.

Reason for restriction: Administrative Custom List settings

I see two possible motivations for filtering content using a hardware-based firewall in the waiting room scenario. The first of those is bandwidth conservation. Certainly disallowing downloads of files exceeding a certain size and blocking non-HTTP ports would preserve bandwidth. Preventing this kind of downloading may also help stave off virus infiltration by blocking infected machines from transmitting the virus to/from other computers. And let’s be honest, nobody needs to be using BitTorrent to download/upload their favorite pirated films/songs/pictures while they sit in a waiting room or other public space.

I am less understanding of the second kind of filtering: that relating to content alone. SonicWALL firewalls, along with others in the same class, allow administrators to specify one or more keywords that are not allowed. In addition to blocking known spam/porn/treasonous websites by URL, this allows the firewall to block based solely on the keywords entered.

Life is full of dual-use words, and the mere presence of a word does not automatically go to the topic of the website. Unfortunately the text “Administrative Custom List settings” offers no detail as to the word in question, but I am left to wonder why accessing TurboTax (I’m trying to get a jump on my taxes by studying products now) is so scandalous. Businesses who filter their public internet connections should consider that doing so sends a message to customers: We don’t trust your judgment.

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Strange Red Beams near DC?

While checking the traffic cameras before heading out on this very snowy, icy day, I decided to browse the area traffic cameras at TrafficLand. Here is one of the cameras from this morning:

Red Beams of Light from a Traffic Camera

This traffic camera shot of I-66 and Route 123 near Fairfax, VA shows two strange red beams of light. Anyone know what this is? Is it the aircraft deterrent laser light? Unfortunately for now that camera is no longer available. I’ll have to keep my eye on this.

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

My Firefox Tabs

I love Firefox.

I’m a permanent Internet Explorer convert. Since I bought my MacBook Pro in July I have not used IE. I didn’t download and try out the IE7 beta, I simply wasn’t interested. Firefox meets my needs.

In that spirit, I’d like to dedicate this post to taking a tour of my currently open Firefox tabs. By the way, I typically have no fewer than 10 tabs open at a time, so get comfortable… this is going to be fun!

First, I always keep Gmail and my LiveJournal Friends Page open, so I can stay in touch. I’ve been working to develop my business relationship with Microsoft, and was reading about their Small Business Symposium. I have also been reading a NYT article about free stuff for your cell phone, and while I think most of it is pretty far fetched in terms of whether I would find it useful, I have been playing around with YouMail (coincidentally, the next tab that is open). If YouMail had a few more features, it would be an amazing alternative to using the default wireless carrier voicemail system.

Back on Sunday Nov 28, Erin and I waited in line at Best Buy starting at 4 AM to get the new Nintendo Wii. The store opened at 10 AM, and we walked away with our Wii around 10:30 AM. Boy was it worth it! We also met some cool people in line, one of whom recommended that we buy the new Zelda: Twilight Princess game. We bought it and started playing and loved it immensely, but got a little stuck. So after a few hours of being stuck we consulted a complete Zelda walk-through guide to get us unstuck. I kept the tab open just in case we got stuck again.

Oh, and can you imagine Bill Gates as our next president? You don’t make billions of dollars by being foolish with money or by being a bad manager! Of course, I wouldn’t be “fair and balanced” if I didn’t have a look at these awesome screen shots of the Mac OS that go all the way back to the beginning (that’s right, System 0.0 released 21 years ago). When I just refreshed that page to make sure it was still working, I got a “Bandwidth Exceeded” error, which means they should be looking at my web host, DreamHost, which offers transfers of something up in the 1-3 TB (terabytes) per month (which for about 99.9% of the websites out there, anything >1 TB per month = Unlimited). Oh, and I was reading today about how they are now offering their best hosting package for FREE to 501(c)(3) non-profits. That is definitely a sweet deal!

And that, folks, is all. Until next time!

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Why Leave LiveJournal?

I have been using LiveJournal since late 2001. Back in the day it was great. The invitation requirement kept out the teens and tweens hoo tipe lik dis… n00bs!, the developers and management were accessible and downright “good folks”, and LJ wasn’t owned by some very large media company (SixApart, Ltd.) trying to establish a monopoly on the blogging market. But like most large and growing companies, they chose to continue expanding their empire instead of adding more value for their existing customers.

LiveJournal hasn’t kept up with the latest and greatest in web technology, meaning there is no way to embed media files, advertising, or any other scripts. Their proprietary styling language has a steep learning curve, and making your journal look different than everyone elses takes a great deal of time.

Anyway, I’m happy to be using WordPress. It’s a great piece of software that offers so much more control.

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Migrating from LiveJournal

With the fiasco with Comcast Business, I have moved all of my websites to a virtual hosting environment. At the same time I decided to consolidate my blog into my website, migrating it from LiveJournal to WordPress 2.0.4 with comments intact.

When I Googled the web for instructions for importing with comments, I found a lot of hacks and tricks but no real solutions. After piecing it all together, I decided to post my own step-by-step guide in hopes that someone will find it useful.

  1. I assume you have some sort of WordPress blog of version 2.0.4 installed somewhere, and that the basic installation works flawlessly. There are lots of instructions on the WordPress website.
  2. Because we’ll be using a special piece of software that has these requirements, you should be using a Windows computer with the latest version of Microsoft’s .NET Framework installed.
  3. Download and install LJ Archive. LiveJournal doesn’t directly support the exportation of comments, and forces you to download entries one month at a time. LJ Archive is a third-party tool that overcomes those limitations.
  4. Open the LJ Archive software, and enter your LiveJournal information to create a full backup of your journal. You can of course modify the options as you see fit. My journal is five years old, and the entire process took about five minutes.
  5. When the software has finished downloading your journal, go to the File menu, highlight Export, and choose XML. Choose a place to save this file. It should only take a minute to create it.
  6. WordPress 2.0.4 supports importing comments from LiveJournal, so you can simply log into your WordPress blog as an administrator, click on the “Import” tab, and choose LiveJournal. Specify the location of your XML backup file and go. It may take several minutes to import, especially if there are a lot of entries.

Not too complicated, right? I hope someone finds this useful, and if you do, please leave a shout in the comments area to let me know.

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail