Monthly Archives: February 2013

Moving Day – SquareSpace to WordPress

Canispater has moved to blog.canispater.com

I made a blog move to WordPress from SquareSpace because the price was right (included free with my domain purchase through 1&1 Web Hosting) plus a couple of posts got away prematurely due to the quirky web interface. Don’t get me wrong, SquareSpace is a great platform for quick setup and ease of use, but I wanted a little more control over the platform and like I said, the price was hard to beat.

WordPress’ web-based editor works well for creating simple text or media rich posts. You upload media to your “media library,” then add it to your post.  It’s really handy if you need to upload a lot of media.  I was also pleasantly surprised with the WordPress iPad app.  You have full site management capability and the post editor gives you access to the raw HTML if you want to make changes.  Oh, and for you developers out there, it’s open-source!

While a WordPress blog will require more up-front configuration, there are thousands of plug-ins available for adding the functionality you need.  I do recommend getting the JetPack plugin though it requires a login at WordPress.com for web stats.  JetPack includes a basket of features most blogs will use.

WordPress Hosting Options

You can get WordPress running in one of three ways:

  1. a free blog on WordPress.com (minimal configuration options, easy setup, least flexible)
  2. download the software and host it yourself (the most complicated setup yet most flexible) or
  3. find a hosting service (easy setup, some configuration required, very flexible)

Migration was easy

SquareSpace has an export to WordPress function which worked flawlessly except for a few images (it got most, but not all).  I copied the missing images over manually.

Setup was easy with the 1&1 admin panel.  I used the Click & Build website feature to create the WordPress instance.  A subdomain is required to host the software (eg: blog.canispater.com).  After a couple of minutes, I received an email saying my blog was ready so I configured it like I wanted (user accounts, theme, plugins, extra pages, etc.) then chose import from the tools menu.  The entire process took seconds, but I didn’t have a lot of content to move.

Once I was happy with the new blog, I repointed the domain destination to the new blog.  This change propagated within a couple of minutes.

Lessons Learned

Setting up the WordPress instance was a little tricky for me because my domain was not registered at 1&1.  I had to first set up an external DNS for the domain which basically means using the 1&1 DNS servers for the domain instead of the existing domain registrars’ servers.  Performing this operation caused an outage while the DNS changes propagated, but everything converted over within a few minutes.  Once everything worked on the new DNS, I proceeded with the install.  If possible, have the domain registered with your provider to make things easier.

I had two issues to solve once everything settled.  First, the RSS feed URL for the old blog was canispater.com/blog?format=rss but the new feed URL is blog.canispater.com/feed/.  In order for the spiders to maintain the old feed, I had to create an .htaccess file to do a 301 redirect.  Second, I wanted people to be able to type canispater.com into their browsers and have that redirect to the blog.  There are a couple of ways to accomplish this depending on your environment, but these two lines seem to work.

Redirect 301 /blog http://blog.canispater.com/feed/
Redirect 301 / http://blog.canispater.com/

The first line allows the spiders to find the new feed and the second redirects any request to the root of the domain to the blog.  Note: once the spiders crawled again, all of my previous entries (previously published and imported from the old blog) were sent to the feed again.

The domain redirect worked fine with Chrome and FireFox, but not Safari (initially).  Safari caches 301s and I had tried this earlier while the DNS was propagating so it cached the redirect to the generic “domain just set up” page.  Clearing the browser cache solved that problem.

This was basically a weekend exercise because I had to do a lot of reading to understand the new environment.  I really like what I’ve seen with the platform so far and recommend it if you want more control over your blog.

iOS/Mac Network Link Conditioner

Xcode Lets You Test Your Network-Based Apps

Who knew? Apparently just about everybody – except me! I recently discovered the Network Link Conditioner Apple provides for developers. The latest version I could find was Hardware IO Tools for Xcode 4.4 – Late July 2012 for the Mac, but I was pleasantly surprised it was already on my iPhone under Settings.

2013-02-16 21.30.55 2013-02-16 21.31.12

Simply turn it on, run your app, fix it. Note: this will affect all network communication on your device while it’s enabled so don’t forget to turn it off when you’re done testing your app.

XCode Environment Settings

Easily Print XCode Environment Settings to a File

If you need to get a list of environment settings running under Xcode, use a run script to print them out to a file when you run your app.

Go to the Build Phases section of your target and add a Run Script by clicking the Add Build Phase button in the lower right-hand corner and choose Add Run Script.

AddScript

This adds an empty Run Script section to your Build Phases for the selected target.

Empty

Add the line printenv | sort > $SRCROOT/environs.txt as the script.

RunScript

$SRCROOT is the main folder of your app. Each time you run your app, the Run Script will create or overwrite the file environs.txt in the main folder with a sorted list of all of your environment variables. This will help you figure out where everything is hidden behind the scenes.

Here is an excerpt of the file on my machine.

CACHE_ROOT=/var/folders/7v/4b2ghpfx4sd5bgn6y1lc1rs80000gn/C/com.apple.Xcode.501
CCHROOT=/var/folders/7v/4b2ghpfx4sd5bgn6y1lc1rs80000gn/C/com.apple.Xcode.501
CHMOD=/bin/chmod
CHOWN=/usr/sbin/chown
CLANG_CXX_LANGUAGE_STANDARD=gnu++0x
CLANG_CXX_LIBRARY=libc++
CLANG_ENABLE_OBJC_ARC=YES
CLANG_WARN_CONSTANT_CONVERSION=YES
CLANG_WARN_EMPTY_BODY=YES
CLANG_WARN_ENUM_CONVERSION=YES
CLANG_WARN_INT_CONVERSION=YES
CLANG_WARN__DUPLICATE_METHOD_MATCH=YES

Let me know if this helps.