Archive

Archive for the ‘Blogging’ Category

Laptop SSD Upgrade – I Love SSD’s

January 11th, 2013 No comments

I just have to say. I love SSD’s.

I have a HP Pavilion dv6 3030tx. Its not the fastest machine.
It is a 1st generation Intel Core i5 540M, with 4GB of memory.

If you read the posts on this site I recently upgraded to 8GB of memory.
This made little performance difference.

I rebuilt my PC with Windows 8 and upgraded to a Samsung 830 256GB SSD.

To give you an indication of a general performance improvement, read on.

Performance Benchmark Prior to SSD upgrade

I am a software developer and I do all of my development in Virtual Machines.
My current VM platform of choice is Virtual Box.

On battery on my daily bus trip I do the following:

1. Login to Windows.
2. Start Virtual Machine – Windows Server 2012
3. Login to Windows VM
4. Start Visual Studio 2012
5. Load solution I am working on.

All the above tasks generally take approx 12 – 15 minutes before I am at a working visual studio solution in my VM.
As an example it was taking approx 1.5 minutes to reach my desktop alone.

The windows performance score was 5.9 with the lowest score being the Hard disk.

HP Pavilion Performance SATA Drive 8GB Memory

Performance Benchmark after windows 8 and SSD upgrade

All of the above tasks can now be completed in under 2 minutes, that’s about a 600% improvement.

The windows 8 boot time is unbelievable. I can be at a working desktop in about 15 seconds, including typing my password. Did I also mention shutdown is about 5 seconds.

The other noticeable benefit is the improvement in battery life.
On my daily 2 hour commute to and from work, I would generally be running below 10% battery and being asked to find power or shut down.

Today on a full trip and working the entire time, I still had 40% battery life left.

The windows experience score is now 6.6 with the disk now 7.6 up from 5.9

SSD Performance

Some of this start up improvement may be coming from the Windows 8 upgrade (don’t get me started on metro…), but its still awesome, I’ve been restarting just to see how fast it is.

Don’t throw out your old PC, just upgrade to a SSD, you will not be disappointed.

FYI this is what AS SSD showed about my drive in the laptop.

AS SSD benchmark on Samsun 830 256 GB

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)

Categories: Blogging, Hardware Review Tags:

How to move wordpress.com site to a sub domain hosted on IIS – Tips and tricks

November 9th, 2011 No comments

I have recently moved my free wordpress.com blog (the one that you are reading) to my own domain.

If you read the contents on this site I hope you think I am reasonably technically savvy, but the feat of moving my site and redirecting the WordPress.com links was problematic and it took me a few days and many wrong turns to get it done.

I found that most instructions are based on apache/linux hosted solutions and I had issues using my IIS/Windows based host. My windows based host uses Plesk 10 (@ the time of writing).

Before you even begin to touch a computer there are a few things you have to think of first!

1. Root site or sub-domain?

Is this the only thing that you will have on your domain or are you going to have something else hosted on http://www.yourdomain.com? You need to answer this now as when you go to buy your domain mapping from wordpress.com you can only map a whole domain. So you would be better off hosting it @ http://blog.yourdomain.com, leaving the www for other things.

I started by creating my wordpress site with a click once install under a sub-directory in my httpdocs folder (main root web folder on my host), so I had my wordpress site setup @ http://www.homedev.com.au/ntsblog but as you can’t register a sub directory I had to start again.

So in my case I went and created a new sub-domain, http://ntsblog.homedev.com.au, and now I could register the sub-domain with my wordpress.com site.

2. Permalinks!!!!

Before you go any further you need to consider permalinks.

The issue

WordPress.com by default uses links that are styled as “Pretty Links” and default to a format of /%year%/%monthnum%/%day%/%postname%/” which means a posts will appear as http://blog.yourdomain.com/2011/11/31/post_title

The problem is that with version 3.2.1 of wordpress on a Windows host the “Pretty Link” is not supported by default and most “Permalinks” contain “index.php” in the path. see image..

Why is this a problem? Consider the link to your wordpress.com article that gets returned in a google search. When you try and do the domain mapping from wordpress.com to your domain, google will pass through a URL that your hosted wordpress site cannot handle.

This article discusses the various ways of mapping pretty links, and the section you are taken to is specifically for IIS/Windows systems.

http://codex.wordpress.org/Using_Permalinks#Permalinks_without_mod_rewrite

