Posts Tagged with “Geek”

Comments Closed

Useful SQL queries for migrating a WordPress database

First, if at all possible, use the WP Migrate DB Pro or BackupBuddy plugins to migrate your WordPress database. The money spent will save yourself a lot of frustration and hair pulling, and hours if not days of cleanup and massaging of the WordPress database.

But if that’s not possible, welcome to my world for the past week. I’ve had to migrate a WordPress database without my favorite migration tools. After scouring the web for tutorials and tips, I’m compiling them here for easy reference.

Gather Your Tools

First thing you need is to get your hands on the following:

1. Database name, prefix, user and password.

You can find these defined in the wp-config.php file. In the following examples, be sure to swap out the database name wordpress and prefix wp_ with the correct values from your situation.

2. Access to phpMyAdmin so that you can interact with the database.

We’ll be running the commands below through the SQL tab in phpMyAdmin.

phpmyadmin-sqlquery

Running SQL queries on your database with phpMyAdmin

You could also connect directly to MySQL through the terminal / shell prompt. Good luck if you don’t have phpMyAdmin.

3. Backup, Backup, Backup

Don’t say I didn’t warn you. Export your untouched database and lock it up. If all goes wrong, restore to this backup.

Change the Site URL

The first thing you would want to do is to change the site URL. You can browse the wp_options table for the siteurl and home options values directly, or you can use this SQL command:

UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsiteurl.com', 'http://www.newsiteurl.com') WHERE option_name = 'siteurl' OR option_name = 'home';

Next, you’ll want to replace all instances of oldsiteurl.com in your post’s contents and GUID.

UPDATE wp_posts SET post_content = REPLACE (post_content, '//www.oldsiteurl.com', '//www.newsiteurl.com');
UPDATE wp_posts SET guid = REPLACE (guid, '//www.oldsiteurl.com', '//www.newsiteurl.com');

Read More »

Comments Closed

Setup MAMP and Parallels to test Windows browsers on Mac

Had to figure this out earlier today and figured others might be looking for an answer too. I am assuming that:

  1. You are using MAMP with the default ports (80 for Apache)
  2. You are using Parallels with Windows 7 (although these steps should work for older versions too)

Step 1: Setup your local environment with MAMP

This step is pretty straightforward. If you put your website in <Document Root>/sitename should be able to load it at http://localhost/sitename/.

Here’s a helpful tutorial. Don’t forget to set your Apache and MySQL ports to the default 80 and 3306.

Step 2: Figure out your Mac’s IP address on the network

Go into your Mac’s Network Preferences. You’ll see 2 or more connections on the left and the active one will say Connected. Click on it and you’ll see the IP address on the right side of the pane.

To make sure your Mac’s IP address doesn’t change, click on Advanced → TCP/IP. The options sheet below appears.

Network_Preferences

Change the IPV4 option to Using DHCP with manual address and type in an unused IP address. In the example above I used 192.168.1.100. Read More »

Stormtrooper Happiness

stormtrooper-happiness.jpg

This image has been floating around Facebook and Twitter for a while now and I really got a kick out of it. I think this is the source of the image: Jay Mug – Stormtrooper Happiness

Comments Closed

Kill the Facebook ticker with custom CSS

Some reports say that 86% of people hate the new Facebook design, and I bet it’s the ticker that’s the target of everyone’s ire. I did some investigation and found that it was actually not too difficult to kill the ticker.. if you’re willing to get your hands dirty with CSS.

Background for non-geeks: CSS is a language that controls how a web page looks. Luckily, website users like us can also specify our own CSS to override what websites want to show us. In this case, we’ll be using our own CSS to hide the Facebook ticker.

Download the Stylish browser extension

Stylish is a browser add-on that enables us to use our own CSS for specific websites. It’s available for both Firefox and Google Chrome. Safari users can use the User CSS extension. (I’m a Safari user too, but the majority of the world isn’t. Hence the Firefox examples..)

Read More »

4 Awesome Tutorials on creating iframe Facebook tabs

Facebook recently revamped their Facebook Pages. One of the biggest effects of this is that you will no longer be able to create custom tabs with the Static FBML application by 11 March 2011. Luckily some people have quickly put out some excellent tutorials and resources to get everyone up to speed.

HyperArts has been publishing a series of tutorials on how to create iframe Facebook tabs.

Webdigi shares not only a tutorial, but downloadable examples as well!

Check these articles out and definitely bookmark them to bring yourself up to speed on creating iframe Facebook tabs.

 

Weekend Geek Project: Installing a SSD in my MacBook

My MacBook has served me well for 2.5 years. I had been planning to upgrade to a MacBook Pro but after a careful look at my financial commitments – an iPhone 5 upgrade, upcoming renovations and moving in to our new house, plus baby Zack – I decided upgrading to a new MacBook Pro would be burdensome for me. So instead I chose to upgrade the components of my existing MacBook.

I had already upgraded my RAM and replaced the battery, so this time I decided to replace my hard drive with a solid state drive (SSD). Why SSD? A SSD read and writes faster than a regular drive, which results in better performance for doing operations that involve reading and writing files. A SSD also promises better battery life and less heat. Check out this video of a SSD reduces boot times.

Installation Steps

Replacing a hard drive in a MacBook is a simple process that only involves 5 screws. See iFixit’s excellent guide for detailed steps with photos. Update: You can use Carbon Copy Cloner or SuperDuper – both of which are free and excellent – to clone your old hard drive to the new SSD before swapping them. Also, make sure you have the right tools:

MacBook SSD upgrade

  1. Torx screwdriver (left)
  2. Philips head screwdriver (right)

Click the images for full resolution versions.

Read More »

Comments Closed

The Digital Story of Christmas a.k.a. Christmas 2.0

Check out this Christmas Nativity told through social media – tweets, Facebook updates, YouTube, Foursquare check-ins.

Times change, feelings remain the same

Essential steps to protecting your Unifi network

I recently got Unifi, Telekom Malaysia’s High Speed Broadband service. It’s been awesome so far, but I realized the default configuration that TM installers set up is pretty unsecure. In this article, I’ll show you some essential steps you need to take to protect your Unifi network at home.

Why is the default configuration unsecure?

First, let’s have a look at why you need to protect your network. Or if you’re impatient, jump to the solution.

1. The router uses a default admin password (which is public knowledge)

The D-Link DIR-615 (the orange box) that TM supplies comes with a default password which anyone can find. Just try Googling for “dir-615 default password“.

2. There’s a 2nd ‘secret’ account to the router that many aren’t aware of

Yup, even I wasn’t aware of this – and I’m quite a techie. This 2nd operator account is meant for technicians to easily access your router if you forgot your admin password. Hat tip to the Unifi Handbook for pointing this out to me.

Read More »