KUNG HEI FAT CHOI!! Happy Chinese New Year

February 14th, 2010

Since its 2am, I can officially say its Chinese New Year (which also just happens to fall on Valentine’s Day for 2010). Personally, I think Chinese New Year is a more special occasion than Valentine’s Day; the commercialism for days like V Day and Christmas does go a bit too far sometimes.

Anyway, this year is the year of the Tiger, for people born on the following:

  • 1902
  • 1914
  • 1926
  • 1938
  • 1950
  • 1962
  • 1974
  • 1986
  • 1998

According to the story, the Tiger came 3rd in the race. A small factoid… The number 3 is considered a lucky number in Chinese beliefs; 3 in Chinese also sounds like the word “life or alive”. However, the number 4 is considered unlucky as the same pronounciation for this also means “death”. Maybe 2010 is your lucky year! Don’t forget to give someone you love a Red Envelope of money.

May 2010 bring you good fortune and prosperity!

*RAWR*

  • Share/Save/Bookmark

Moto Miscellaneous , ,

Moving Wordpress blog how-to, new domain new host

February 13th, 2010

My hope is that I don’t have to go through this again, ever. But if I do, it will be much less painful from the lessons I learned. Moving a Wordpress blog is not just simply a quick copy and paste of the entire directory… especially if you are also moving it to a new domain name. There are export options within Wordpress and other tools, which can be a bit hit and miss so I decided to do it this way. To save others from struggling on their own, I decided to write up a guide and to shed some light on some of the pitfalls.

Back up your files and database!
Before commencing any work, make a back up of the following as a minimum requirement:

1. Load up your favourite FTP client and make a copy of these files and folders from your existing site.

  • /wp-content/plugins
  • /wp-content/themes
  • /wp-content/uploads
  • .htaccess file (this is a hidden file by default, view all hidden files within your client to see it listed)

If you can make an entire copy of all folders within your site, then please feel free.

2. Make a copy of the Wordpress SQL database by exporting it into a .sql file. Most hosters have SQL tools available, such as phpMyAdmin within cPanel to do an export.

cPanel - phpMyAdmin tool

phpMyAdmin - Export tool along top toolbar

When doing the database export, make sure all tables are selected. It may also be an idea to backup each table into individual files, I’ll tell you why in a moment…

Install Wordpress
Now do a new install of Wordpress on your new webspace and create a new SQL database. During the install process, make sure the table prefix matches exactly as your existing database. This is defined in the wp-config.php file:

Wordpress table prefix

Just to add, I use EditPlus as my PHP editor which works really well.

Once Wordpress is installed, delete all the tables in the newly created database using phpMyAdmin etc.

Import and upload
Now to put all your content back in. Import the .sql database file you backed up earlier and import it into the currently tableless database. You should now see all the populated tables, which contains all your blog settings and posts.

Upload the plugins, themes and uploads folders from your backup via FTP to your new Wordpress install. Bear in mind to upload them to the same folder structure, replacing any existing folders. If you are using the same domain name as before and just changed website host, then you are pretty much done. You may need to put your old .htaccess file back in, if you cannot get permalinks to work as intended. If you bought a new domain name then you still got some work to do…

Replacing old domain name references with new. Welcome to SQL!
This is where the fun begins, you will now learn a few SQL commands which will come in very handy in this instance. Making SQL changes directly to the database instead of looking through Wordpress settings via the GUI is my preferred method. Also some of these changes can only be made via SQL. Go back to trusty phpMyAdmin again, and load up the SQL tool:

phpMyAdmin - Executing SQL commands

  • Changing the HomeURL and SiteURL – The HomeURL and SiteURL is an absolute path to your site. Since your site location has changed, we need to update this too or else your blog won’t load.
    • UPDATE wp_options SET option_value = replace(option_value, 'http://www.youroldsite.com', 'http://www.yournewsite.com') WHERE option_name = 'home' OR option_name = 'siteurl';
  • Changing the URL for Content – Wordpress loves absolute paths instead of relative, so again another change is required to make sure the URL for content in each post record is updated to the new.
    • UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://www.youroldsite.com', 'http://www.yournewsite.com');
  • Changing the GUID – This is a very important change. The GUID houses the absolute location of where your posts are. Visitors to your site won’t be able to get to your articles as it will still be pointing to the old address.
    • UPDATE wp_posts SET guid = REPLACE (guid, 'http://www.youroldsite.com', 'http://www.yournewsite.com');
  • Changing GUID for attachments/images – You may not need to do this, but if you find images and galleries are broken then you may need to update the GUID for the location of images. The best way is to check the current GUID location for images before making changes:

    phpMyAdmin - GUID for attachments

    • UPDATE wp_posts SET guid = REPLACE (guid, 'http://www.youroldsite.com', 'http://www.yournewsite.com') WHERE post_type = 'attachment';

Pitfalls and user awareness

SQL Oops
Not everything went to plan, it was 2am and I think I mistyped one of the SQL commands. Lo and behold the entire GUID column was blank in the wp_posts table. GASP! Remember earlier I mentioned backing up each table into individual .sql files? Well this is where my life was saved. I made several changes to other tables in the database and the last thing I wanted was to restore all the tables and start again. When you do a SQL database backup at the top level, all tables are backed up into a single file. But since I also did seperate table backups, I did a quick restore for wp_posts only and voila! I executed the correct find and replace command again and everything was good to go.

Permalinks and .htaccess
Another issue I came across were permalinks, I like them to look pretty. For some reason, all my permalinks were now coming up with /index.php/2009-01-nameofpost. What was index.php doing there in the URL? It definitely wasn’t there on the old site. I changed the setting within Wordpress to try to prevent that from being appended, but it didn’t work. It looked like the .htaccess file was not updating correctly, Wordpress normally updates this automatically to set the use of permalinks. If your web host uses Apache, then it will most likely be utilising the mod_rewrite module for this to work. I restored .htaccess from backup which fixed it, but here’s what mine looks like if you need a point of reference:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

And that’s it, job done! It’s actually less painless than it looks, as long as you make backups of your old site then you can always restore back if things don’t go to plan. Good luck!

  • Share/Save/Bookmark

Moto Tech , ,

Blog move, farewell Pork and Beans!

February 6th, 2010

So I decided to move my blog to another host and also wanted to give it a new name, enter Individual Eleven. If you are a Ghost In The Shell fan like myself, then you may recognise the reference. I’ll be revamping the Wordpress template over the next week or so and changing a few bits here and there. It’s about time I did something with this!

If you have stumbled across this via an old Google link that used to point to Pork and Beans, then I would like to extend my welcome to you and hope you enjoy the content. I apologise to any readers out there that may have visited my blog regularly on the old site; sorry for the disruption I hope you find me again! If not, then I am typing this into the ether.

There are some people out there who have struggled to move their Wordpress blog when changing to different hosts, I shall be writing up a how-to in this regard… there were some idiosyncrasies I experienced that some of you may not be aware of.

Anyway, back to the grind!

  • Share/Save/Bookmark

Moto Updates

Games to look forward to in 2010

January 27th, 2010

I have been playing the superlative Bayonetta lately non-stop (barring bio breaks and the occasional hand reach for Pocky), and it made me realise just how exciting 2010 is going to be. Here is my list of games that I’m desperately looking forward to playing this coming year…


1. Final Fantasy XIII – I want to play this so badly it hurts. Final Fantasy XII was disappointing for some, but bets are on in regards to whether 13 will redeem the franchise. I pre-ordered this back in Spring 2009, that’s how keen I am. Suffice it to say, I will be MIA come 9th March. I must warn my friends and family in advance that I am not dead during this time, honest.


2. Starcraft 2 – How can you not YEARN for this game to be released! I predict a complete standstill in South Korea with their GDP plummeting to an all-time low when this puppy gets released. This game has been in development for what seems like an eternity. We can’t wait any longer Blizzard.


3. Bioshock 2 – Big Daddy is back! I loved the first game; interesting storyline and it looked oh so pretty on my PC. I think I will be playing this on the PC platform again, cranking it up to 1920 res sounds lovely with all the graphical wonders up to maximum. I may as well let my quad core processor and sli graphics cards stretch its legs.


4. Command and Conquer – Tiberian Twilight – Kane just won’t stay dead; this is the final conclusion to the Tiberian saga that spanned 15 years. I still have fond memories of the first ever Command and Conquer, and I am salivating at the prospect of experiencing this once again. There will be a co-operative mode,  a definite plus and I am looking forward to the LAN play.


5. Diablo 3 – I gave up wondering when this game will be released, “it will be done when it’s done”. And by Jove it’s almost there! I need another decent RPG to get to grips with; this might just be the answer. Besides, how can you not want to at least try this with such a huge following.


6. Blazblue: Calamity Trigger – If you like Guilty Gear, then you will certainly enjoy this. There is still a market for 2D beat em up scrollers; the graphical effects for each move in this is amazing. The yanks have had this for some time now, it’s about time us Europeans get a taste. The developers were quite apologetic about the delays, and have said they will release bonus characters just for the European release as a thank you for our patience.


7. Alan Wake – A mysterious and atmospheric adventure awaits, and also the fact that I am going to creep myself out while playing this. It reminds me of Max Payne, well of course it does since it’s the same developers once again to bring us this. Might I add that the graphics are out of this world which will entrench you in the immersive game play.


Some worthy mentions…

Some of these didn’t quite make it to the list; they are all very good games don’t get me wrong but I’m not willing to give up an organ for them.

Fable 3
Formula One 2010
Dante’s Inferno
Halo: Reach
Fallout: New Vegas



Sequels for existing games

Maybe not for 2010, but I would love to see new sequels for certain games. Some will never surface (most of them are relic PC titles), one can only dream.

Soul Calibur
Zelda
Mario Kart
Elder Scrolls
Dead or Alive
Dungeon Keeper

Freespace 2
Grim Fandango
Deus Ex
Duke Nukem
(just kidding, this will NEVER HAPPEN)

  • Share/Save/Bookmark

Moto Games