My hosting provider already had a copy of Microsoft “URL Rewrite Module”, so I created a web.config file as per the suggestion in this article and applied it to my site but it would not work.

Assume the URL was
http://ntsblog.homedev.com.au/2011/11/09/how-to-move-wordpress-com-site/

The URL re-writer would try to go to:

http://ntsblog.homedev.com.au/2011/11/09/how-to-move-wordpress-com-site/index.php/2011/11/09/how-to-move-wordpress-com-site/

In the end I did a little bit of tweaking and came up with the following solution…

web.config

Put this is the root directory of your wordpress site.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
	<rewrite>
		<rules>
			<rule name="Main Rule" stopProcessing="true">
				<match url=".*" />
				<conditions logicalGrouping="MatchAll">
					<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
					<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
				</conditions>
				<action type="Rewrite" url="redirect.php?path={R:0}" />
			</rule>			
		</rules>
	</rewrite>
  </system.webServer>
</configuration>

If you look at the “Action Type” link this is re-writing the url to go to a page called “redirect.php” passing in a parameter of the relative path. So we now need to create the “redirect.php” page.

redirect.php

Again, create this file in the root of you wordpress site.

<?php

	$relative_url = $_GET['path'];
	$new_relative_url = 'index.php/'. $relative_url;
	$hostname = $_SERVER['SERVER_NAME'];
	$new_url = 'http://' . $hostname . '/' . $new_relative_url;
	
	header("Location: " . $new_url)

?>

So what is this doing?
The URL re-writer matches the invalid URL and re-writes the url to “redirect.php”. This page then takes in the parameter, and rebuilds the full url to the site based upon inserting “index.php” in the chain. This works and also the “referrer” and “search engine” stats are not affected by the extra redirect.

To test this take an existing post on your new site, remove the index.php and paste that into a new browser window. The site should redirect to the index.php version. This means any link to your wordpress.com site will redirect to your new domain and be successfully passed along to the index.php page.

The only problem with this is that I don’t see how you could reverse the process and return to your wordpress.com site. The new articles will be found with index.php and if you try to go back to worpress.com as the primary domain the links with index.php will all break. Solution don’t go back. I will follow this up with wordpress and see if I can find a better solution.

Buy a domain from wordpress.com

Before you buy a domain read these wordpress articles about mapping domains or mapping sub-domains

Now seeing as I had created a sub-domain I went down the route of creating a CNAME entry. In plesk this means going to your DNSSettings and adding in a new CNAME. But being new to plesk I did not notice that when you make a DNS setting the settings shows with a warning like this
and right up on the top of the page you need to confirm the change by clicking Update.

So failing to notice that I handn’t saved the CNAME entry I gave up in frustration. So even though it told me not to I bought a domain and followed the full domain mapping instructions and it worked.

The instructions are fully mapped out in the mapping domains article but here are some extra tips.

  1. Go to your domain name provider site and find your name server settings, copy and paste them into a .txt document so you don’t forget them.
  2. With my name server provider, my names servers had a “Registrar Lock” on them. To update the ns1.wordpress.com, ns2.wordpress.com, ns3.wordpress.com, I had to
    1. Un-tick the checkbox and click save to clear the registrar lock.
    2. add the wordpress name servers and click save.
  3. now go to your wordress.com site and go to Store –> Domains.
  4. enter your domain, blog.yourdomain.com and click Add, follow the process to purchase the domain mapping
  5. Once registered, select your domain as the “Primary Domain” and click “Update Primary domain”
  6. Return to your name server and enter in the previous name server settings that you backed up to the text file.
  7. Re-enable the “Registrar Lock” if you have one.

Your wordpress site should now all be working.

What Plugins?

Now you’ve been using wordpress.com for a while and you probably have it configured how you like it, so how do you make your new site just like wordpress.com.
Most of the plugins on wordpress.com are special to wordpress.com, so I found it difficult to find and install the plugins to get the functionality I am used to.
So here is a mapping between functionality and the plugin you can freely download and install:

# wordpress.com Plugin Equivalent
1. Site Statistics Jetpack
2. Importer WordPress Imported
3. Ratings GD Star Rating

Other plugins I have found of interest;

  • Easy AdSense Lite
  • Google Analytics for WordPress
  • Preserve Code Formatting – keeps spaces and formatting when posting code snippets into your post.

Thats it for now.

Cheers
John

VN:F [1.9.22_1171]
Rating: 1.0/10 (1 vote cast)

Categories: Blogging, WordPress Tags: