2009.01.28

WordPress Migration with MySQL

By underblob @ 6:05pm — Categories: LAMP, Tech, WordPress

We need to move a WordPress 2.7 install from a development domain to the live environment via straight FTP transfer and phpMyAdmin dump. We bypass the Export / Import functions in WordPress admin so that we can preserve our myriad plugin settings when making the domain switch. But now our links are all pointing at the old URL and the upload path is all wonky. WTF? Fear not, you can fix all those problems by running this tasty little SQL script on your WordPress database via phpMyAdmin (don’t forget to replace the values with the appropriate values for your environment):

## — replace absolute URLs that point to the old domain
UPDATE wp_posts

SET guid = REPLACE ( guid, ‘www.oldsite.com’, ‘www.newsite.com’ )
WHERE guid LIKE ‘%www.oldsite.com%’
;

UPDATE wp_posts

SET post_content = REPLACE ( post_content, ‘www.oldsite.com’, ‘www.newsite.com’ )
WHERE post_content LIKE ‘%www.oldsite.com%’
;

UPDATE wp_options

SET option_value = REPLACE ( option_value, ‘www.oldsite.com’, ‘www.newsite.com’ )
WHERE option_value LIKE ‘%www.oldsite.com%’
;

## — replace absolute server paths
UPDATE wp_options

SET option_value = REPLACE ( option_value, ‘/old/server/path/’, ‘/new/server/path/’ )
WHERE option_value LIKE ‘%/old/server/path/%’
;

UPDATE wp_postmeta

SET meta_value = REPLACE ( meta_value, ‘/old/server/path/’, ‘/new/server/path/’ )
WHERE meta_value LIKE ‘%/old/server/path/%’
;

SMS Stats

By underblob @ 8:58am — Categories: Mobile, Tech

SMS text messaging is the most widely used data application on the planet, with 2.4 billion active users, or 74% of all mobile phone subscribers sending and receiving text messages on their phones.

en.wikipedia.org 2009.01

2009.01.25

日本 T-shirt Folding

By underblob @ 3:44pm — Categories: Humor, Video
YouTube Preview Image

2009.01.14

TBP Sandwich

By underblob @ 11:30am — Categories: Random

Turkey Bacon and Pear sandwich:

  • 4 slices turkey bacon
  • 2 slices ripe bartlett pear
  • 1/4 cup alfalfa sprouts
  • 1 tsp dijon mustard
  • 2 slices whole wheat or multi-grain bread

Grill turkey bacon until crispy or if you like it floppy, make it so. Toast bread until golden brown. Apply dijon mustard to toasted bread. Add slices of turkey bacon, pear, sprouts. Eat. It is delicious!

2009.01.08

Work and Boredom

By underblob @ 5:19pm — Categories: Inspirational Quotes

Work and boredom.- Looking for work in order to be paid: in civilized countries today almost all men are at one in doing that. For all of them work is a means and not an end in itself. Hence they are not very refined in their choice of work, if only it pays well. But there are, if only rarely, men who would rather perish than work without any pleasure in their work. They are choosy, hard to satisfy, and do not care for ample rewards, if the work itself is not the reward of rewards. Artists and con-templative men of all kinds belong to this rare breed, but so do even those men of leisure who spend their lives hunting, traveling, or in love affairs and adventures. All of these desire work and misery if only it is associated with pleasure, and the hardest, most difficult work if necessary. Otherwise, their idle-ness is resolute, even if it spells impoverishment, dishonor, and danger to life and limb. They do not fear boredom as much as work without pleasure; they actually require a lot of boredom if their work is to succeed. For thinkers and all sensitive spirits, boredom is that disagreeable “windless calm” of the soul that precedes a happy voyage and cheerful winds. They have to bear it and must wait for its effect on them. Precisely this is what lesser natures cannot achieve by any means. To ward off bore-dom at any cost is vulgar, no less than work without pleasure.

Exerpt from The Gay Science by Friedrich Nietzsche